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:

$('.quasar-form .submit-quasar-form-event').on('click', 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 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:

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

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

});