I have code like the following in an external script:
var contentID = $('#ContentID').val();
How can I set up on my form a hidden field with an ID of “#ContentID” and a value of for example 99? I just want the value to always be 99 on that form and the value will never change.
Provided you have a form like this:
you can do somethign like this:
Live example: