How to have link in Thank you page showing properly?

  • FranckMuller
    Asked on May 31, 2018 at 11:59 AM

    Hi,

    My Thank You Page features a link made of variables (texts that the user has typed).

    My goal is to display the link as a "href" tag to only show "Click Here" to the user.

    This has worked for me except when I add a field to get the filename of the uploaded image. It's {input26} in my form.

    This upload field is somehow causing me trouble to display the url into a "href" tag.

    In a regular html editor the href works but in the Thank You Page the link is display incorrectly.

    I think it comes from input26 returning not only the filename but also a link.

    Thank you for your help,

    PS: In my form, the field to upload a file is only displayed if "Logo" is selected in the "customisation" field.

    Jotform Thread 1488033 Screenshot
  • Nik_C
    Replied on May 31, 2018 at 1:51 PM

    The issue is that {input26} will be represented as a link since image is uploaded and that's why your link is broken. This is actually normal behavior, you cannot pass URL as a parameter in URL

    So a workaround would be to add an image as a separate field:

    1527789031Screen Shot 2018 05 31 at 7 Screenshot 10

    You can test how it works here: https://form.jotform.com/81505573291962

    Please check and let us know how it worked.

    Thank you!

  • FranckMuller
    Replied on June 1, 2018 at 3:16 AM

    Hi,

    Thank you very much for your reply.

    However, even in your version of the form, it doesn't seem to work as the field {image26} comes out empty when I upload an image. Besides, I'm trying to have the filename inside the url.

    Otherwise, is there a way to only get the filename and not the link ? I tried to use conditions, this method has proved successful on the other fields, but for the uploaded image it didn't. I'm referring to condition n°1 and {clientLogo} but when I use it on the Thank You Page it always returns "undefined" and not the filename.

    Thank you for your help,

  • Richie JotForm Support
    Replied on June 1, 2018 at 9:41 AM

    You can try changing your URL code to {IMG:prefix} or {IMG:image26}.

    You could also adjust the the width and height buy adding it after your prefix {IMG:image26:100:200}

    Guide:https://www.jotform.com/help/405-How-to-display-uploaded-image-in-the-form-emails-or-thank-you-message

    Here is my sample screenshot:

    How to have link in Thank you page showing properly? Image 1 Screenshot 20

    Please give it a try and let us know how it goes.

    Thank you.


  • FranckMuller
    Replied on June 1, 2018 at 9:46 AM

    Thank you for your reply, but I don't want to display the image in the Thank You Page. I would like to display its filename.

  • Nik_C
    Replied on June 1, 2018 at 10:55 AM

    Could you please test my form again, it should work.

    The link should be displayed like you receive it in the email submission:

    1527864910Capture Screenshot 10

    Here is the form URL: https://form.jotform.com/81505573291962

    We'll wait for your response.

    Thank you!

  • FranckMuller
    Replied on June 1, 2018 at 10:59 AM

    Thank you, now is it possible to include this filename in the href link "Generate and Download your PDF" ?

    As mentioned, this was what I was struggling with. The href link gets broken.

    Or is it possible to otbain the filename without the link ? If I can do this it will be easy after.

  • Richie JotForm Support
    Replied on June 1, 2018 at 12:38 PM

    Unfortunately, it is not possible to obtain the filename without the link.

    Here is a sample screenshot of the link combined with your href link. I have used {id}/{Image:input26}

    How to have link in Thank you page showing properly? Image 1 Screenshot 20

    The image file name is shown, however your Generate PDF link will not work.

    Generated link https://backend.franckmuller.com/press-corner/A3/297/420/Ladies%27%20Collection/Galet//Galet-1/Logo/////////////////4036800350325989219/

    Hope this information helps.

    If you need any further assistance, please let us know.

  • FranckMuller
    Replied on June 1, 2018 at 1:31 PM

    Ok thanks I tried with /{Image:input26} in the url but as you mentioned it didn't return anything in the url.

    I guess it's not possible.

    If you could escalate this feature to your dev team it would be great.

    Thank you,

  • Nik_C
    Replied on June 1, 2018 at 2:22 PM

    Just so we are on the same page, you want to have a link like this:

    https://backend.franckmuller.com/press-corner/A4/210/297/Ladies%27%20Collection/Galet//Galet-1/Logo//textbox_sample7/textbox_sample8/textbox_sample9/312/1/textbox_sample12/textbox_sample13/textbox_sample14/312/1/textbox_sample17/textbox_sample18/textbox_sample19/312/1/4036860869028822076/https://www.jotform.com/uploads/Nik_C/81505573291962/4036860869028822076/someimage.png because I don't see how that would work, I mean to pass the URL  in URL, how that will be used when users click that link if you could shed some light on that workflow so we can review if there is any other way to do that.

    Thank you!

  • FranckMuller
    Replied on June 4, 2018 at 3:48 AM

    Hi,

    The purpose of this url is that the user is going to click in the final "Generate and Download PDF" button on the Thank You Page and the link is going to shortly open a blank new window where a backend script will generate a custom adversing with the parameters that the user has typed into the Jotform.

    The uploaded image is important to me because sometimes, users want to add their own store logo on the advertising.

    On my form I just activated the FTP feature to store the images in a specific folder on my server. As such, I would only need to indicate the image name to allow the script to know which image pick from the server and to add on the advertising.

    And so I need the following link to work as a whole, hidden in a href "Generate and Download your PDF".

    http://backend.franckmuller.com/press-corner/{format}/{customFormat}/{customFormat123}/{category}/{collection}/{underCollection}/{adId}/{customizations}/{numberOf}/{boutiqueName120}/{boutiqueAddress124}/{boutiqueCity125}/{boutiquePhone126}/{boutiquePostal127}/{boutiqueName}/{boutiqueAddress}/{boutiqueCity}/{boutiquePhone}/{boutiquePostal}/{boutiqueName133}/{boutiqueAddress134}/{boutiqueCity135}/{boutiquePhone136}/{boutiquePostal137}/{id}-{input26}

     {input26} returns the image name with the link, which breaks the href.

    {Text:input26} returns nothing. But if something like this existed it would be good to only return the filename, without link.

    Thank you,

  • Ashwin JotForm Support
    Replied on June 4, 2018 at 8:15 AM

    You say that you have a backend script which reads the file name. I would suggest you to please read the complete file URL in your script and then you can use substring feature (substr() in PHP) to read the text after the last occurrence of "/" and then read all the characters after the last "/".

    This is the only solution I can think of currently. 

    Do try it out and get back to us if you have any questions.