Hello,
I work on a plugin that have setting model. Have some basic fields in it, everything works fine.
Now I need to do an advanced field, a partial that will trigger an ajax method.
So I create my partial :
<button class="btn btn-primary" data-request="onCopyWebsiteContent">
My button
</button>
And I put my method on my model :
public function onCopyWebsiteContent() {
trace_log('ok');
}
My problem is, that when I click the button, I get the following error :
Ajax handler “onCopyWebsiteContent” cannot be found.
I understand why, my method should be in the controller, not the model, but in the case of a setting model, there is no controller.
How can I solve that problem ?
Thank you