How to toggle between two custom fields in WordPress woocommerce 'WC Product Field Group' plugin?

I have a full suit tailoring WordPress website and it using woocommerce plugin. I need 2 custom field groups to show in

I have a full suit tailoring WordPress website and it using woocommerce plugin. I need 2 custom field groups to show in single-product page.

  1. Custom Measurements (Precise) In this method the client has to measure and enter every single data like height weight etc.

  2. Standard Sizes (Quick) This is world standard sizes. Small, Medium,Large,etc.

I've created 2 custom field groups and they are visible only with 'Product Category name'

I need to toggle between these 2 field groups when a client selects their interested measuring method 1 or 2.

I don't have good knowledge in PHP so if its possible I prefer some easy method to do that.

I have a full suit tailoring WordPress website and it using woocommerce plugin. I need 2 custom field groups to show in single-product page.

  1. Custom Measurements (Precise) In this method the client has to measure and enter every single data like height weight etc.

  2. Standard Sizes (Quick) This is world standard sizes. Small, Medium,Large,etc.

I've created 2 custom field groups and they are visible only with 'Product Category name'

I need to toggle between these 2 field groups when a client selects their interested measuring method 1 or 2.

I don't have good knowledge in PHP so if its possible I prefer some easy method to do that.

Share Improve this question asked Sep 18, 2019 at 7:53 Gimhana JayasekaraGimhana Jayasekara 112 bronze badges 2
  • Hi Gimhana Jayasekara, welcome to WordPress Development. As a rule, the community considers questions about third-party plugins off-topic so you might notice some down-votes. Nevertheless, I hope someone can give you a good answer. You can find out what questions are a good fit here. – Matthew Brown aka Lord Matt Commented Sep 18, 2019 at 13:39
  • @MatthewBrownakaLordMatt Thank you so much for not removing my post. I've found a solution and put it here. Hope that may help someone. I didn't have anyone to ask. I searched for 2 days and then I decide to ask here. – Gimhana Jayasekara Commented Sep 19, 2019 at 10:58
Add a comment  | 

1 Answer 1

Reset to default 0

I've found a way to do that. Its all in WC Fields Factory plugin. Not a single line of PHP coding is required. I'll put full guideline to follow.

  1. Install the plugin

  2. Activate the plugin

  3. Go to Fields Factory tab in left sidebar of WordPress dashboard.

  4. Add new WC field group

  5. Add all the input element types you need (Labels, Selects, texts, etc)

  6. Add the Conditions rule set to show the input fields

  7. Save changes and update
  8. then go to the top element you added.
  9. Select the field rules tab
  10. Give the show hide rules according to the selection

  11. And you are good to go. Hope this helps anyone who struggled like me.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745147496a4613712.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信