Support

Account

Home Forums Bug Reports Conditional fields data stored when condition not met Reply To: Conditional fields data stored when condition not met

  • There isn’t a setting to do this and this topic has come up in the past. When the field is hidden by conditional logic it is not submitted. Anything that is not submitted is not updated. This is a JS only thing and does not effect the fields. When fields are being saved ACF is unaware of the conditional logic associated with each field……

    Long story short: If you want to do this then you need to add your own filters/actions to accomplish it. acf/save_post https://www.advancedcustomfields.com/resources/acf-save_post/

    When building templates you should not be basing display of the field on the content of the conditional field but on the condition field.

    Let’s say that I have 2 fields “show_price” and another field “price”

    
    if (get_field('show_price')) {
      the_field('price');
    }