I want to automatically populate a hidden form element with the value of what is entered in a single line text field in a form when submitted. How would this be done with jQuery? Thanks for any suggestions.
<form>
<input type="hidden" id="username" name="username" value="" />
<input type="text" id="email" name="email" value="[email protected]" />
<input type="submit" value="Submit" class="submit" />
</form>