How create a working hyperlink conditionally?

  • Profile Image
    Patrick_Holmes
    Asked on April 03, 2022 at 07:48 PM

    I'd like to create a working hyperlink conditionally.

    For example: We have conditions that set an email address based on which "office" a forms user selects. e.g. If the user selects the "Corona" office, then the email field is set to "corona@socaltms.com", if the user selects the "Costa Mesa" office, then the email field is set to "costamesa@socaltms.com", etc. (for a total of 12 offices currently.) This works GREAT!

    Now, what we would like, is three things:

    (1)

    What we first want is to have a conditional URL that is set based on the office selected. e.g. If the user selects the "Corona" office, then a URL link should be displayed with display text = "Corona" and the URL is set to a Google reviews link: "https://g.page/r/CfQeLmYNEHg7EAg/review"; if the user selects the "Costa Mesa" office, then a URL link should be displayed with display text = "Costa Mesa" and the URL set to: "https://g.page/r/Cf9EYIiMI1UQEAg/review"; etc., for 12 offices. By "working" hyperlink, what I mean is that the user should simply be able to click on the link to open the link. (i.e. the user should NOT have to copy & paste the link into a browser window)

    (2)

    The link should open in a separate tab or window. Currently, a Jotform text field (now called "Paragraph") can have links, but unfortunately the links open IN THE SAME WINDOW. That of course takes the user OUT OF THE FORM BEFORE SUBMITTING! (This is probably an important feature request, to allow forms programmers to specify whether the URL link should open a separate tab or window. Having users leave a form *BEFORE* submitting the form is probably not a good idea in any scenario.)

    I've included a link to a form that displays our 12 offices and their Google review links in the last field of the Jotform. This is using a "Paragraph" field type, and is NOT conditional of course. I also can't use this form this way, because the URL opens within the same window. Hence, I've *ALSO* put the save office names and links on the "Thank You" page.

    (3)

    Which leads to a related question: If we can create working URL links conditionally in a form, can we also create working URL links conditionally on the Thank You page? (That's probably the best place to put this field anyway...)

    thanks

    pat holmes

  • Profile Image
    Rica
    Answered on April 03, 2022 at 11:05 PM

    Hello Pat Holmes,

    Thank you for reaching out to Jotform Support. Your requirement can be achieved by using a Conditional Logic that will show the form user the hyperlink on the Thank you Page based on the office they selected. The hyperlink will work on the Thank You Page. Since you have 12 offices, you will have to create 12 Change Thank You Page condition. This can be done by following the steps and screenshots below:

    • Open your form in Form Builder.
    • Click on the Settings tab at the top part of the Form Builder.
    • Select Conditions on the left panel of the screen.
    • Click on the +Add a new condition.

    1649041190_624a5f2641631_Capture.PNG

    • Then select Change Thank You Page.

    1649041259_624a5f6b3fea0_Capture.PNG

    • Lastly, set you rule just like what is shown below:

    1649041368_624a5fd83dbab_

    If you need further assistance, please let us know.