April 7, 2005 at 10:28 pm #251119
It has been over 11 years since this question was first asked. Has there been any changes in Lectora (I am using version 16.1.2) to allow you to have the cursor automatically show in an entry field and ready to type?
Thanks!June 21, 2016 at 4:15 pm #319608
11 years and no one answered this? HeHe, only kidding. Here you go.
Attached example is in v12 but it works fine in 16.1.2 as well.This post has received 1 vote up.
Attachments:June 21, 2016 at 4:24 pm #319612
Thank you for your quick response Darrel!
Question…the page I am working on is like a flash card exercise. I have 12 Fill-in-the-blank questions. You click a button to get the “card” to show. You type in your answer, click submit, then the question hides while feedback appears. If the question was answered correctly, the button is disabled.
You click another button to show another card.
Can I apply the fix once to focus on all the entry fields as they appear or do I need to create one for each entry field?
Thanks!June 21, 2016 at 4:44 pm #319616
If I am understanding you correctly you would need to apply the script as the second action of each button. The first will show the card with with the entry field, the second sets focus to the entry field. Make sure the set focus action on the button is targeting the correct entry field. I’d like to hear how you make out.
Oh, if you’re comfortable using jQuery, there may be a more elegant way of handling this using a ‘begins with’ selector but I think the above will work good for you easy enough.June 22, 2016 at 8:30 am #319686
Now, is there a way to set the entry field to accept pressing the enter key on your keyboard to submit the question? Thanks again!
I just did a search and found the answer…so nevermind 🙂
June 22, 2016 at 1:11 pm #319730
- This reply was modified 3 years, 11 months ago by Vicki .
Awesome, glad you have everything working!June 27, 2016 at 7:20 am #320282
Elizabeth DaltonMember2 pts@edalton8468
Hi Vicki, what was the answer to this? I’m looking to set an entry field so that the entry will submit when enter is clicked on keyboard too.July 6, 2016 at 11:55 am #321111
I apologize for the delay in responding. I was out of town for a week then the holiday weekend.
At the page level, I added an action to:
On Keystroke <Enter> Process Question <target> IF Question is not empty
I have one of these actions for each question on the page.
I hope this works for you!January 9, 2018 at 6:13 pm #381980
Roz SchwartzMember13 pts@rgs55
@ Darrel Somoza: You are a lifesaver!! This worked great. Just as a matter of info, I’m using a fill-in-the-blank question (vs. a form and field) and it works fine for that entry field, too. I can now remove that aura of disappointment from my client! LOL.
- This reply was modified 2 years, 4 months ago by Roz Schwartz.
You must be logged in to reply to this topic.