|
|
'text',
'name' => 'fields[' .$fake_name . '][label]',
'value' => $field['label'],
'class' => 'label',
));
?>
|
|
|
'text',
'name' => 'fields[' .$fake_name . '][name]',
'value' => $field['name'],
'class' => 'name',
));
?>
|
|
|
'select',
'name' => 'fields[' .$fake_name . '][type]',
'value' => $field['type'],
'choices' => $field_types,
));
?>
|
|
|
'textarea',
'name' => 'fields[' .$fake_name . '][instructions]',
'value' => $field['instructions'],
));
?>
|
|
'radio',
'name' => 'fields[' .$fake_name . '][required]',
'value' => $field['required'],
'choices' => array(
1 => __("Yes",'acf'),
0 => __("No",'acf'),
),
'layout' => 'horizontal',
));
?>
|
|
'radio',
'name' => 'fields['.$field['key'].'][conditional_logic][status]',
'value' => $field['conditional_logic']['status'],
'choices' => array(
1 => __("Yes",'acf'),
0 => __("No",'acf'),
),
'layout' => 'horizontal',
));
// no rules?
if( ! $field['conditional_logic']['rules'] )
{
$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['.$field['key'].'][conditional_logic][rules][' . $rule_i . '][operator]',
'value' => $rule['operator'],
'choices' => array(
'==' => __("is equal to",'acf'),
'!=' => __("is not equal to",'acf'),
),
));
?>
|
|
|
- 'select',
'name' => 'fields['.$field['key'].'][conditional_logic][allorany]',
'value' => $field['conditional_logic']['allorany'],
'choices' => array(
'all' => __("all",'acf'),
'any' => __("any",'acf'),
),
)); ?>
|
|
|