Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need a javascript for not have to tap to go to next field

New Here ,
Nov 03, 2018 Nov 03, 2018

I need a javascript for the client to not have to tab to go to the next field. Example; text field limit to one character and when clients enter the character it should go automatically to the next text field. Can someone please help?

TOPICS
Acrobat SDK and JavaScript
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 03, 2018 Nov 03, 2018

I recently answered a very similar question. See: Skipping charaters between linked boxes on form - Adobe Acrobat PDF

Translate
LEGEND ,
Nov 03, 2018 Nov 03, 2018

Have you searched for "autotab" or "gonext"?

JavaScript - setFocus Method for tabbing to next form field

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2018 Nov 03, 2018

I recently answered a very similar question. See: Skipping charaters between linked boxes on form - Adobe Acrobat PDF

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2018 Nov 03, 2018

I am very new to the javascript.....myne does not work. What am I doing wrong?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2018 Nov 03, 2018

Seems fine. What happens when you try to use it? Also, where did you place the code?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2018 Nov 03, 2018

On the field self:

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2018 Nov 03, 2018

Read the discussion in that thread more carefully. It needs to be the field's custom Keystroke script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2018 Nov 03, 2018

Oooo okey let me try again thank you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2018 Nov 03, 2018

No this is not my lucky day today nothing works...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2018 Nov 03, 2018

Press Ctrl+J and see if there are any error messages in the console window.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2018 Nov 03, 2018

Also, did you set that field to have a character limit of 1?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2018 Nov 04, 2018

Hi Yes I set up a character limit of 1. here is the error messages

TypeError: this.getField(...) is null

1:Field:Validate

TypeError: this.getField(...) is null

1:Field:Mouse Up

TypeError: this.getField(...) is null

1:Field:Validate

TypeError: this.getField(...) is null

1:Field:Mouse Up

TypeError: this.getField(...) is null

1:Field:Mouse Up

TypeError: event.target is undefined

1:Console:Exec

undefined

TypeError: this.getField(...) is null

1:Field:Validate

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2018 Nov 04, 2018

Those errors mean you entered the wrong field name. Keep in mind that JS is

case-sensitive!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2018 Nov 04, 2018

I have copy and past the JS code. If you say it is case sensitive do you mean the code or the field it self?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2018 Nov 04, 2018

All of it.

If you can't figure it out share the file with us and I'll look into it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2018 Nov 04, 2018

Anytime but where do I share it here?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2018 Nov 04, 2018

Should I custom JS each text field with the code then:

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2018 Nov 04, 2018

Yes, that is expected, as I noted in the other discussion... Again, you should read it carefully.

If you want to share it upload it to a website like Dropbox, Google Drive, etc., and post the link to it here.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2018 Nov 04, 2018
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2018 Nov 04, 2018

I looked under "Costing1_2":

- You didn't place the code in the right location (you left it as a Mouse Up script)

- You can't use the Number format if you want to do it. You have to change it to Custom and then enter the code under the Keystroke event.

If you do both of those things it will work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2018 Nov 04, 2018

What should the mouse be? Thank you so much for helping

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2018 Nov 04, 2018

Is it possible for you to just do this explanation on the Costing1_2 so that I can understand. I think if i see the output it will click but i at this stage I don't

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2018 Nov 04, 2018

Don't add anything under Mouse Up.

Here's the edited version I created:

https://drive.google.com/open?id=1JHdLDTbIS8UsLxS4KM3icI6iJnUB94RM

I remind you that you won't see anything under the field's Format tab, but

the code is there.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2018 Nov 04, 2018

Thank you very much I understand of not seeing it but did do it before. Do you think my JS settings is correct for running scrips because yours work 100% but when I am doing it does nothing. I copied the Costing1_2 to the others and same thing with me it did not worked:

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2018 Nov 04, 2018

The preferences are fine.

What did you copy, exactly?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines