I have a form which has 3 buttons:
<input type='submit' name='mconfirm' value=' Confirm '>
<input type='submit' name='modify' value=' Modify '>
<input type='button' name='cancel' value=' Cancel ' onClick='goVachSub();'></td></tr>
The form also does something along the lines of:
<form name='achievement_modify' method='post' onSubmit='return check_num();' action='".$_SERVER['PHP_SELF']."'>
When either submit buttons are pressed, the check_num() function is run which some checks against some requirements happens. However, I do not need these checks to run when the modify button is pressed, however I still have the modify button as a submit button because of the action='".$_SERVER['PHP_SELF'] which retains all my forms data.
I am looking for a way to either modify check_num such that if it can figure out that modify was pressed on submit, it will not execute the check_num code. Change it such that it is something like: if modifyPressed, do nothing. else check_num code. Or change modify such that it isn't a submit button still able to retain form data.
What actually happens in my form is it has a bunch of text and drop downs, then the user would submit it. The inputted data would be displayed again and then the three mentioned buttons would appear (Confirm, Modify, Cancel) and Modify should take it back to the text and drop downs again with the data intact.