I have this form:
JavaScript
x
4
1
<form name="form" action="course_submit.php" onsubmit="return validateForm()" method="post">
2
3
</form>
4
And I’d like to add a few json arrays to POST in validateForm() after validation, so that when validateForm() returns true, the updated POST will be sent to course_submit.php. What’s the best wya to go about this? Thanks!
Advertisement
Answer
Have <input type="hidden" ...>
elements inside the form.
Assign the values to those elements.