I have this custom field for Products and have created a repeatable field group (Products Extra). This product field group is only supposed to appear for certain product Types (for example Event Tickets and not Simple Product). Right now it is on the template of all the products. How do I edit so that this field group only appears for specific products?
Is there any documentation that you are following? Repeatable fields
Is there a similar example that we can see? See attached
Please try these:
Dashboard-> Toolset-> Custom Fields, find and edit the field group "Products Extra", click and open pannel "Settings for test group 4":
1) click button "Edit", click tab "Taxonomies", enable the specific term of taxonomy "Product Categories"
2) enable option "when ALL conditions are met".
See screenshot field-group-setting.JPG
When you create/edit a product post, you can enable the specific term, save the post, and refresh browser, you will be able to see the custom field group "Products Extra"
Luo is on vacation. This is Minesh here and I'll take care of this ticket. Hope this is OK.
So, As I understand, you want to display the repeating field group "Event Options" filed should be displayed on your post edit page only when the Category is set to term Events?
Yes I only want to collect and display certain field groups that match a certain product category. however I dont really have product categories/taxonomies set up as far as I know..
The solution shared by Luo is correct but I think you are not following him.
Can you please share access details so I can set up a test example for you with one specific taxonomy term.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I deleted that field group that you are referring to. Now I have 2 Field Groups called 'Nearest Tube' and 'Private'
These field groups are only to be applied to Products types that are designated as Events (ticket-events) - see screenshot
My website has Users (Organisers, Vendors) who list these products - the issue is that these Field Groups are appearing on the User Dashboard even when the Product Type is Not and event.
And the 'Nearest Tube' Field Group is not even showing up on the Dashboard - see attached.
Basically I want these Custom Fields to disappear from the User Interface if it is not applicable and only appear when relevant.
I do not see the custom field group 'Nearest Tube' on your install.
So, I made a test with the Private custom field group. With your private custom field group, I have set the option "when ALL conditions are met" as you can see with the following screenshot:
=> hidden link
If you can check with the following test product post:
=> hidden link
If you notice currently the above test product post is setup as "Simple Product" and it will not display the Private custom field group. Now, you should change it to "Event Ticket" from Product Data dropdown and save the settings. As soon as you save it you will see the Private custom field group.
In addition to that, I see with your Private custom field group you have added the field "Private/Invite-only" which is a setup as checkboxes field where you added only one checkbox option. If you want only one checkbox you should add a Checkbox field not checkboxes.
I see what you mean. I thought the Custom Fields would change automatically when the product type is selected - I did not know about having to Update it to see it.
There is an issue in that when uploading a new product, a user would select the Product Type and would not see the Custom Fields until clicking the Publish Button which defeats the purpose of having the fields in the first place..
If the Custom Fields have to rely on the User clicking the Update button to appear, then it is not usable because the point is for the Users to click it while it's been updated..Is there a workaround?
I am thinking about adding Private to the Categories or Tags instead..
I see what you mean. I thought the Custom Fields would change automatically when the product type is selected - I did not know about having to Update it to see it.
==>
OK
There is an issue in that when uploading a new product, a user would select the Product Type and would not see the Custom Fields until clicking the Publish Button which defeats the purpose of having the fields in the first place.
==>
There is no such feature available.
Please Keep this in mind:
Please note that there are few types of post fields you cannot use as conditions for showing other fields. These fields include the Embedded Media, File Fields (Audio, Video, Image and File Upload field), Multiple Checkboxes field and a WYSIWYG Text Area field. Additionally, repeating fields also cannot be used as conditions for showing other fields.
Post field conditional display will work on custom fields only (which does not include taxonomy)
if you want to display different custom field group based on category, you need to click on update button as its defied in custom field group. AS you can see with the screenshot: hidden link