ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Restrict thank you page to those who just submitted form

November 04, 2011 6:56am

Subscribe [2]
  • #1 / Nov 04, 2011 6:56am

    onjegolders

    29 posts

    Hi, I couldn’t find any information on this.

    I’m using Solspace’s Freeform module but think this is more of an EE question.

    On the thank you page I’m running a freeform loop to include {name} and some other info from the submitted form.

    Basically:  Thank you “Joe Bloggs” for booking “This Event”.

    At the moment I’m just using limit=“1” sort=“desc” to show the most recent entry. The problem is if (for some reason) the user comes back to that page at another time they will see someone else’s entry data.

    For my forms there’s nothing that sensitive but we’d lose a little credibility….

    Is there a way of limiting the thank you page to only those who’ve come via the form page for example?
    Or if not, another way of achieving this?

    Thanks

  • #2 / Nov 04, 2011 9:28am

    Sue Crocker

    26054 posts

    Are you storing the logged in user’s screen name or username? You could write a bit of code to check the value of the most recent freeform item and if the two don’t match, display an error message.

    Does that help?

  • #3 / Nov 04, 2011 10:29am

    onjegolders

    29 posts

    Thanks for the reply Sue, unfortunately no I’m using the name that was inputted in the form, so they wouldn’t necessarily be logged in.
    On the thanks page the name appears fine but if someone browses to http://www.mysite.com/contact/thanks then they’ll see the name of whoever last filled in the form.
    I’d like to somehow only allow access to that page via the form.
    Or if not, another way of only allowing the form submitter to see their information.

    If it’s not possible it’s not the end of the world, I’ll just drop the personalization of the thank you page.

  • #4 / Nov 07, 2011 2:05pm

    Sue Crocker

    26054 posts

    Hmmm… here’s a PHP solution that might work for you.. it was for EE1, but the concept is the same.

    http://ellislab.com/forums/viewthread/101774/

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases