'field_clone', 'label' => __("New Field",'acf'), 'name' => __("new_field",'acf'), 'type' => 'text', )); // get name of all fields for use in field type drop down $fields_names = apply_filters('acf/registered_fields', array()); unset( $fields_names[ __("Layout",'acf') ]['tab'] ); // conditional logic dummy data $conditional_logic_rule = array( 'field' => '', 'operator' => '==', 'value' => '' ); ?>
1){ echo 'style="display:none;"'; } ?>>

'text', 'name' => 'fields[' . $fake_name . '][label]', 'value' => $sub_field['label'], 'class' => 'label', )); ?>

'text', 'name' => 'fields[' . $fake_name . '][name]', 'value' => $sub_field['name'], 'class' => 'name', )); ?>
'select', 'name' => 'fields[' . $fake_name . '][type]', 'value' => $sub_field['type'], 'class' => 'type', 'choices' => $fields_names, 'optgroup' => true )); ?>
'text', 'name' => 'fields[' . $fake_name . '][instructions]', 'value' => $sub_field['instructions'], 'class' => 'instructions', )); ?>
'radio', 'name' => 'fields[' .$fake_name . '][required]', 'value' => $sub_field['required'], 'choices' => array( 1 => __("Yes",'acf'), 0 => __("No",'acf'), ), 'layout' => 'horizontal', )); ?>
'number', 'name' => 'fields[' . $fake_name . '][column_width]', 'value' => $sub_field['column_width'], 'class' => 'column_width', 'append' => '%' )); ?>
'radio', 'name' => 'fields[' . $fake_name . '][conditional_logic][status]', 'value' => $sub_field['conditional_logic']['status'], 'choices' => array( 1 => __("Yes",'acf'), 0 => __("No",'acf'), ), 'layout' => 'horizontal', )); // no rules? if( ! $sub_field['conditional_logic']['rules'] ) { $sub_field['conditional_logic']['rules'] = array( array() // this will get merged with $conditional_logic_rule ); } ?>
> $rule ): // validate $rule = array_merge($conditional_logic_rule, $rule); // fix PHP error in 3.5.4.1 if( strpos($rule['value'],'Undefined index: value in') !== false ) { $rule['value'] = ''; } ?>
'select', 'name' => 'fields[' . $fake_name . '][conditional_logic][rules][' . $rule_i . '][operator]', 'value' => $rule['operator'], 'choices' => array( '==' => __("is equal to",'acf'), '!=' => __("is not equal to",'acf'), ), )); ?>
  • 'select', 'name' => 'fields[' . $fake_name . '][conditional_logic][allorany]', 'value' => $sub_field['conditional_logic']['allorany'], 'choices' => array( 'all' => __("all",'acf'), 'any' => __("any",'acf'), ), )); ?>
'text', 'name' => 'fields['.$key.'][row_min]', 'value' => $field['row_min'], )); ?> 'text', 'name' => 'fields['.$key.'][row_limit]', 'value' => $field['row_limit'], )); ?> 'radio', 'name' => 'fields['.$key.'][layout]', 'value' => $field['layout'], 'layout' => 'horizontal', 'choices' => array( 'table' => __("Table",'acf'), 'row' => __("Row",'acf') ) )); ?> 'text', 'name' => 'fields['.$key.'][button_label]', 'value' => $field['button_label'], )); ?>