Custom redirect condition: using a {field} tags sends a "Please set a valid url" message

  • Profile Image
    developer.aod
    Asked on January 21, 2021 at 06:04 PM

    Hello Jotform Support!

    I have a rather elaborate form for which I redirect users to various websites after submission.

    I have a hidden field {websiteurl} that I populate with the domains, and I am redirecting users to https://{websiteurl} - the path is more complicated, but the same idea.

    This used to and has worked no problem for many months, but lately, every time I try to edit the value on the Redirect, new validation has been implemented and I can't enter my {field} tags anymore as I am getting a "Please set a valid url" message.

    I want it to work again! Or at least I want this validation disabled for my account!

    What options do I have?


    Thanks!

    Screenshot below

    1611270090_600a07ca56b8f_

  • Profile Image
    jherwin
    Answered on January 21, 2021 at 09:43 PM

    Thanks for contacting us!

    Do you have other forms set up like this and it still works? Please give us a link to the form so we can forward it on to our backend team.

    Looking forward to your response.

  • Profile Image
    developer.aod
    Answered on January 22, 2021 at 01:04 PM

    Hey @jherwin!

    I made an example exhibiting the behavior - I cloned one of our real forms and trimmed it down.

    Form url: https://hipaa.jotform.com/210215266990151

    I have a few hidden field variables in the form:

    WebsiteURL - this is used in a redirect link in the domain part of the url in a condition

    https://{websiteurl}/exit-ineligible.html?uniqueId={uniqueid}&reason={ineligibilityreason}


    1611337890_600b10a2a9672_

    This used to work and NOW when I try to update it I get:

    1611337921_600b10c1391cd_


    The other variables I have are

    UniqueID and CogsworthServiceID - these are used in a redirect link in the path and query string of the url

    UniqueID is used in the same condition above and if I remove {websiteurl} I can save it, since {uniqueid} is in the query string part.

    CogsworthserviceID is used in the path section of the default redirect after submission, and changing this URL works with no problem.

    https://www.cogsworth.com/book/{URLENCODE:cogsworthServiceId}?answer[text_1]={URLENCODE:uniqueId}

    1611337789_600b103d699e6_


    So, I would summarize the problem that using a field expansion in the domain part of the url DOES NOT work anymore, while used in the path or query string works (as it did before).

    protocol://domain/{path}?{querystring} - works

    protocol://{domain}/path?querystring - DOES NOT WORK - getting error message when saving Condition, but actually works if previously saved

    I would guess that a new validation has been put in place (at least for the conditions section) that validates the domain to be a valid domain, but I think the developers should allow for variable expansion and the {} notation.

    My use case is that I use the hidden fields as a sort of parameters for the form. I have a very elaborate form, and for our development stage and production environment, we "parameterize" the forms by using these hidden field to the forms redirect to the respective websites and systems.

    Additionally, depending on their answers, we might also be redirecting users to different domains in the future.

    This was very easy to set up with the variable expansion working, and this kind of flexiblity is what made us chose Jotform.

    I am hoping for a quick resolution on this breaking change!


    Thanks!


  • Profile Image
    Gaetan_B
    Answered on January 22, 2021 at 03:36 PM

    Hello,

    Thank you for the detailed example!


    I have sent your issue to our backend team so they can investigate.


    We will update you here as soon as we hear back from them.


    Thank you for your patience.

  • Profile Image
    developer.aod
    Answered on February 03, 2021 at 12:43 PM

    Hey folks!

    Any updates on this?

    Thanks!

  • Profile Image
    Gaetan_B
    Answered on February 03, 2021 at 02:04 PM

    Hello,

    I do not have an update yet, but I've asked our backend team if they have any updates regarding the progress of this issue.


    Thank you for your patience.

  • Profile Image
    Phifer
    Answered on February 08, 2021 at 06:51 PM

    Hey Jotform Support!

    It's getting from bad to worse!?!?!

    Now I get the "Please set a valid URL" also when I have the variable in the path part of the URL.

    Listen, I know you guys have to add features like that for security and such - but it's taking away valuable flexibility!!!

    1612828138_6021cdea18fdb_

  • Profile Image
    jherwin
    Answered on February 08, 2021 at 09:40 PM

    Sorry for the inconvenience caused to you. I am sending a follow-up message to the team assigned to this ticket, they will update you here as soon as they have an update.

    Again, sorry for the delay and thank you for your patience.