I need a button in my custom system.xml to do Ajax call. How can this be achieved? or how can I link a JS file into my system.xml?


I think frontend_model will be your friend to achieve your requirement.

Just look at Validate VAT Number example from store > configuration > general > Store Information.

In this example magento using below frontend_model


Just look at this file, you will definitely get the idea how to achieve this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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