: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$fld = $this->field_element(
'slug' => 'choices_images',
'value' => isset( $field['choices_images'] ) ? '1' : '0',
'desc' => esc_html__( 'Use image choices', 'wpforms-lite' ),
'tooltip' => esc_html__( 'Check this option to enable using images with the choices.', 'wpforms-lite' ),
$output = $this->field_element(
'slug' => 'choices_images',
'class' => ! empty( $field['dynamic_choices'] ) ? 'wpforms-hidden' : '',
'content' => $note . $fld,
case 'choices_images_style':
$lbl = $this->field_element(
'slug' => 'choices_images_style',
'value' => esc_html__( 'Image Choice Style', 'wpforms-lite' ),
'tooltip' => esc_html__( 'Select the style for the image choices.', 'wpforms-lite' ),
$fld = $this->field_element(
'slug' => 'choices_images_style',
'value' => ! empty( $field['choices_images_style'] ) ? esc_attr( $field['choices_images_style'] ) : 'modern',
'modern' => esc_html__( 'Modern', 'wpforms-lite' ),
'classic' => esc_html__( 'Classic', 'wpforms-lite' ),
'none' => esc_html__( 'None', 'wpforms-lite' ),
$output = $this->field_element(
'slug' => 'choices_images_style',
'content' => $lbl . $fld,
'class' => ! empty( $field['choices_images'] ) ? '' : 'wpforms-hidden',
$fld = $this->field_element(
'slug' => 'choices_icons',
'value' => isset( $field['choices_icons'] ) ? '1' : '0',
'desc' => esc_html__( 'Use icon choices', 'wpforms-lite' ),
'tooltip' => esc_html__( 'Enable this option to use icons with the choices.', 'wpforms-lite' ),
$output = $this->field_element(
'slug' => 'choices_icons',
'class' => ! empty( $field['dynamic_choices'] ) ? 'wpforms-hidden' : '',
case 'choices_icons_color':
$lbl = $this->field_element(
'slug' => 'choices_icons_color',
'value' => esc_html__( 'Icon Color', 'wpforms-lite' ),
'tooltip' => esc_html__( 'Select an accent color for the icon choices.', 'wpforms-lite' ),
$icon_color = isset( $field['choices_icons_color'] ) ? wpforms_sanitize_hex_color( $field['choices_icons_color'] ) : '';
$icon_color = empty( $icon_color ) ? IconChoices::get_default_color() : $icon_color;
$fld = $this->field_element(
'slug' => 'choices_icons_color',
'fallback-color' => $icon_color,
'slug' => 'choices_icons_color',
'content' => $lbl . $fld,
'class' => ! empty( $field['choices_icons'] ) ? [ 'color-picker-row' ] : [ 'color-picker-row', 'wpforms-hidden' ],
case 'choices_icons_size':
$lbl = $this->field_element(
'slug' => 'choices_icons_size',
'value' => esc_html__( 'Icon Size', 'wpforms-lite' ),
'tooltip' => esc_html__( 'Select icon size.', 'wpforms-lite' ),
$raw_icon_sizes = wpforms()->get( 'icon_choices' )->get_icon_sizes();
foreach ( $raw_icon_sizes as $key => $data ) {
$icon_sizes[ $key ] = $data['label'];
$fld = $this->field_element(
'slug' => 'choices_icons_size',
'value' => ! empty( $field['choices_icons_size'] ) ? esc_attr( $field['choices_icons_size'] ) : 'large',
'options' => $icon_sizes,
'slug' => 'choices_icons_size',
'content' => $lbl . $fld,
'class' => ! empty( $field['choices_icons'] ) ? '' : 'wpforms-hidden',
case 'choices_icons_style':
$lbl = $this->field_element(
'slug' => 'choices_icons_style',
'value' => esc_html__( 'Icon Choice Style', 'wpforms-lite' ),
'tooltip' => esc_html__( 'Select the style for the icon choices.', 'wpforms-lite' ),
$fld = $this->field_element(
'slug' => 'choices_icons_style',
'value' => ! empty( $field['choices_icons_style'] ) ? esc_attr( $field['choices_icons_style'] ) : 'default',
'default' => esc_html__( 'Default', 'wpforms-lite' ),
'modern' => esc_html__( 'Modern', 'wpforms-lite' ),
'classic' => esc_html__( 'Classic', 'wpforms-lite' ),
'none' => esc_html__( 'None', 'wpforms-lite' ),
'slug' => 'choices_icons_style',
'content' => $lbl . $fld,
'class' => ! empty( $field['choices_icons'] ) ? '' : 'wpforms-hidden',
$value = ! empty( $field['default_value'] ) || ( isset( $field['default_value'] ) && '0' === (string) $field['default_value'] ) ? esc_attr( $field['default_value'] ) : '';
$tooltip = esc_html__( 'Enter text for the default form field value.', 'wpforms-lite' );
$toggle = '<a href="#" class="toggle-smart-tag-display toggle-unfoldable-cont" data-type="other"><i class="fa fa-tags"></i><span>' . esc_html__( 'Show Smart Tags', 'wpforms-lite' ) . '</span></a>';
$output = $this->field_element(
'slug' => 'default_value',
'value' => esc_html__( 'Default Value', 'wpforms-lite' ),
'after_tooltip' => $toggle,
$output .= $this->field_element(
'slug' => 'default_value',
$output = $this->field_element(
'slug' => 'default_value',
$value = ! empty( $field['size'] ) ? esc_attr( $field['size'] ) : 'medium';
$class = ! empty( $args['class'] ) ? esc_html( $args['class'] ) : '';
$tooltip = esc_html__( 'Select the default form field size.', 'wpforms-lite' );
'small' => esc_html__( 'Small', 'wpforms-lite' ),
'medium' => esc_html__( 'Medium', 'wpforms-lite' ),
'large' => esc_html__( 'Large', 'wpforms-lite' ),
if ( ! empty( $args['exclude'] ) ) {
$options = array_diff_key( $options, array_flip( $args['exclude'] ) );
$output = $this->field_element(
'value' => esc_html__( 'Field Size', 'wpforms-lite' ),
$output .= $this->field_element(
$output = $this->field_element(
* Advanced Options markup.
$markup = ! empty( $args['markup'] ) ? $args['markup'] : 'open';
if ( $markup === 'open' ) {
$override = apply_filters( 'wpforms_advanced_options_override', false );
$override = ! empty( $override ) ? 'style="display:' . $override . ';"' : '';
$output = sprintf( '<div class="wpforms-field-option-group wpforms-field-option-group-advanced" id="wpforms-field-option-advanced-%s" %s>', wpforms_validate_field_id( $field['id'] ), $override );
$output .= sprintf( '<a href="#" class="wpforms-field-option-group-toggle">%s</a>', esc_html__( 'Advanced', 'wpforms-lite' ) );
$output .= '<div class="wpforms-field-option-group-inner">';
$output = '</div></div>';
$class = ! empty( $args['class'] ) ? esc_html( $args['class'] ) : '';
$value = ! empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
$tooltip = esc_html__( 'Enter text for the form field placeholder.', 'wpforms-lite' );
$output = $this->field_element(
'value' => esc_html__( 'Placeholder Text', 'wpforms-lite' ),
$output .= $this->field_element(
$output = $this->field_element(
$value = ! empty( $field['css'] ) ? esc_attr( $field['css'] ) : '';
$tooltip = esc_html__( 'Enter CSS class names for the form field container. Class names should be separated with spaces.', 'wpforms-lite' );
if ( $field['type'] !== 'pagebreak' ) {
$toggle = '<a href="#" class="toggle-layout-selector-display toggle-unfoldable-cont"><i class="fa fa-th-large"></i><span>' . esc_html__( 'Show Layouts', 'wpforms-lite' ) . '</span></a>';
$output = $this->field_element(
'value' => esc_html__( 'CSS Classes', 'wpforms-lite' ),
'after_tooltip' => $toggle,
$output .= $this->field_element(
$output = $this->field_element(
$value = isset( $field['label_hide'] ) ? $field['label_hide'] : '0';
$tooltip = esc_html__( 'Check this option to hide the form field label.', 'wpforms-lite' );
$output = $this->field_element(
'desc' => esc_html__( 'Hide Label', 'wpforms-lite' ),
$output = $this->field_element(
'class' => ! empty( $args['class'] ) ? wpforms_sanitize_classes( $args['class'] ) : '',
$value = isset( $field['sublabel_hide'] ) ? $field['sublabel_hide'] : '0';
$tooltip = esc_html__( 'Check this option to hide the form field sublabel.', 'wpforms-lite' );
$output = $this->field_element(
'slug' => 'sublabel_hide',
'desc' => esc_html__( 'Hide Sublabels', 'wpforms-lite' ),
$output = $this->field_element(
'slug' => 'sublabel_hide',
'class' => ! empty( $args['class'] ) ? wpforms_sanitize_classes( $args['class'] ) : '',