Home › Forums › Backend Issues (wp-admin) › Field conditions based on post's properties › Reply To: Field conditions based on post's properties
It would need more work to accomplish.
The easiest solution would be to
If the page property is something that can be edited, for example based on the a taxonomy term, then you would need to add custom JavaScript that detects that WP field being changed and then updates the value of the field that is hidden by CSS and then
$('your field selector').trigger('change');
More complicated, but possible would be to build your own conditional logic script that detects this the change and then manipulates the class of the field you want to be conditional, this requires adding or removing the class ‘hidden-by-conditional-logic’ to the field container.
Overall, the easiest way is to have multiple field groups that have locations setting set appropriately and this is what I shoot for unless there is some requirement that dictates otherwise.
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.