lcollong
FabriKant d'applications web
Hi,
I have a search form with submit and reset buttons displayed.
Everything works as expected. The reset button "cleans" the fields to their original values.
But I need to do some other stuff (reset session vars) when clicking on the reset button.
I've added the following to a file named /js/form_xx.js where xx is my form id but it is never triggered.
Am I wrong ? Did someone succeed doing something similar ?
Any advice welcome.
I have a search form with submit and reset buttons displayed.
Everything works as expected. The reset button "cleans" the fields to their original values.
But I need to do some other stuff (reset session vars) when clicking on the reset button.
I've added the following to a file named /js/form_xx.js where xx is my form id but it is never triggered.
Am I wrong ? Did someone succeed doing something similar ?
Any advice welcome.
JavaScript:
requirejs(['fab/fabrik'], function() {
Fabrik.addEvent('fabrik.form.reset', function(form){
console.log('yeah !');
});
});