So, I'm going crazy for this. I have a simple input field inside a form tag.
<body>
<form action="#">
<label>Input</label>
<input type="hidden" id="foo" name="foo" />
</form>
I tried to set his value from a js file but in the html value attribute isn't set at all.
$(document).ready(function(){
$('#foo').val('foo')
})
If I trie to set the input type to "button" or anything else, it work. I can't do it with hidden type input field. What did i do wrong??