Skip to main content
Known Participant
February 9, 2018
Question

Select item in check box and appears typed in text field

  • February 9, 2018
  • 2 replies
  • 711 views

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?

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
February 9, 2018

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.

try67
Community Expert
Community Expert
February 9, 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)?

BergLinoAuthor
Known Participant
February 9, 2018

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