I created a common form and put button
where I had to call a JavaScript for a certain situation and button
could not be type='submit'
. Then I put it as type='button'
, I called the JavaScript function and to submit it is done, at the end of the condition, I put a $('#form').submit();
.
So long beauty ...
The problem is that the fields I put as required
in HTML are no longer being validated and are able to go blank.
Would anyone have a solution to this problem?