Form submission dependant on option selected
I need to change the "name" part of the <input> of a form accordingly to an option selected from a dropdown.
Please refer to the code to understand what I mean.
The form is something like this, with a submit onchange
I'm not a programmer but I'm willing to learn as I need to make it work, but please explain things to me in a human understandable way:)
<form id="myform" method="a_method" action="an_action">
<select class="field" name="name_of_select" onchange="$('myform').submit();"
<input type="hidden" name="this_name_changes_when_option_selected_changes">
Thanks a lot.