PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Lock down a page unless you complete a form

  1. I have an interesting question.

    We have a resume submission page and we would like to re-direct them to a thank you page but if and only if you have completed the form. We would like to put tools on that thank you page that would only be available if you have completed the form.

    Anyone done this or know if it is even possible?

    Thanks
    Josh

    Posted 11 years ago on Tuesday July 31, 2012 | Permalink
  2. In the confirmation settings for the form, you can send people wherever you like after they submit. You can send them to your thank you page. They would not get their without submitting the form. However, even if you hide the thank you page in your site's navigation, it could still be accessed directly by URL. To prevent that, maybe password protect it, and display the password in your form confirmation text? Then provide a link to the page, which will require the password to access, and the password is only visible on the form confirmation.

    Would that work?

    Posted 11 years ago on Tuesday July 31, 2012 | Permalink
  3. I would like it to be more server side, as I dont want them to copy and paste text. My thoughts on this are probably that it is not possible in the PHP framework. It is not in the navigation so I would say we are pretty safe to say that people wont be coming to this page directly. What would be a cool enhancement is to somehow allow the URL to be populated with maybe a query string that would only be accessible with something like abc.com/submitresume?successThanks

    The whole purpose of this idea is to track the abandon rate of the submit resume page. I know we have a conversion factor inside of the gravity forms but since we can't reset that counter I need another way to track conversions and abandon rates of that page

    Thanks!

    ~Josh

    Posted 11 years ago on Tuesday July 31, 2012 | Permalink
  4. You totally changed gears there with your reply. It's all possible to do, but now I am unsure of exactly WHAT you want to do. The requirements in this latest post changed from the first post.

    You can certainly use the query string redirect exactly as you described. Have you taken a look at the options on the Confirmation tab for your form?

    Posted 11 years ago on Tuesday July 31, 2012 | Permalink
  5. Sorry I guess my first post I had left a little vague.

    I see the confirmation options in here but I guess I'm unsure how to do this the right way.

    Would it be possible with minimal coding or extra work to accomplish what I'm doing.

    Im not really good with the whole query thing but from my day job I work with sites all the time that if I try to hit a page that is like abc.com/submitresume?thanks directly it wont let me do it unless I fill out the form.

    I see a whole bunch of options in the Pass Field data Via Query string, but all that is doing is allowing me to grab either the fields from the from itself or some predefined stuff.

    What it would appear to me ( and again I feel like Im speaking jibberish) would be the ideal way to do it in some fashion is use a CAPTCHA and grab the value they entered in the text field and use that as a validator to get to the next page.

    It seems like a whole lot of coding but If I can pull something like this off to 100% gurantee false hits to the page then my client would be super happy.

    The flip side is I can mirror this action within google Analytics by setting up a advanced segement that said only show me visits that come to page XX with an entry page of YY which essentially does the same thing.

    Sorry for the round about here.

    Posted 11 years ago on Tuesday July 31, 2012 | Permalink
  6. I would configure your form confirmation to send them to the thank you page. That ensures they end up there after submitting the form. That's one part of it. The other part is ensuring that no one else ends up at the thank you page without having come from the form. In that case, I would create a new page template. You can duplicate your existing page.php (in most themes) and add some logic to the top which checks where they came from, and if it's not from the form, don't let them see the page. If they came from the right page (the form submission) then show them the thank you page.

    If that solves the problem, we can work on what needs to be added to your page template.

    No need to use the query string in this case. You mentioned it, but I don't think it's relevant to your use case.

    Posted 11 years ago on Tuesday July 31, 2012 | Permalink
  7. That idea of creating a new page.php and building the logic in there... well that sounds friggen AWESOME! I would love to be able to do that but that stretches beyond my limits of understanding PHP.
    Is it fairly easy to do this?

    Posted 11 years ago on Wednesday August 1, 2012 | Permalink
  8. Yes, it's fairly easy to do. Go ahead and get most of it working and just leave the page template alone for your thank you page. Then we will have to add something to your page template, call it "locked-page.php" or something, then use that template for your thank you page. Then test.

    Let us know when you have the basics online and we'll go from there.

    Posted 11 years ago on Wednesday August 1, 2012 | Permalink
  9. Perfect, we are pushing to production this weekend and when I get everything all hooked up I will PM you with details!

    Thanks again Chris

    Posted 11 years ago on Wednesday August 1, 2012 | Permalink
  10. OK, please email me at chris@rocketgenius.com as there is no PM function here. Please reference this topic when you do so so I know what we're talking about. Thank you.

    Posted 11 years ago on Wednesday August 1, 2012 | Permalink
  11. thanks Chris for all your help, E-mail will be coming shortly

    Posted 11 years ago on Thursday August 2, 2012 | Permalink
  12. Hey Josh, I emailed you with some questions. Please make sure you got the email. Thanks.

    Posted 11 years ago on Monday August 6, 2012 | Permalink
  13. Josh, I emailed you and believe this is working for you now. Because the URLs are for a development site, I won't post them here. For anyone else who wants to get this working, this is the code to add to the top of your page template, before the call to get_header():

    http://pastebin.com/s0HPUhxj

    Any questions, please post them here. Thank you.

    Posted 11 years ago on Friday August 10, 2012 | Permalink