Home › Forums › ACF PRO › Clear fields on save if radio button is set › Reply To: Clear fields on save if radio button is set
Well, it depends on what you consider undesirable. There are two things that you can do, one in the template and one in the admin.
In the template you can get the value of the radio field and then get the correct address field based on which is selected. This would be my preference since it requires the least amount of extra code.
In the admin you can create an acf/save_post action http://www.advancedcustomfields.com/resources/acfsave_post/ and in this function you can see what the value of the radio field is and then delete the contents of the other 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.