Skip to content

Multi_text field cannot be saved as empty if it has a default value set #3186

@antonioeatgoat

Description

@antonioeatgoat

Hello there,

I am not sure if this is a bug or if I have not very clear the expected behavior, in this case I apologize in advance.

http://support.redux.io/?id=6zivwWjrPNRqe1Q%2FzTxrmah24tzmhW7M8LxePE929%2BU8bKrNIFISI0VqNQp6BU6rhVb5Je%2BI%2Fp9j%2FD3IKIPpTg%3D%3D

I created a new section containing a multit_ext

Redux::setSection( $opt_name, array(
	'title'  => esc_html__( 'Header', 'textdomain' ),

	'fields' => array(
		array(
			'id'=>'staticblock-right-logo',
			'type' => 'multi_text',
			'title' => __('Primary navigation: near logo', 'textdomain'),
			'validate' => 'html',
			'subtitle' => __('Static blocks in the primary navigation, on the right of the logo', 'textdomain'),
			'desc' => __('You can use html tags and shortcodes here', 'textdomain'),
			'default' => array(
				'<i class="fa fa-phone"></i> +1 (555) 333 22 11'
			)
		),
	)
));

STEPS:

  1. Active the theme and the plugin
  2. You will see the field filled with the default value
  3. Leave the field empty or delete the text box and save
  4. All is fine, the field is saved as an empty field
  5. Reload the page, save again the settings and the field will contains again the default value

Please explain me what is the expected behavior, because I think that here there is bug anyway.

Thank you in advance.

P.S.: I wanted to ask this on slack before there. I requested the invite but slack says me that I have already received it, but I can't find it in the email :/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions