Support

Account

Home Forums Front-end Issues Issue with Conditional Logic in Nested ACF Repeater Fields Not Updating Correct Reply To: Issue with Conditional Logic in Nested ACF Repeater Fields Not Updating Correct

  • You have to base you logic on the selection in your field that sets the condition and not the fields that are conditional.

    ACF does not update fields hidden by conditional logic so the old value will still exist.

    
    $condition = get_sub_field('select_field_name');
    if ($condion == 'option 1') {
      $value = 'get_field('conditional_field_1');
    } elseif ($condion == 'option 2') {
      $value = 'get_field('conditional_field_2');
    }