SyntaxFix
Write A Post
Hire A Developer
Questions
You need to run your script after the element exists. Move the <input type="hidden" name="checkyear" id="checkyear" value=""> to the beginning.
<input type="hidden" name="checkyear" id="checkyear" value="">