acf_field_radio::render_field_validation_settings
Renders the field settings used in the "Validation" tab.
Метод класса: acf_field_radio{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$acf_field_radio = new acf_field_radio(); $acf_field_radio->render_field_validation_settings( $field );
- $field(массив) (обязательный)
- The field settings array.
Список изменений
| С версии 6.0 | Введена. |
Код acf_field_radio::render_field_validation_settings() acf field radio::render field validation settings ACF 6.4.2
function render_field_validation_settings( $field ) {
acf_render_field_setting(
$field,
array(
'label' => __( 'Allow Null', 'acf' ),
'instructions' => '',
'name' => 'allow_null',
'type' => 'true_false',
'ui' => 1,
)
);
acf_render_field_setting(
$field,
array(
'label' => __( 'Allow Other Choice', 'acf' ),
'name' => 'other_choice',
'type' => 'true_false',
'ui' => 1,
'instructions' => __( "Add 'other' choice to allow for custom values", 'acf' ),
)
);
acf_render_field_setting(
$field,
array(
'label' => __( 'Save Other Choice', 'acf' ),
'name' => 'save_other_choice',
'type' => 'true_false',
'ui' => 1,
'instructions' => __( "Save 'other' values to the field's choices", 'acf' ),
'conditions' => array(
'field' => 'other_choice',
'operator' => '==',
'value' => 1,
),
)
);
}