Copy link to clipboard
Copied
Expensive, good afternoon.
I am creating a material request form with 08 columns and 10 rows. The first column refers to the materials, where I created a drop-down list with 534 lists. Each item has a code. I want to click on an item in the drop-down list and the code for this item appears in the second column in a text field. How to do this? And getting, I want to repeat this dropdown list and text field in the 10 lines. it's possible?
Hugs, Berg
Copy link to clipboard
Copied
Here are some articles that cover the details of scripting lists, and they have sample files.
https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm
https://acrobatusers.com/tutorials/list_and_combo_in_lc
https://acrobatusers.com/tutorials/change_another_field
Copy link to clipboard
Copied
To access the files and tutorials of PDFScripting.com, only if it is a member?
How do I access these files if I am a member of the site?
Copy link to clipboard
Copied
Most of the detailed scripts, videos, tools, sample files, etc. are for members only. But all the basic info about each topic is free. In fact, the list handling page linked provides quite a bit of material, including the answer to your questions, which is that the field value of the list is the export value of the selected item. So just add this to the format or validate script of the dropdown.
this.getField("TextField").value = event.value;
Where "TextField" is the field you want the value displayed in.
Copy link to clipboard
Copied
You will be using custom JavaScript code for this, so field naming can make this task easier or harder.
For on row. Assuming the drop down field is maned "Item" and the text field is named "Code". for the Action "On Blur" add the following JavaScript:
this.getField("Code").value = event.value;
One can also have the code change as one moves up or down the list of items. Set the option for the dropd own to "Commit selected value immediately". Then add the following cod to the "Custom keystroke":
if(event.willCommit != true) {
this.getField("Code").value = event.changeEx;
}