2

Is there a way to code "Restore Defaults" button into a plugin options page?

I'm writing a plugin right now that has sets up some default values on activation (via register_activation_hook), and I'd like to give users the option to restore those defaults again with a click. Possible?

Thanks!

0

Nevermind, answered my own question:

http://www.keyframesandcode.com/resources/javascript/jQuery/demos/populate-demo.html

Used that to update all the text and drop downs. Couldn't get it to work with my checkboxes, but a few other lines of jQuery took care of those. I like the idea of just auto filling the form with the defaults, rather than submitting it right away.

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.