We have a form that has date field about 5 fields from the top of the form. When you load the form, it opens with the calendar opened for the date field. It seems that it is assuming the date field is the first field on the form. Any way to change this?
Question
Question
Answer
$('#q1 input').trigger('focus')
Where #q1 is the id of the first field
Replies
Do you have any script running or are the first 5 fields lookups?
Hi Xavier,
Yes, we do have look ups running on the first 5 fields. However, I tried adding a plain text field right above the date field to see if that would stop the calendar from opening but it didn't work. Have you seen this before?
I've never seen this issue, but one work around could be to force the date field to focus off. Where #q1 is the id of the date field
$('#q1 input').trigger('blur');
After un-checking setting for "Optimize form layout on mobile device". The focus is now on the field below the date. Is there a way to set the focus to the first fields even if it has a look up running?
$('#q1 input').trigger('focus')
Where #q1 is the id of the first field
Thanks Xavier. For those not too versed on Javascript, the full script would be:
$(document).ready(function () { $('#q1 input').trigger('focus') })