field;
$options = preg_split( "/(\r\n|\n|\r)/", $field['field_options'], -1, PREG_SPLIT_NO_EMPTY );
if ( empty( $options ) ) {
return;
}
?>
render_options( $options, $field['required'] ); ?>
$option ) {
$id = $this->get_id();
$option_id = 'optin-field-' . $id . '-' . $key;
$option_label = $option;
$option_value = $option;
$option_name = "fields[{$id}]";
$option_required = $required ? 'required' : '';
if ( false !== strpos( $option, '|' ) ) {
list( $option_label, $option_value ) = explode( '|', $option );
}
?>
>
$commons['label'],
'field_options' => [
'label' => esc_html__( 'Options', 'sellkit' ),
'type' => 'textarea',
'conditions' => [ 'terms' => [ parent::get_type_condition() ] ],
'default' => '',
'description' => esc_html__( 'Enter each option in a separate line. To differentiate between label and value, separate them with a pipe char ("|"). For example: First Name|f_name', 'sellkit' ),
],
'inline_list' => [
'label' => esc_html__( 'Inline List', 'sellkit' ),
'type' => 'switcher',
'return_value' => 'sellkit-subgroup-inline',
'conditions' => [ 'terms' => [ parent::get_type_condition() ] ],
'default' => '',
],
'required' => $commons['required'],
'width_responsive' => $commons['width_responsive'],
];
}
}