Copy link to clipboard
Copied
Hi All,
i've created a fillable PDF form. I have a drop down with a list of names and a field underneath it.
I'd like to be able to select any name from the dropdown and for the field underneath to auto populate with the signature of that person. I have all the signatures saved as images (mix of JPG and PNG files). Does the signature field need to be an image field, or text or other? I've tried googling the Java script to make this happen, but i can't quite get my head around it. Any help would be appreciated if you would know the script for this?
Thanks
Copy link to clipboard
Copied
Create a button field for each signature and name them exactly the same as the their names in the dropdown. Set the button layouts to "Icon only". Import the .png and .jpg files into the buttons so they display the signatures. Hide the button fields that contain the signatures. Assuming your image field name is "Image1_af_image" enter the following custom validation script in the dropdown:
this.getField("Image1_af_image").buttonSetIcon(this.getField(event.value).buttonGetIcon())
Copy link to clipboard
Copied
You can prepopulate image fields and then show/hide them depending on dropdown choice.
Here is an example script that would go into dropdown validate script (of course change names and image field names to your actual names:
this.getField("Image1").display = (event.value == "John Doe") ? display.visible : display.hidden;
this.getField("Image2").display = (event.value == "Jane Doe") ? display.visible : display.hidden;
Copy link to clipboard
Copied
Create a button field for each signature and name them exactly the same as the their names in the dropdown. Set the button layouts to "Icon only". Import the .png and .jpg files into the buttons so they display the signatures. Hide the button fields that contain the signatures. Assuming your image field name is "Image1_af_image" enter the following custom validation script in the dropdown:
this.getField("Image1_af_image").buttonSetIcon(this.getField(event.value).buttonGetIcon())
Copy link to clipboard
Copied
thanks for your reply, i've tried this but still can't get it to work, anything i might be missing? I've set the button field to hidden and done what you've said, but can't get it to show when i select the name from the dropdown.
Copy link to clipboard
Copied
oh it does work! But i have to click away frrom the drop down for the signature to show
Copy link to clipboard
Copied
In the options tab of the dropdown, select "Commit selected value immediatley" and the signature should appear instantly.
Copy link to clipboard
Copied
Amazing! Thank you so much.
Copy link to clipboard
Copied
You can prepopulate image fields and then show/hide them depending on dropdown choice.
Here is an example script that would go into dropdown validate script (of course change names and image field names to your actual names:
this.getField("Image1").display = (event.value == "John Doe") ? display.visible : display.hidden;
this.getField("Image2").display = (event.value == "Jane Doe") ? display.visible : display.hidden;
Copy link to clipboard
Copied
this also works thankyou
Find more inspiration, events, and resources on the new Adobe Community
Explore Now