so I have a form and if certain fields are empty of invalid, it doesn't submit the form, and it spits out an alert()
telling them to fix it. The problem I am facing is that it resets the form and all the data the user has added disappears. Since my form is too big, I'll just show you my jQuery function:
$('#microForm').live('submit', function(){
if ($('#barcode').val() != '') {
insertForm();
} else {
alert('Insert Barcode');
return false;
}
});
<form id="microForm">
I am trying this on an android app, with phonegap - inserting a form to a local database table (i.e sqlite).
Any help would be appreciated. Thanks.