Support

Account

Home Forums Front-end Issues Only the last condition outputs as data-condition Reply To: Only the last condition outputs as data-condition

  • Your conditional logic array is not set up correctly

    
    $field['conditional_logic'] = array(
      // the first nested array holds OR conditions
      // there would be a separate nested array for each OR condition
      array(
        // the second nesting is AND conditions
        array(
          'field'     => 'field_5ed4181bd63dc', // Time field session 1 in the form
          'operator'  => '==', // If Value is different, then show the field
          'value'     => $session, // Compare against option page value
        ),
        array(
          'field'     => 'field_5ed4178dd63d7', // Datepicker fiels in the form
          'operator'  => '!=', // If Value is different, then show the field
          'value'     => $date, // Compare against option page value
        )
      ),
      array(
        // this is an example, if there was an OR condition those would go here
      )
    );