-
technicalreportsAsked on September 16, 2024 at 2:18 AM
Hi
Is it possibe to have 2 different PDF upon Submission.
First is the Default one.
Second should be based on condition.
If REGION contains USA only then 2nd PDF should be created.
-
Raymond JotForm SupportReplied on September 16, 2024 at 2:51 AM
Hi technicalreports,
Thanks for reaching out to Jotform Support. Yes, this is possible. There are two ways to do this. First, you can have an email template with two PDF reports attached and send it conditionally, while having another template that has one PDF report attached and is also sent conditionally.
Alternatively, you can have two email templates with each PDF report, and have them sent separately and conditionally.
If you need further help, please share with us a bit more details on the flow you're trying to create so we can show you an example. For example, which email templates are you trying to use, and the email addresses for each condition. In the meantime, please check out our guides on How to Send an Email Based on a User's Answer and How to Attach Submissions as PDFs to Email Notifications.
Reach out again if you have any questions.
-
tonybenjamin1209Replied on September 16, 2024 at 3:03 AM
To generate two different PDFs upon submission, you can follow these steps:
- Form Submission Handling: When the user submits the form, check the value of the REGION field.
- Generate Default PDF: Use a PDF generation library like FPDF or TCPDF to create the first PDF for all users.
- Conditional Check: If the REGION contains "USA," generate the second PDF with the appropriate content.
def on_form_submission(form_data):
# Generate default PDF
generate_default_pdf(form_data)
# Check REGION
if "USA" in form_data['REGION']:
# Generate second PDF
generate_second_pdf(form_data)
def generate_default_pdf(data):
# Logic to create and save the default PDF
pass
def generate_second_pdf(data):
# Logic to create and save the second PDF
pass
By implementing this method , you can create two PDF files based on the specified condition.
-
technicalreportsReplied on September 16, 2024 at 8:51 AM
I am unabel to see the 2nd PDF option in EMAIL - - - ->> ADVANCED.
-
Mary Eden JotForm SupportReplied on September 16, 2024 at 9:17 AM
Hello Technical Reports,
I looked at the link to your form, and the reason you couldn't see the second PDF option is that your PDF in the PDF editor only shows one. To ensure that you will be able to see another PDF in your email, you will need to add the second PDF. Let me show you how it's done:
- In Form Builder, click on the Downward Arrow icon at the top-left side of the page and select PDF Editor.
- In PDF Editor, click on the +New PDF tab. Then, when the window shows up, click on the Use Default Layout.
- Then, update the PDF based on your preference.
Check out the screencast below to see my results:
If you run into the same issue, let us know, and we'll do some more testing to see what's going on. We also have a guide about How to Customize a PDF Submissions Report that you can check out.
Keep us updated and let us know if you need any more help.
- In Form Builder, click on the Downward Arrow icon at the top-left side of the page and select PDF Editor.
-
technicalreportsReplied on September 16, 2024 at 12:16 PM
Unable to delete one option in 2nd PDF Editor.
-
technicalreportsReplied on September 16, 2024 at 12:25 PM
Unable to delete one option in 2nd PDF Editor.
-
Christopher JotForm SupportReplied on September 16, 2024 at 12:27 PM
Hi technicalreports,
I have cloned your form and tested it on my end, and I was able to delete an element on the PDF Document as shown in the screen recording.
It would help us to understand what’s happening if you could take a video recording with Loom and share the video link here with us.
Once we hear back from you, we'll be able to help you with this.