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

Select item in check box and appears typed in text field

Participant ,
Feb 09, 2018 Feb 09, 2018

Folks,

I have a selection box with the following items to select: Low, Medium and High. I also have a text box where I want the following to appear.

When selecting the item "Low" in the check box, the text box should read "Level 1: Contract manager performs Local Investigation"

When selecting the "Medium" item in the check box, the text box should read "Level 2: Operational manager conducts research in the contract"

When selecting the item "High" in the check box, the text box should read "Level 3: Contract Director / Independent Investigation"

Is there a possibility?

TOPICS
Acrobat SDK and JavaScript
636
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 ,
Feb 09, 2018 Feb 09, 2018

Sure, it's possible, but do you want the field to only have one of these values, or should it be possible to edit it freely (for example, if no check-box is ticked)?

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
Participant ,
Feb 09, 2018 Feb 09, 2018

I want you to have one of the values when selecting the item and that someone can not edit. It should be fixed.

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 ,
Feb 09, 2018 Feb 09, 2018
LATEST

OK. Let's say the drop-down field is called "Dropdown1". Use this code as the custom calculation script of the text field:

var v1 = this.getField("Dropdown1").valueAsString;

if (v1=="Low") event.value = "Level 1: Contract manager performs Local Investigation";

else if (v1=="Medium") event.value = "Level 2: Operational manager conducts research in the contract";

else if (v1=="High") event.value = "Level 3: Contract Director / Independent Investigation";

else event.value = "";

Set the text field as read-only, so its value can't be changed by the user.

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