What does “canRestore” attribute mean in system.xml?

The question:

Maybe someone already saw an <field> attribute canRestore="1":

<field id="provider"

Any ideas what does it mean?

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

You can show Use system value check-box to system configuration by canRestore=”1″ property in system.xml

enter image description here

Method 2

In your config.xml file, you can specify default values for the admin configuration form that you created in system.xml. If a user manually entered a value in one of those fields, they can reset the field to the default value that you specified in config.xml.

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment