I’ve been using WordPress for quite awhile, but when I’ve needed form handling I’ve either
o Used a form plugin that gathers the data and simply forwards it e-mail
o Coded a form and its action page outside of the WordPress environment (and kludged the theme)
I’d like to figure out the “right” way to do this, but am having trouble finding documentation on this.
What I’d like to do is have
1. Page 1 has a form that collects some information
2. Page 2 displays that information and customizes other content based on that info
If I use a plugin, e.g. Contact Form 7, I can see how to save the data from the first page, but I can’t figure out what token the two pages have in common so I can retrieve the data reliably in code on Page 2. Is there such a variable in WordPress that identifies the “session”?
Or is the “right” way to code a PHP file for Page 1’s form action so that the $_REQUEST is available directly (giving up the benefits of the form plugin)?
I’m open to suggestions — have tried cookies and global variables without success, but can revisit things if anyone can give me pointers on a “good” strategy. Or am I just not using the right plugin? [Had also tried Cforms II but was having difficulties that sent me to Contact Form 7.]
- The topic ‘Form handling with WordPress – How to?’ is closed to new replies.