Home › Forums › General Issues › Saving a hidden select field without a value › Reply To: Saving a hidden select field without a value
The easiest way to accomplish this is to have a radio field that allows selecting what type of value to enter with both of the select fields being conditional on the radio field. Then in you template you get the value of the radio field and display the correct content.
If you want to remove the content of the other field that is hidden you need to create an acf/update_value filter https://www.advancedcustomfields.com/resources/acf-update_value/. This will only run when a field is being updated, when one field is update you delete the value from the other field https://www.advancedcustomfields.com/resources/delete_field/
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.