Home › Forums › ACF PRO › Dynamically creating field based on select value › Reply To: Dynamically creating field based on select value
It is actually a similar question like this one: https://support.advancedcustomfields.com/forums/topic/generate-fields-for-each-select-option/
I’m now down to the point where i need some kind of code to do this:
If the radio button does not have choices when you edit the field group then you’ll need to create acf/prepare_field filters for each of these fields and dynamically create the conditional logic.
What’s hard to grasp for me:
The wysiwyg field needs to be different for every button group selection, but what about the field key? This needs to be the same every time?
I understand the php export with the arrays but not how to code the conditional logic with the wysiwyg field.
1) I select ‘button one’ from the button group in the product edit page.
2) A wysiwyg field is show where i enter some value
3) I select ‘button two’ from the button group and enter some value
4) Echo this in the tab content (with just
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.