• Resolved jokubas2000k

    (@jokubas2000k)


    Hi,

    After submitting the form, I would like to redirect the person to a separate Thank You page with some of the information the person filled out on the form (Name, Email Address etc.).

    Is it possible to use form data in a separate page?

    Thanks in advance!

    P.S. I use the Elementor page builder and OceanWP theme. If that matters.

    • This topic was modified 4 years, 1 month ago by jokubas2000k.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @jokubas2000k

    I hope you are doing well.

    You can use the URL to pass a query parameter to the second page:

    https://monosnap.com/file/BXJF5d5LZnesygrCWGNM7rt2QYDaRA

    You can receive on the other page using the $_GET[‘parameter’] using PHP or o JS.

    For example:

    $name = $_GET['name'];
    
    if($name){
    echo 'Thank you for submitting the form '. $name;
    }else{ 
    echo 'The form was not submitted, or you accessed the page directly';
    }

    Let us know if you need any further help on this.
    Best Regards
    Patrick Freitas

    Hello,
    I’m having the same issue but as I’m not familiar with PHP or coding that much, I’m having a hard time following. I’ve added the above code to the page I want, but it keeps showing the else option. I’m not sure what I’m supposed to put in my parameter, how does it know that for example, ‘name’ is referring to the name value in the form?

    Edit:
    I have also tried the following:
    https://premium.wpmudev.org/forums/topic/forminator-pro-transfer-fields-to-the-success-page/#post-3708751
    but I can’t access the passed form info. since I still get the “else” echo message.

    • This reply was modified 4 years, 1 month ago by kizha.
    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    HEllo @kizha

    I’m not sure what I’m supposed to put in my parameter, how does it know that for example, ‘name’ is referring to the name value in the form?

    No, this refers to the ULR parameter.

    If you visit the page where you added the code like this:

    domain.com/?name=Kizha

    it should display “Thank you for submitting the form Kizha”.

    In other words, the “name” word in URL and the “name” word in this line is the same

    $name = $_GET['name'];

    Now, if you want to pass some data over from the form (e.g. name) then you need to make sure that redirect URL contains the field ID as it is in the form.

    If you look at the form and see that there’s {name-1} field then your redirect URL in form settings would look like this

    domain.com/?name={name-1}

    This is just an example based on what’s been discussed above so you might need to use different field names. If you got any further questions about that, please start a separate ticket of your own and we’ll be happy to assist you there.

    Best regards,
    Adam

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @jokubas2000k ,

    We haven’t heard from you for a while now. It looks like my colleagues’ suggestion helped.

    If needed please feel free to re-open this ticket.

    kind regards,
    Kasia

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using form data in a separate page’ is closed to new replies.