Populate dropdown with year values on document load
Hey Everyone,
Hoping someone can help me with this as I'm new Acrobat forms. I'm trying to populate dropdown list values in an adobe acrobat form via Javascript. Basically looking to populate it with the Current Year, and two years after it. So option values of 2018, 2019, 2020. I'm not sure how to achieve this where the dropdown is populated when the PDF is opened. Would this be done at the document level javascript ? And if so how is this initiated ?
This is what I have so far (Not sure if it's correct):
var d = new Date();
var y = d.getFullYear();
Dropdownlist1.setItems([y, y + 1, y + 2]);
Any help would be appreciated, thanks.
