I have a form with some input fields (6). When I click the submit button "I would like to format the URL" in such a way:
and maybe for null values: /actionname?input1|input2||input4||input6
and maybe a time-stamp for when the user clicks the submit button.
if you are using any java script library like jQuery, you can serialize the form which gives the data in query string format. ex: see here
Even if I do not see any reason why you would need this :), you can use the onSubmit event to create the proper url and redirect to it.
How about you use the XMLHTMLRequest to perform your request.
This way you also avoid stepping on the toes of the onsubmit form event.
Alternatively, a simple workaround will be to construct your URL in a string and then set the form action attribute to this string before submitting the form with the submit() method.