• Resolved flyfisher842

    (@flyfisher842)


    I have a login form with 2 choices of destination on each destination I have the html for the link in the value for that option. so far the form submits ok but the return is only the success msg not he location url. I have the option value checked. So is the input to the value only text and an href is not recognized as html code.

    Do I have to use an html block in the form to get the switch from the form to the destination page?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Would you please give a detailed explanation of what you have done.

    Also, it would be great if you could add a URL.

    Thank you!

    Thread Starter flyfisher842

    (@flyfisher842)

    I have a basic login form with two choices of where to go upon submission. Page A and Page B. The user checks one before submission. Upon a successful submit. the user is redirected to the page of his choice. This is essentially an if > else if > else function statement. But it has been over 12 years since I wrote one. Have to brush up.

    If A is checked go there, else if B is checked go there, else stop and send an error message. Best I can remember var a and b are the names of the radio buttons and the test is == true on each if and else if

    The problem I had with the builder was seeing what names were assigned to the radio buttons.

    No url yet. Just testing the form. I finally noticed in the far right tab the place where code gets inserted. At least it looks like code blocks would go there to make the form function.

    i have not done js for over 12years when I used to do html websites. Would have to brush up on how to write the correct functions. I was rather hoping your builder would supply that to make the forms work.

    I do like your builder process. A nice set of fields in the free version. If you have docs I will go read those. This was a hurry up test to see how the basics worked.

    • This reply was modified 7 years, 2 months ago by flyfisher842.
    • This reply was modified 7 years, 2 months ago by flyfisher842.

    Hi,

    I can definitely see how the mentioned feature would be useful. As a company with a massive product roadmap, we have to pick new features based on the value they will add to the most users possible.

    At the moment, we will not be able to make this one work.

    Thank you!

    Plugin Support Zhanna Khachatryan

    (@zhannak)

    Dear user,

    Actually, we can advise a custom solution for you that may work for your case.

    Please follow the steps below:

    This Javascript we have written for Select field type, but you can apply it to other select type fields like multiple choice, etc.

    Please Add a hidden field to your form, for this please enter Add field > Advanced > Hidden Input, please add the field and as field name write myhidden.

    Now we should write a JavaScript code to give redirect URL to your hidden input field, please note that it is important to write the URL without http/https.

    For this please enter form > settings > javascript

    Let me remind you that this function is written for select field type.

    So here in before_submit function you should give links to the option values.

    if(jQuery(" select field id").val() == "option 1"){
      jQuery("input[name='myhidden']").val("google.com");
    }
       else if(jQuery("select field id").val() == "option 2"){
            jQuery("input[name='myhidden']").val("google.com");
    }

    Please note, that here for select field id should be written your select field ID.
    for option 1 and option 2 should be written your select field option values.
    Instead of google.com and facebook.com should be written your redirect URLs.

    Now you should enter Actions after submission section > Select Custom Text , choose text format of editing window and write the below script.

    <script>window.location.href = "http://{your field id}"</script>

    Here instead of your field id, please select your hidden field ID by clicking on the placeholder (the button above Text, please click then choose form fields, and then choose hidden input).

    Hope this solution will help you.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘login form’ is closed to new replies.