I have a list of elements printed with a field
type='checkboxes' but when I try to save only one of the results saved.
As a solution to this problem, we tried to print each element with a checkbox and so Magento saves it in the database as a single row.
Right now we have an array with the data and what we need is to loop through them as a field in the
system.xml is like that:
<field id="cmspage" translate="label comment" type="checkboxes" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Lista pagine</label> <source_model>[vendor]\PersonalMenu\Model\Adminhtml\System\Config\Source\Cms\Cms</source_model> <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model> </field>
source_model give in the output the array
backend_model the file where we can set the loop?
Or are there some other ways to customize a module settings page with all the elements dynamically showed?
P.S. sorry for my English