Absolute form validation gives error but post form at all
I am using the absolute position form validator http://goo.gl/7wpza
I installed it correctly and it works, but there may be a bug or something. it gives errors when i click on the input field, but it posts the form at all. i mean, if i click on the input field i declared in html as required
and didnt enter anything, a red error box appears and complains that it should not be left blank, it requires some input. but when I click the submit button, without any entry, it submits the form even though it is NOT validated.
I sent to the author, but he may be busy or tired of answering questions - I didn't pay anything until there is no answer. have you ever encountered something like this? do you have any ideas?
any help is appreciated.
<form method="POST" action="addArticleMetaBody2Newdb.php" id="multiForm" >
<input class="input_box validate[required] text-input" name="Article_Doi" type="text" id="Article_Doi" ></input><br/>
<input class="input_box" name="Volume" type="text" id="Volume" ></input><br/>
<input class="input_box validate[required,custom[integer]] text-input" name="Issue" type="text" id="Issue" ></input><br/>
<input class="input_box validate[required,custom[integer]] text-input" name="fpage" type="text" id="fpage" ></input><br/>
<input class="input_box validate[required,custom[integer]] text-input" name="lpage" type="text" id="lpage"></input><br/>
<input class="input_box validate[required]" type="textbox" name="tags" ></input><br/>
<input class="input_box validate[required] text-input" type="textbox" name="categories" ></input><br/>
<input class="submit_button" type="submit" value="oluştur" id="submit" ></input>
bit of code.
source to share
Assuming your plugin works as expected, try this in jQuery:
function validate() {
if ($('#form1').validationEngine('validate') === false) {
$('#form1').validationEngine('validate');
return false;
}
In my project, this function is called by the OnClientClick attribute
submit button button and then the dialog opens when it is true and terminates any Javascript / jQuery or code execution.
If you are using this solution, you should place the operator return false
on the next click like this:
OnClientClick="openDialogIfVisited(); return false;"
source to share