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.

asked Mar 29, 2018 at 14:41

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>
answered Mar 29, 2018 at 15:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.