Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Customise the email submit button with custom email, cc, bcc, subject and body - almost working!!

Avatar

Former Community Member

Hi

I have been working on trying to customise the email submit button to custom entry email address, cc, bcc, subject etc etc

You can use the pre-submit function on the email button

I am using the following code:

this.event__click.resolveNode("#submit").format = formatlist.rawValue;

this.event__click.resolveNode("#submit").target = "mailto:"+customemail.rawValue+"?subject="+subject.rawValue+"&cc="+cc.rawValue+"&bcc="+bcc.rawValue+"&body="+body.rawValue;

THis is picking up values from a dropdown and a series of text boxes the values of each area.

This works beautifully except for the subject area. For some reason teh subject area copies the entire srting from the subject onwards, all other areas (cc & bcc & body) all only copy the value assigned to its function.

Any thoughts

Feels like a bug in the coding but it may also be intentional.

Thanks

2 Replies

Avatar

Level 2

I believe that there was a bug logged for this issue, here is a workaround.

Add a regular button to the form used to execute the EmailSubmit button  (you can make the EmailSubmit button invisible)

On the click event of the "newly added" regular button add your script

NameOfEmailSubmitButton.event__click.resolveNode("#submit").target = "mailto:"+customemail.rawValue+"?subject="+subject.rawValue+"&cc="+cc.rawValue+"&bcc="+bcc.rawValue+"&body="+body.rawValue;

NameOfEmailSubmitButton.execEvent("click");

Avatar

Former Community Member

You can probably do the same for a regular submit button action URL. But, this may prevent Reader users from submitting the form, when the client side e-mail software fails to open or is non-existant (Web mail).

Instead, you should submit to a server-side script, and handle the PDF form submission and e-mail through a SMTP server, bypassing 3rd party e-mail software such as OUTLOOK.

If you're using an ASP.net web server, then check out www.PDFEmail.net

PDFEmail.net creates the scripts and libraries for you. All you need to do is upload the script and libraries to your web server root or application directory, and point the PDF submit button action to the URL of the script.

PDFEmail.net can parse and populate a Email address from a PDF form field. Plus you have full control over the Subject, Body, TO, CC, BCC. Check out the online demo:

http://www.nk-inc.com/software/pdfemail.net/examples/

There is no programming necessary, but the scripts can be modified. For example: submit, email, and save to file server or database. Works with Adobe LiveCycle and Adobe Acrobat PDF forms, and in standalone Reader and browser served PDFs.