>
> How do I insert a value to hidden form field "user_name"?
>
> <form name="myForm" id="myForm" method="post">
> <input type="hidden" name="foo" value="bar"/>
> <input type="hidden" name="user_name" value=""/>
> </form>
>
>
> jQuery('form#myForm input:hidden ???').val('fast_fish');
>
> Thats what I need:
> <input type="hidden" name="user_name" value="fast_fish"/>
jQuery("#myForm input[name='user_name']").val('fast_fish');
You can leave out the 'form' part as the ID should be unique on the page.
No comments:
Post a Comment