Addable Popup: Delete Default
When I set a default for addable popup the default will load the value set in $options, which is fine. However, if I delete everything in the addable popup array the default will stay and cannot be removed.
I don't think this is the desired behavior because if you delete from a list you expect it to be gone. How can I modify this?
Which default values should the popup have?
Please give the exact steps to reproduce the problem (an option array).
So if I create a default value in an addable like below it will automatically add 1 txt object to the addable array by default. However, if I delete that txt object from the array it reappears because it loads it as default.
This is not the expected behavior because when you delete objects in an array you expect it to stay deleted. Its the same with a text option. You can set a default value in txt option where 'value'=>'hello world', but if you delete the default text you get an empty string. It doesn't and shouldn't return 'hello world' again after you deleted.
'txt_addable' =>array(
'type' => 'addable-popup',
'value' => array(
'0' => array
(
'title_txt'=>array(...),
'title_txt_size'=>array(...),
),
),
'popup-options' => array(
'title_txt' => array(...),
'title_txt_size => array(...),
),
),
https://github.com/ThemeFuse/Unyson/commit/01ba7a766babea343dd28863999c4e51e30b42a9
Could you make this same/similar update with the "addable-box" option type? It would be nice to include a default value for new posts, but also allow users to delete all values and not have the default re-populate.
Thanks!