• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Assign Value to Signer's Email from Data File

Community Beginner ,
Oct 23, 2018 Oct 23, 2018

Copy link to clipboard

Copied

Hello. I am using javascript to read a data file to populate and save a large number of PDF forms (about 2000). The script works perfectly and populates the form fields with the data in the file. I then need to send each form out to be signed (using Adobe sign). This works perfectly as well. However, I would like to pre-populate the Signer's Email in the Signature field using the signers_email from the data file as each form is created from the data file.

I cannot figure out how to do this in the Javascript. Right now I have to enter the email address from Adobe Sign. This is tedious AND may lead to typos! Any ideas?

Thank you!

PS If I manually enter the Sender's Email in the field properties (directly) and then access Adobe Sign, the email address is auto-populated in the To: line. So...how do I programmatically assign a value to the Sender's Email field (via Javascript) using signers_email from data file?

Manually entered Signer's Email in Field Properties

Adobe Send automatically populates To: field.


TOPICS
Acrobat SDK and JavaScript

Views

321

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2018 Oct 23, 2018

Copy link to clipboard

Copied

The problem is probably that you're using the wrong field name when setting the field value via JavaScript. To see what the actual field name is, go into form editing mode and the complete field name will show in the list of fields in the right-hand panel. It will be something like: Em_es_:signer1 or Em_es_:signer1:email

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 23, 2018 Oct 23, 2018

Copy link to clipboard

Copied

Hello George - thank you for your response. I have tried that and other variations of the field name. I believe Signer's Email is a 'property' of the electronic signature field (in this example named Em). I cannot determine how to a) extract the value that is in the Signer's Email 'property' (in this example it would be someone@yahoo.com), nor can I figure out how to assign a value to it. I have found documentation stating that Em_es_:signer1:email is in fact "a field containing the signer’s email address".

I have tried more ways than I can count to extract the 'someone@yahoo.com' value:

sender_email = this.getField("Em").value

I have searched for hours on Google for an example - surely someone has done this.

Another item of interest - if I extract the data (using Extract Data tool) from the form to a file there is nothing in the Em_es_:signer1:email field - even though someone@yahoo.com is in the Signer's Email (as shown in the screenshot above).

I guess I will have to enter the email address in the To: field for each form I send via Adobe Sign.

Thanks again for your response. It is appreciated!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2018 Oct 23, 2018

Copy link to clipboard

Copied

Did you look at the field name as it's shown in the list of fields in the right-hand panel like I suggested?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2018 Oct 23, 2018

Copy link to clipboard

Copied

It turns out Adobe is using a proprietary means to store the email address that you enter via that dialog that you show. It is not a property of the field, such as the value, but something that's stored apart from the field dictionary. There's no documented JavaScript-based method that I'm aware of that will let you set the email address.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 23, 2018 Oct 23, 2018

Copy link to clipboard

Copied

LATEST

George - sorry my last response got sent before I finished / edited it - I see you have addressed most of what I have stated below (re: properties) but thought I'd send it anyway.   Thanks Again!!

Hello George - thank you for your response. Yes you are correct and I have used that field name. I believe Signer's Email is a 'property' of the electronic signature field (in this example named Em). I cannot determine how to a) extract the value that is in the Signer's Email 'property' (in this example it would be someone@yahoo.com), nor can I figure out how to assign a value to it. I have found Adobe documentation stating that Em_es_:signer1:email would in fact be "a field named Em containing the signer’s email address".

However when I use this javascript:

this.getField("Em_es_:signer1:email").value = "newemail@yahoo.com";

The value - newemail@yahoo.com - does actually display on the form in the field - HOWEVER - it is not populated in the Signer's Email in the field, nor is the new value recognized as the Signer's Email address in Adobe Sign.

If I could figure out what the property name is for the Signer's Email (similar to the readonly and/or display properties) I suspect I could do this:

this.getField("Em_es_:signer1:email").property_name = "newemail@yahoo.com";

I cannot determine the property name for Signer's Email....I have searched for hours on Google for an example - surely someone has done this.

I guess I will have to enter the email address in the To: field for each form I send via Adobe Sign.

Thanks again for your response. It is appreciated!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines