Skip navigation
Big $3%Y
Currently Being Moderated

Autopopulate text field based on drop down menu.

Dec 17, 2010 2:17 PM

Ok.  I know alot of people have asked questions about this but none of them seem to match what I need to do.

 

I am trying to make an equipment request order form that will be automatically filled out based upon what is selected from a drop down menu.  For example if someone selects "ACLS" text box 1 would automatically generate with "Adult CPR Maniken" and text box 2 would generate "Child CPR Maniken".  If someone was to select "PALS" text box 1 would automatically generate "Infant CPR Maniken"....and so forth.  Any help would be greatly appreciated.  I am just a Paramedic with some computer skills, not an expert by any means!

 

Thanks!

 
Replies
  • Currently Being Moderated
    Dec 17, 2010 4:54 PM   in reply to Big $3%Y

    If you define the drop-down as...

    Untitled.png

     

    You can add the following script to the drop-down exit event to populate a text field.

     

    // form1.page1.subform1.dd::exit - (JavaScript, client)

     

    form1.page1.subform1.tf.rawValue = form1.page1.subform1.dd.rawValue;

     

    Steve

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 17, 2010 7:25 PM   in reply to Big $3%Y

    OK.

     

    // form1.page1.subform1.dd::exit - (JavaScript, client)

     

    var dd = form1.page1.subform1.dd.rawValue;

    switch (dd) {

      case "ALCS":

        form1.page1.subform1.tf1.rawValue = "Adult CPR Maniken";

        form1.page1.subform1.tf2.rawValue = "Defibrilator";

        form1.page1.subform1.tf3.rawValue = "ALCS Drug Box";

        break;

      case "PALS":

        form1.page1.subform1.tf1.rawValue = "Child CPR Maniken";

        form1.page1.subform1.tf2.rawValue = "Widget";

        form1.page1.subform1.tf3.rawValue = "PALS Drug Box";

        break;

    }

     

    Steve

    Attachments:
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 23, 2012 1:27 AM   in reply to Steve L Walker

    Awesome Steve - thank you so much, you just save me alot of time I don't really have. Joanne

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points