You are viewing limited content. For full access, please sign in.

Question

Question

Calendar opening even though date is not first field

asked on August 12, 2016

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?

0 0

Answer

SELECTED ANSWER
replied on August 12, 2016
$('#q1 input').trigger('focus')

Where #q1 is the id of the first field

3 0

Replies

replied on August 12, 2016

Do you have any script running or are the first 5 fields lookups?

0 0
replied on August 12, 2016

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?

0 0
replied on August 12, 2016

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');

 

0 0
replied on August 12, 2016

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?

0 0
SELECTED ANSWER
replied on August 12, 2016
$('#q1 input').trigger('focus')

Where #q1 is the id of the first field

3 0
replied on August 15, 2016 Show version history

Thanks Xavier.  For those not too versed on Javascript, the full script would be:  

$(document).ready(function () {
$('#q1 input').trigger('focus') 
})

 

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.