Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm looking to create a page for a wedding site that will have a form. The idea is that it is an RSVP page where a visitor will input a unique string that was on the invitation that they received and will take them to another page that will have the info (attending, how many guests, etc.), after that storing it in a database so I have a completed guest list that I can use for later purposes. I'm not very familiar with Wordpress yet, so what is the easiest way to have pages that involve forms and that the second input page would not be displayed in the navigation? I should be able to write the php and form html without too much trouble, just need a jumping off point.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

If I were doing it this is how I'd do it:

I would be to use a plugin such as cFormsII (free), Gravity Forms (Commercial), or several others to store the data in the database. Both the plugins I mentioned allow you to export the data which is great for a guest list.

For the key you could go about it the lazy way by having one key that looks unique but it actually not. Or you could do something like md5($lastname.'mysalt') to make sure they can access the page. The problem with the later is you'd need to make an array/list/database of all the guest last name to do the check.

Now I would create a custom page template and do something like this:

if($_GET['key'] == "mykey"){
// WordPress loop containing the_content (this will let you use the form 
// plugin inside the WP dashboard for ease of setting up the form
}
else{
 echo("Sorry, invalid invite code. Are you sure you're on the guest list?");
} 

Then set the invite page to your new custom page.

This would mean you would link to http://example.com/invite?key=mykey

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.