name = 'true_false';
$this->label = __('True / False', 'cfs');
}
function html( $field ) {
$field->value = ( 0 < (int) $field->value ) ? 1 : 0;
?>
|
|
create_field( array(
'type' => 'text',
'input_name' => "cfs[fields][$key][options][message]",
'value' => $this->get_option( $field, 'message' ),
) );
?>
|
|
|
create_field(array(
'type' => 'true_false',
'input_name' => "cfs[fields][$key][options][required]",
'input_class' => 'true_false',
'value' => $this->get_option( $field, 'required' ),
'options' => array( 'message' => __( 'This is a required field', 'cfs' ) ),
));
?>
|