Support

Account

Home Forums Backend Issues (wp-admin) Conditional Logic doesn't clear the hidden fields

Helping

Conditional Logic doesn't clear the hidden fields

  • Anyone know a way to clear the hidden fields, which hide by the conditional logic? Example I have field A, and field B and C has the conditional logic where both fields are depending on field A. Field B and C will be hide if field A is uncheck, but the value for field B and C are still there.

  • There isn’t anything built into ACF that will do this and what you are seeing is the expected behavior.

    You have 2 choices.

    1) You build an “if” statement in your template that checks the value of the field A and then displays the values if it is checked.

    2) Build an acf/save_post filter https://www.advancedcustomfields.com/resources/acf-save_post/ that checks the value of field A and when it is not checked deletes the values from the database.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Conditional Logic doesn't clear the hidden fields’ is closed to new replies.