Copy link to clipboard
Copied
I'm still learning JS. I would like to have a dropdown menu in a PDF form where the user selects from the dropdown but when he clicks on it, a different output occurs. Example, user selects "G2 - Security" in the dropdown but "ARNO-G2" is what's displayed on the form. Is this possible?
Yes, but why would you want to do that? It's really confusing...
The way to do it is by using a custom Format script to change the selected value into something else. In your case it would be:
if (event.value=="G2 - Security") event.value = "ARNO-G2";
Copy link to clipboard
Copied
Yes, but why would you want to do that? It's really confusing...
The way to do it is by using a custom Format script to change the selected value into something else. In your case it would be:
if (event.value=="G2 - Security") event.value = "ARNO-G2";
Copy link to clipboard
Copied
try67,
It isn't really confusing because we have a form that we have to input the Office Symbol and we don't have all of them memorized. So when a user in-processes with us, they'll know what directorate they're going to before they know what the Office Symbol is and then I have to look it up and input the Office Symbol that matches the directorate. It would be easier for them to select the directorate and then the Office Symbol is the output in the window. However, I just tried that script and nothing happened. I selected G2 - Security in the dropdown menu and instead of displaying ARNO-G2, it displayed what I selected...G2 - Security.
Copy link to clipboard
Copied
Make sure you tick the option to commit the field's selected value immediately, under its Properties - Options tab.
Copy link to clipboard
Copied
try67 It's working sir! Thank you. the problem I had was not paying "attention to detail". You stated in the original comment to use a Custom Format Script and I was putting the script in the Run custom validation script window.