Bind action to Button

Fawaaz 06 Apr, 2015
Hello,

I want to add a SAVE button on my form so that the user can save the form to PDF.
(TCPDF action on submit is working fine but i don't want it on SUBMIT event.)

I have created a NEW EVENT called SAVE_AS_PDF in the SETUP tab.I have added to this a TCPDF action.
Question : How to bind this action(SAVE_AS_PDF) to a button on my Form ? I can't find a way to do it..in Extra params perhaps ?
GreyHead 06 Apr, 2015
Answer
Hi Fawaaz,

I really don't understand your logic. You can't create a PDF without the form data - that is, without submitting the form. You could make the PDF creation optional by using a checkbox and an Event Switcher.

Bob
Fawaaz 20 Apr, 2015
Thank you Bob. I have used 2 button and an event switcher.
For the logic, i wanted to make the save to pdf optionnal.
Fawaaz 20 Apr, 2015
I have another problem.
When i select PDF option, the form data is saved, the PDF file is downloaded but the page is not redirected.
I tried adding a Redirect control but no success redirecting the user.
How can i redirect the user ?
GreyHead 20 Apr, 2015
Hi Fawaaz,

When you set the PDF action to immediate Download then ChronoForms loses control and no actions after that will be run,

You can save the PDF to the server and show a download link in a Thank you page before redirecting; or you can email the PDF (or a link to it).

Bob
Fawaaz 20 Apr, 2015
Ok thanks Bob.
This topic is locked and no more replies can be posted.