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

Dropdown Box Data to populate another box

New Here ,
Aug 08, 2016 Aug 08, 2016

Hello!

I am having a hard time.  I am creating a HHP Respite Agreement for my employees.

What I need is as follows.

The employee will use the drop down box and choose the care level of the individual (Sis Level: 1 2 3 4 5 6)

What I want to happen is when the employee chooses the sis level it will automatically fill in the rate into another box

PLEASE HELP.

How can I do this

TOPICS
Acrobat SDK and JavaScript
396
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 ,
Aug 09, 2016 Aug 09, 2016

Put the rates as the export values for each item and then use a simple script to copy the value of the drop-box to the text 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
New Here ,
Aug 09, 2016 Aug 09, 2016

Thank you for the reply. How do I do 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
Community Expert ,
Aug 09, 2016 Aug 09, 2016

To apply the rates as the export values go to the Properties of the drop-down field and under the Options tab you can insert them.

It should look something like this:

(Make sure you also tick the option to commit the selected value immediately, as is shown above)

Then go to Properties of the text field and under the Calculate tab select Custom Calculation Script and enter this code (let's say the name of the dropdown is "Dropdown1"):

event.value = this.getField("Dropdown1").value;

That's it, pretty much.

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 ,
Aug 09, 2016 Aug 09, 2016

@try67

That worked perfect! Now my only problem is that, I need the populated box to export the correct amount.  As in:  When I click a level it will automatically enter in the data to the next box.  But now when i add the daily rate and multiply it by how many days.  It only multiplys the days and the export value (as shown below). As you can see, the total pay box is multipling 5 times the export of 1.

Is there a way to fix this try67​?

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 ,
Aug 09, 2016 Aug 09, 2016

Sorry, I'm not really following what you mean...

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 ,
Aug 09, 2016 Aug 09, 2016

I figured it out.  Thank you for everything......I do have one more question.....how can I have the text centered.  It automatically has it set for the left.  Do you know of a way to change that?  try67

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 ,
Aug 09, 2016 Aug 09, 2016
LATEST

In a text field or in a drop-down? In a text field you can set it under Properties - Options. For a drop-down it's not possible to do it by setting a property, but you can add spaces in front of the display names of the items in 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