SyntaxFix
Write A Post
Hire A Developer
Questions
$('input[name=hidden_field_name]').val('newVal');
worked for me, when neither
$('input[id=hidden_field_id]').val('newVal');
nor
$('#hidden_field_id').val('newVal');
did.