Save State Not Remembered After Browser Refresh

Support MB Group Save State Not Remembered After Browser RefreshResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46972
    Nicholas CoxNicholas Cox
    Participant

    Hi

    I have added the following field group e.g. code below. when I enable the 'save_state' => true the state of the expanded or collapsed state is not remembered when refreshing the browser. I have tried Firefox and Chrome browsers and it always reverts back to the default_state but even if I remove this then it still does not work.

    [
    	'type' => 'group',
    	'id'   => 'packaging',
    	'name' => 'product size and weight',
    	'group_title' => 'Packaging',
    	'clone' => false,
    	'collapsible' => true,
    	'default_state' => 'collapsed',
    	'save_state' => true,
    	'fields' => [
    		[
    			'type'  => 'number',
    			'name'  => 'Height',
    			'id'    => 'product_height',
    			'step'  => '.01', 
    			'placeholder'  => '',
    			'append'  => self::$productUnit,
    			//'min'  => '0',
    			//'max'  => '10000',
    			'sanitize_callback' => 'absfloat',
    			'required' => false,
    			'columns'  => 6,
    		],
    	]
    ]
    #46973
    Nicholas CoxNicholas Cox
    Participant

    i have updated to the latest versions of metabox and extensions also and have the same issue.

    #46983
    PeterPeter
    Moderator

    Hello Nick,

    The save_state setting works with the cloneable setting and on save post. It doesn't work if you reload the page or refresh the browser.

    I hope that makes sense.

    #47018
    Nicholas CoxNicholas Cox
    Participant

    Hi Peter.

    It sort of makes sense, i assumed from this that it saved the open and close state. But I guess it would be a nice feature for certain forms. thanks anyway

    Nick

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.