How to display a text baed on a condition?

  • pccontrole
    Gevraagd op 13 februari 2024 om 08:41

    Ik heb een formulier welke een aantal JA/NEE vragen stelt aan de gebruiker.

    De logische condities berekenen een waarde. Naar gelang de scores op bvb vraag 1 en 2 scoort de gebruiker X op deze vragen. bij vraag 3 en 4 scoort hij Y.

    Ik wil deze resultaten in een overzicht weergeven (voorkeur pdf)

    Kan ik aan de hand van de resultaten een bepaalde tekst of afbeelding in de pdf plaatsen?



  • Rose Jotform Support
    Geantwoord op 13 februari 2024 om 08:57

    Hi pccontrole,

    Thanks for reaching out to Jotform Support. Unfortunately, our Dutch Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Dutch, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    Now, let me help you with your question. To be sure, do you want to conditionally display a text or image based on the result on the form? If yes, the possible workaround is to add a Long Text field to your form and insert a text or paragraph in it based on a condition. In that way, the text that will show in the PDF report will change depending on the answer to a question or the result of a calculation. Here's a screenshot of the Long Text element you can use:

    How to display a text baed on a condition? Image 1 Screenshot 40

    Here's an example Update/Calculate Field condition to insert value to that field:

    How to display a text baed on a condition? Image 2 Screenshot 51

    Here's the output:

    How to display a text baed on a condition? Image 3 Screenshot 62

    The PDF report will also display the custom message based on the condition on the form.

    If that’s not exactly what you’re looking for, can you explain a bit more so I can help you better?

    Let us know if there’s anything else we can help you with. 

  • pccontrole
    Geantwoord op 13 februari 2024 om 09:07

    When I hide the fields in the script, I can use them in the PDF? So that only when the user sends in his answers he/she will get a pdf with personal results?

  • Christopher Jotform Support
    Geantwoord op 13 februari 2024 om 11:24

    Hi pccontrole,

    You can attach a PDF to the Autoresponder email by turning on the option Attach PDF. Here's how to do it:

    1. In Form Builder, in the orange navigation bar at the top of the screen, click on Settings.

    2. Click on Emails on the left side of the screen.

    3. Hover your cursor over the Autoresponder email and click on the Pencil icon.

    4. Go to Advanced.

    5. Turn on Attach PDF and select your PDF Document.

    6. Click on Save.

    How to display a text baed on a condition? Image 1 Screenshot 40

    You can edit your PDF Document as shown in the screenshot.

    How to display a text baed on a condition? Image 2 Screenshot 51

    You can also directly go to the PDF Editor page. Here's how to do it:

    1. In Form Builder, on the upper left side of the screen, click on the downward arrow icon.

    2. Click on PDF Editor.

    How to display a text baed on a condition? Image 3 Screenshot 62

    We also have a guide about How to Customize Your PDF Submissions Report that you can check out.

    Give it a try and let us know how it goes.