cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic E-Mail address in Interactive Forms?

Former Member
0 Kudos

Hi,

How can I have dynamic E-Mail address assigned/bind within my Interactive Form for "Email Submit button"?

If binding isn't an option then in which method should I write JavaScript code and how can I get my node value reference? If I select "Email Submit button" then click event is disabled. Are there any blogs or examples on how to access node data within JavaScript events?

Thanks and Regards,

Accepted Solutions (1)

Accepted Solutions (1)

chintan_virani
Active Contributor
0 Kudos

Take a look at this blog --> [Dynamically populating the email address of an email button on a SAP Interactive Form|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6676] [original link is broken] [original link is broken] [original link is broken];

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for your responses but I still couldn't make my scenario work

I have E-Mail address value within context node attribute:

I_HEADER->EMAIL_ADDRESS

And I am trying to access and assign the value within event Initialize using:

this.resolveNode("#event.#submit").target = "mailto:" + xfa.datasets.data.data.I_HEADER.EMAIL_ADDRESS.value;

But I always get error message when I open PDF.

I even tried to output the value contained in EMAIL_ADDRESS attribute using:

xfa.host.messageBox( xfa.datasets.data.data.I_HEADER.EMAIL_ADDRESS.value );

But the value is always empty.

I also tried following but no luck:

var emailAddress = xfa.resolveNode("xfa.datasets.data.data.I_HEADER.EMAIL_ADDRESS");
this.resolveNode("#event.#submit").target = "mailto:" + emailAddress.item.value;

How can I access any node attribute value within JavaScript?

Former Member
0 Kudos

I solved my problem with following code:

this.resolveNode("#event.#submit").target = "mailto:"+$record.I_HEADER.EMAIL_ADDRESS.value;

Thanks again for the link.

laxman_sankhla3
Participant
0 Kudos

HI I am new for web dynpro and

I want to send adobe form by mail by clicking on submit in web dynpro.

can you please help me step by step.

Regards,

Laxman Sankhla

Former Member
0 Kudos

Thanks Shrini,

This works. I inserted above code in Initialization Event for Send Email button.

Regards,

Nishad

Former Member
0 Kudos

Hi Srinivas,

To use a dynamic email address you'll need to use a JavaScript function, there are two:

doc.mailForm() and doc.submitForm()

The first one 'doc.mailForm()' does not work in Reader unless the form has Forms Rights enabling. If you want it to work in Reader use 'doc.submitForm()'. Look it up in the Acrobat JavaScript Reference and it is discussed in this article, <a href="http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/submitting_data/">submitForm</a>

On the form, set the export values of the list field entries to the actual emails, then you can use the list field value directly in the 'submitForm()' fucntion.

a clear requirement and explanation in the below post

http://65.181.155.238/forum/javascript/dynamic-email-address-based-pulldown-value

Happy coding...

Cheers,

Sai

chintan_virani
Active Contributor
0 Kudos

I think the script you mention will only work for Acrobat Forms and not LiveCycle Forms because both of them are different technologies.