Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

help required with submit button

Avatar

Level 4

Hi,

I need to submit a form filled by user on click of the submit button. I need the PDF to be submitted. Can some one please guide me through the procedure to do the same.

I was hoping to do the above using a webservice.

Any sample code if shared would be most helpful.

Thanks in advance.

2 Replies

Avatar

Former Community Member

Question: Do you want to send the submission as an e-mail attachment or save to a file or database?

If so, check out PDFEmail.net.

http://www.pdfemail.net/

Avatar

Level 2

Hi,

Write this script in click event of  the submit button

var mail;
var saddress = "Reciever mail id";
var subj = "Mail subject";
mail = "mailto: " + saddress + "?Subject=" + subj;
event.target.submitForm({
cURL: mail,
bEmpty: true,
cSubmitAs: "PDF",
cCharset: "utf-8"
});

Regards,

Sony