JS events

JS events

Quasar Form generates DOM events when the form is submitted to make it easier for you to use your own scripts.

A function that will run every time the submit button is pressed:

$(document).on('click', '.submit-quasar-form-event', function(){
console.log('You action');
});

You can perform any actions in this function.

The variable that contains the submission data is arraySubmit. If the form is submitted successfully, it contains an array of all field values. If the form was not submitted the value is false.

Example of a function for processing the contents of form fields:

$(document).on('click', '.submit-quasar-form-event', function(){

if (typeof arraySubmit === 'object'){
$.each( arraySubmit, function(index,value){
console.log( value );
});
}
else { console.log( 'Form not submitted' ); }

});