So I'm trying to set the value of a google form w/ this line of javascript run in developer console:
document.getElementById('entry_1203347772').value = "21:30";
But it results in this error message here:
Uncaught TypeError: Cannot set property 'value' of null
at <anonymous>:1:51
...but if I click inspect then into a field in the form and then run the javascript in console, then it works!
Any ideas as to how to get it to work w/o having to first click into (inspect) the form?
As far as I can tell the html form structure does not change by clicking into it, and the form element w/ the id "entry_1203347772" does exist before I click into it.
<input type="time" name="entry.1203347772" value="" class="ss-q-time required" dir="auto" id="entry_1203347772" aria-label="Shift Start Time What time did your shift start? Please note the appropriate AM/PM designator along with the time. " aria-required="true" required="">
There is an entire section of <html>and a 2nd <body> tag below a #document (virtual element) that cannot be accessed by javascript for some reason. I have yet to find a solution in the "duplicate question" answers as most of them have to do w/ the script being run too early, I'm running it when it's completely loaded in console chrome developer.