I would like to keep auto-reloading (auto refreshing) the Microsoft Forms page until the message
"This form is currently not accepting responses" goes away and the form starts to accept the responses.
Please see the attached Capture1.png. When the form starts to accept the responses, the page changes to Capture2.png.
I have done some research myself and here is the javascript code I have come up with:
if (document.querySelector('div.office-form-question-body') == null)
{
location.reload();
}
Not sure if this is correct or not but this seems to work okay, it keeps refreshing the page but the problem is that it keeps refreshing it even when the Form has started to accept responses.
Could anyone suggest better code for refreshing the page until the Form is accepting the responses, based on code in the snapshots.
Thanks,