I used this example to create my own table with configuration in admin. Now I'm trying to figure out how to preselect my saved values on page loads. I have this table now:
For preselecting this example uses _prepareArrayRow()
This is value from core_config _data:
a:4:{s:18:"_1486995392381_381";a:3:{s:12:"m2_attribute";s:16:"required_options";s:13:"chq_attribute";s:14:"CustomDecimal1";s:9:"push_once";s:5:"false";}s:18:"_1486995402858_858";a:3:{s:12:"m2_attribute";s:14:"fabric_content";s:13:"chq_attribute";s:6:"Rental";s:9:"push_once";s:4:"true";}s:18:"_1486995407176_176";a:3:{s:12:"m2_attribute";s:9:"fabricfit";s:13:"chq_attribute";s:13:"CustomNumber3";s:9:"push_once";s:4:"true";}s:17:"_1486995414029_29";a:3:{s:12:"m2_attribute";s:17:"short_description";s:13:"chq_attribute";s:17:"ItemCustomNumber6";s:9:"push_once";s:5:"false";}}
This is how unserialized value looks like:
Array
(
[_1486995392381_381] => Array
(
[m2_attribute] => required_options
[chq_attribute] => CustomDecimal1
[push_once] => false
)
[_1486995402858_858] => Array
(
[m2_attribute] => fabric_content
[chq_attribute] => Rental
[push_once] => true
)
[_1486995407176_176] => Array
(
[m2_attribute] => fabricfit
[chq_attribute] => CustomNumber3
[push_once] => true
)
[_1486995414029_29] => Array
(
[m2_attribute] => short_description
[chq_attribute] => ItemCustomNumber6
[push_once] => false
)
)
Any help will be appreciated!
core_config_data
here?core_config_data
, because, I want to make sure the saved value is corrected. I think your issue is hard to debug because your custom code is not available. It's better if you post your module on Github or here.