I would like to use form script on framework7 app.
I have my form on a page displayed by route.js
I have my javascript action on route.js
When I click on button, the alert is displayed two times, I don’t know why.
Here is my Route.js :
{
path: '/contact_catalogue/',
url: './pages_pro/contact_catalogue.html',
on: {
pageInit: function (e, page) {
$$('.convert-form-to-data').on('click', function(){
var formData = app.form.convertToData('#my-form');
alert(JSON.stringify(formData));
});
},
},
},
Here is my contact_catalogue.html :