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

Show or hide fields based on dropdown selection with cursor auto-located to required field

Contributor ,
Sep 02, 2022 Sep 02, 2022

Copy link to clipboard

Copied

I find myself turning to the Subject Matter Experts (SMEs) once again... I seriously don't know how y'all manage to accumulate this much arcane knowledge but a tip of my hat for your advice and all of the solutions I've found in your posts.

 

So, as my scripting knowledge is virtually non-existent, I try to keep things as simple as possible.  To that end, I've been trying to use the pulldown menu to show/hide additional fields -- based on selection -- while making the "new" field a required field and auto-locate the cursor to the said field.  By proxy, if the selection does not display the "new" field, the cursor is supposed to auto-locate to the next field in the tab order.  This is what I've tried using and while successful in the first dropdown, it was not successfull in another.  While tinkering, I've managed to make it not work in either. :S
//My working script//

if(event.value=="Other"){
this.getField("Other_01").display=visible;
this.getField("Other_01").setFocus();
}else{
this.getField("Other_01").display.hidden;
this.getField("Field_03").setFocus();
}
//

 

My sincerest thanks in advance for any and all assistance.

 

Very Respectfully,

Charlie

TOPICS
Create PDFs , How to , JavaScript , PDF forms

Views

83

Translate

Translate

Report

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
no replies

Have something to add?

Join the conversation