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

if Text

Explorer ,
Mar 30, 2016 Mar 30, 2016

I have Text1 Text2 Text3 and Text4

if Text1 has the values 1-7 (comb of 1 character) and Text2 the values 01-98 (comb of 2 characters) then we will go to Text3

if Text1 has the values 0 (comb of 1 character) and Text2 the values 00 (comb of 2 characters) then we will go to Text4

help

Thanks

TOPICS
Acrobat SDK and JavaScript
611
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 , Mar 30, 2016 Mar 30, 2016

I'll give you an example for the script you should use for Text1 and you can extrapolate from that for the rest of the fields:

var t2 = Number(this.getField("Text2").value);

if (event.value>=1 && event.value<=7 && t2>=1 && t2<=98) this.getField("Text3").setFocus();

Translate
Community Expert ,
Mar 30, 2016 Mar 30, 2016

You can easily adjust the example I gave in your other thread (if) to achieve that...

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
Explorer ,
Mar 30, 2016 Mar 30, 2016

the problem is that i want Text1 and Text2 have values together,not only one of them .For example Text1=5 and Text2=09 or Text1=0 and Text2=00

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
Explorer ,
Mar 30, 2016 Mar 30, 2016

both

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 ,
Mar 30, 2016 Mar 30, 2016
LATEST

I'll give you an example for the script you should use for Text1 and you can extrapolate from that for the rest of the fields:

var t2 = Number(this.getField("Text2").value);

if (event.value>=1 && event.value<=7 && t2>=1 && t2<=98) this.getField("Text3").setFocus();

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