| Post |
|
Guest
| harry 6:09 pm March 6, 2009
| |
|
|
Hello, I'm trying to get a form to submit its email and also send its form data to the success page so that it can, for example, say "Thank you for your submission <name>!" by reading it from the $_POST array.
But the only choices I seem to have are to either:
- "Redirect to a success page" which does NOT send form data to the new page
- Put an "Alternative Form Action" which does NOT send the email at all.
Is there no way to do both send the email AND send the form data to the redirect page? If necessary I can code something in PHP if you can give some pointers as to where to start… It just seems like a really basic thing to do, or am I totally wrong here?
|
|
|
Admin
| Oliver Munich, Germany posts 6237 6:26 pm March 6, 2009
| |
|
|
It's probably not obvious, but what you want to do is actually how cforms behaves by default.
Simply add any of your form fields as {custom vars}(see Help! page) to your success page.
|
|
|
|
|
Guest
| harry 7:35 pm March 6, 2009
| |
|
|
Thanks, that does clear it up.
Oner more question, and sorry for asking such basic questions but I simply cannot find this particular thing anywhere in the help or FAQ files. When I have a multi-page form, how do I pre-populate a field in the second form with a value from the field of the first form?
I've tried naming the fields exactly the same, doesn't work. I read something in another thread you wrote about adding [id:name] to the field, so I added it to the name of the field and it didn't work. Can't figure it out. Would welcome any hints…
|
|
|
Admin
| Oliver Munich, Germany posts 6237 7:36 pm March 6, 2009
| |
|
|
I've tried naming the fields exactly the same, doesn't work. I read something in another thread you wrote about adding [id:name] to the field, so I added it to the name of the field and it didn't work. Can't figure it out. Would welcome any hints…
Yes that's how it works. Make sure to enable "Custom ID's / Names .." under core options for both forms!
|
|
|
|
|
Guest
| harry 7:59 pm March 6, 2009
| |
|
|
Thanks, I later did figure out that I had to enable that custom field ids option – and now I have another problem… as soon as I enabled it, the form broke. When I submit the first form, wordpress gives me a 404 page. It tries to go to http://url/#userMessage3 and 404's.
If I turn the custom ID option off, it works. If I turn it on, it breaks.
Anything I can do now?
|
|
|
Guest
| harry 8:13 pm March 6, 2009
| |
|
|
Ok, I got it working by disabling the "Jump to error" option for some reason.
A final thing that's bothering me is that if I go through the whole form process, submit the first form, submit the second form, through to the end, then I load up the form page again, the page is still stuck on the second form. I need to clear my cookies to make it show to first form again. Is this the intended behavior, or am I once again doing something wrong :)
|
|
|
Guest
| harry 8:18 pm March 6, 2009
| |
|
|
Ok never mind I got it working by checking "this is the first option" :)
Sorry to badger you like this… this is really a fantastic piece of software, any errors so far have been all due to my limited understanding.
|
|
|
Admin
| Oliver Munich, Germany posts 6237 11:29 am March 7, 2009
| |
|
|
no worries. thanks for making the effort!
|
|
|
|