5

In the magento backend under Stores -> Configuration some of the fields have the "Use system value" checkbox next to them and some don't have it.

enter image description here

Checking the checkbox "restores" the field to the default value (which is defined in module's config.xml file).

How can I implement this "Use system value" checkbox in a custom module? Is it possible?

When I add custom config fields to my module, they don't have this "Use system value" checkbox.

1 Answer 1

6

canRestore property

etc/adminhtml/system.xml

<field id="some" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
    ...
</field>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.