HTML5 email submit button functionality

96 views
Skip to first unread message

ysa...@gmail.com

unread,
Sep 21, 2020, 4:02:48 AM9/21/20
to Adobe LiveCycle Developers
Hi Experts,

Functinality - I have a submit button in form which triggers email app and by attaching PDF and subject line and add content in body of email is drafted.

The code for the above fuction is written in the javascript area of XDP form, by below code -

doc.mailDoc(bUI:false, cTo: toaddvar, cSubject: subvar, cmsg: msgvar); 

The above function is working well when the submit button is used from PDF form ,
BUT not working in when opened the form as HTML in browser.

Can you please help me in modifying the code which is supported in HTML form submit button for the same functionality.?

Thanks in advance. Let me know if needed more details.
Abhilash

fred.pantalone

unread,
Sep 22, 2020, 9:31:16 AM9/22/20
to Adobe LiveCycle Developers
Well, the first thing you must realize is that there is no PDF to attach to an email so there is no form-side JavaScript solution to be found here. You'll need to submit the form data back to the server and render a PDF and then email it from there. I don't know of any client-side email solutions for forms rendered as HTML. There is an "email pdf" submit option for adaptive forms so you may want to look into this.

Fred

ysa...@gmail.com

unread,
Sep 22, 2020, 10:18:46 AM9/22/20
to Adobe LiveCycle Developers
Hi Fred,

Thanks for the response. Thats correct, i realized it late. So as a alternative, the html submit button is set to trigger workflow process to render, where we have also a service called  Email service "send with document", trying to play around the same to achive the email fucntion. But getting error in connecting to SMTP error.  fingers crossed :)

Regards,
Abhilash

ysa...@gmail.com

unread,
Sep 23, 2020, 8:34:35 AM9/23/20
to Adobe LiveCycle Developers
Hi Fred,

Now i am able to send email within my workflow process, once the user clicks the html submit button it triggers the workbench process where i have this service.

 Also, along with this client wants to open the flat output PDF output in a browser from the same service request submit button. Can we open the pdf output in the browser without any kind of UI? within the process as a response the flat pdf should open in browser. Any pointer for this ??

Thanks for all you do,
Abhilash 

fred.pantalone

unread,
Sep 23, 2020, 10:38:25 AM9/23/20
to Adobe LiveCycle Developers
Make the flat PDF document an output variable of your submit process. Make sure it's the only process variable that is marked for output.

Fred
Message has been deleted

ysa...@gmail.com

unread,
Sep 24, 2020, 8:12:12 AM9/24/20
to Adobe LiveCycle Developers
Thanks Fred. It worked, we were missing to put minor steps.

one more query - now we have a submit button on HTML form and once submitted we are receiving flat PDF as response. The submit button which is placed in XDP layout is also showing up in output PDF. Any suggestion to HIDE submit button once output is generated ? Tried all the events, could find the appropriate. 

Thanks Much,
Abhilash

fred.pantalone

unread,
Sep 24, 2020, 9:40:13 AM9/24/20
to Adobe LiveCycle Developers
Great news. Try setting the button's Presence to Visible (Screen Only).

ysa...@gmail.com

unread,
Sep 24, 2020, 10:11:51 AM9/24/20
to Adobe LiveCycle Developers
Hi Fred 
 Tried all the existing presence setting and events with scripts - for postSubmit, postPrint, mouse up, down( Click event is disabled for submit button),
Nothing really worked, can see submit button in all the flat pdf outputs. Can you think anything other than this look into ?

Thaks much for all you do,
Abhilash

fred.pantalone

unread,
Sep 25, 2020, 9:49:16 AM9/25/20
to Adobe LiveCycle Developers
Have you set the presence to Visible (Screen Only) in the field properties in Designer? If you are actually using Output to render the PDF then this should work.

Fred

Srujan Kumar M

unread,
Sep 25, 2020, 10:23:28 PM9/25/20
to live...@googlegroups.com
Hi,

Take one text filed (submitbuttonchk) and assign 0 as default value. 
Make it hidden.

In submit button's initilize event

If hidden text filed.rawValue =0 then
  Submit button visible
else 
  Submit button hide

As soon as you click on submit button set variable =1

It should work.

--
You received this message because you are subscribed to the Google Groups "Adobe LiveCycle Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to livecycle+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/livecycle/7c93bbc5-e81a-46c5-9d82-13521e2447cdn%40googlegroups.com.

abhilash ys

unread,
Sep 26, 2020, 12:32:41 AM9/26/20
to live...@googlegroups.com
Hi srujan,

Thanks for your reply.
I tried doing the same. But submit button is not allowing to set click event and submit together. Whenever I choose submit button the click event is disabled and I am unable to get hold of click action. 

Do we have anything like on submit ? Kind where I can merge the submit as URL field and the setting up the hidden text variable together ?? 


Regards,
Abhilash

Srujan Kumar M

unread,
Sep 26, 2020, 4:01:07 AM9/26/20
to live...@googlegroups.com
Hi 

Use normal button instead of submit button and write script to invoke service.

fred.pantalone

unread,
Sep 28, 2020, 10:09:52 AM9/28/20
to Adobe LiveCycle Developers
Another approach is to hide the submit button and add a regular button that is labelled Submit. When this button is clicked your pre-submit scripts run and then you can fire the click event for the hidden submit button. 

However, I don't know why you can't get this working correctly using the visible (screen only) property...

Fred

ysa...@gmail.com

unread,
Sep 29, 2020, 1:23:11 PM9/29/20
to Adobe LiveCycle Developers
HI Fred and Srujan,

I tried taking up normal button to add script to invoke the service with following script -

event.target.submitForm({cURL: "urladd", cSubmitAs:"XML""})  

Wrote the script in Click and then tried with Presubmit event.
The above script is perfectly working in PDF forms, but when opened as HTML form this is not working, unable to submit the form in HTML view.

are there any sort of script/syntax for above submit to invoke service for HTML form too with normal button?

Fred, yes not sure why basic functionality of visible screen only is not working for me :(

Thanks for your help,
Abhilash

fred.pantalone

unread,
Sep 30, 2020, 9:55:09 AM9/30/20
to Adobe LiveCycle Developers
Have you tried my suggestion of keeping your normal submit button and using a dummy button to fire the click event (of the submit button) after you've run whatever scripts you need to run? 

Fred

abhilash ys

unread,
Oct 13, 2020, 7:42:13 AM10/13/20
to live...@googlegroups.com
Hi Fred,

Yes I had tried that too but was unable to achieve it.

Good news it is finally working. The problem was with the transform PDF activity which was not working correctly. 
We were using rendender pdf and transform pdf - this combination was not working.  As alternative we are now using directly generate pdf activity and the visble screen only options are working fine.

Also raised a bug for transform pdf activity with adobe support, they agreed to it and are looking forward for fix.

Thanks for your help. Thanks all :)

Regards,
Abhilash

fred.pantalone

unread,
Oct 14, 2020, 9:30:40 AM10/14/20
to Adobe LiveCycle Developers
That's good news, thanks for posting the solution.
Fred

Reply all
Reply to author
Forward
0 new messages