Simplify the custom form javascript

This PR makes the javascript able to submit any number of form inputs without requiring an update to the script.