Copy link to clipboard
Copied
Hi guys! I'm working for a Medical Care Center and I have to create a PDF file which has to contain some form fields. I've managed to create most of these fields but I got stuck at a dropdown menu. The dropdown menu contains the names of 83 employees. Each employee has a unique 6 numbers code. I'd like these code to automatically appear in another field based on the selection a make in the drop down menu field. Is there a way to do this without scripts? I'm not a programmer and have no programming abilities. I’m working in Adobe Acrobat Pro DC!
You can do it using a very simple script.
Basically what you need to do is set the export value of each item in your drop-down to the code corresponding to that person and then use this code as the custom calculation script of the text field (replace "Employee" in the code with the actual field name, of course):
event.value = this.getField("Employee").valueAsString;
PS. You should also enable the option to commit the selected value immediately in the drop-down field. You'll find it under the field'
...Copy link to clipboard
Copied
You can do it using a very simple script.
Basically what you need to do is set the export value of each item in your drop-down to the code corresponding to that person and then use this code as the custom calculation script of the text field (replace "Employee" in the code with the actual field name, of course):
event.value = this.getField("Employee").valueAsString;
PS. You should also enable the option to commit the selected value immediately in the drop-down field. You'll find it under the field's Properties, Options tab.
Copy link to clipboard
Copied
Aaa... ok.. it seems so easy when I read it and I'm sure it is but how do I set this "export value" of every item in the dropdown menu? I mean I know I'll have to insert this code somewhere but where does this magical place rest ?
Copy link to clipboard
Copied
When you add an item to the drop-down field there are two fields available: Item and Export Value. The former is the name, in your case, and the latter is the code. So it will look something like this:
The code I provided should be placed in the third option of the Calculate tab of the code text field.
Copy link to clipboard
Copied
Magical I was just writing back to tell you that I found it. Thanks man, you're great!
Copy link to clipboard
Copied
Hi there! Well.. sorry to bother again but it seems that I'm stuck again. I can't manage to work with this. I'm attaching the file to this post and maybe you could just make only one option/selection to work then reattach the file and I'll just repeat the steps you did based on the script. So I have the dropdown menu field with the names and the export value corresponding to each name already completed. Now I just need the right script for the "COD PARAFA" field to show the export value of a selected name from the "MEDIC" drop down menu. Thank you in advance!
http://www.filehosting.org/file/details/605100/Fise%20pacienti%20intreg.pdf​
Copy link to clipboard
Copied
Please use a file-sharing website like Dropbox or Google Drive. I'm not going to give my email address to some unknown website.
If you prefer you can email it to me directly to try6767 at gmail.com.
Copy link to clipboard
Copied
Ohh.. you're right, try this instead https://drive.google.com/open?id=0B_B9UjWHTBpyRUFiZ0dUTU5qZms
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You Sir are awesome! I thoght it would be much more difficult but it was actually so simple. THANK YOU SO MUCH! I shall bother you no more on this issue
Thread closed!