Hello,
I'm writing a plugin that have some settings. I could create the Settings model, defined some fields, works well.
One of my field is a button that should trigger a function when I click on it. I thought I could put a data-request="onReset" on my button, and to put this code on my settings model :
public function onReset() {
trace_log('test');
}
the problem is that, when I click on my button, it display an error popup : "Ajax handler "onReset()" cannot be found"
What do I miss ? Where should I put my onReset function ? I already used the ajax framework on my theme easily, by putting my function in the code tab of my cms page. Where to put that code when you want to do the same thing on backend setting page ?
Thank you
Alex