Skip to content

Adding POST parameters after form submit

I have this form:

<form name="form" action="course_submit.php" onsubmit="return validateForm()" method="post">

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!



Have <input type="hidden" ...> elements inside the form.

Assign the values to those elements.

User contributions licensed under: CC BY-SA
10 People found this is helpful