| Post |
|
New Member | clarako posts 3 9:55 pm April 14, 2009
| |
|
|
hi,
I set the alternative form action of the last form in my multipart form.
Initially I just want to inspect the $_POST variable like this:
<?
foreach($_POST as $post) { print_r($post); }
?>
When I go through the form and click Finish, I get:
One%20moment%20please…Please%20fill%20in%20all%20the%20required%20fields%20in%20a%20valid%20format.Please%20double-check%20your%20verification%20code.nyynnFinish
This includes my failure message.
Am I doing something wrong?
Please help.
Regards,
Clara
|
|
|
Admin
| Oliver Munich, Germany posts 6237 7:29 am April 15, 2009
| |
|
|
where are you adding the code?
please describe in more detail the setup, form flow and especially what is not working.
|
|
|
|
|
New Member | clarako posts 3 7:48 am April 15, 2009
| |
|
|
hi Oliver,
It is a 4 page form flow. The last page has enabled alternative form action to a page on my own server. There, I was going to adjust the field name (keys in the $_POST variable) and send it on to an external source. However, from the forum, I found that I can use custom field names to do this. I have to also figure out how to forward variables from form1 to form2 using hidden fields. Does it just work if the name is the same?
Thanks for your help,
Clara
|
|
|
Admin
| Oliver Munich, Germany posts 6237 7:45 am April 15, 2009
| |
|
|
yes the form fields have to have the same name, but don't have to be the same type, e.g.:
form #1, text input field: my text input field[id:myfield1]
form #2, hidden field: hidden field 1[id:myfield1]
make sure to enable custom names/ids on both forms
|
|
|
|
|
New Member | clarako posts 3 11:06 am April 19, 2009
| |
|
|
hi Oliver,
I managed to forward all the fields as hidden fields as you suggested above. The last form of my 4-page form uses an alternative form action. I understand that with this, cforms will no longer do any validation or tracking. I can do that myself. But I also had a Captcha on this last form.
Here are the last parts of my $_POST array:
… [cf_working6] => One%20moment%20please… [cf_failure6] => Please%20fill%20in%20all%20the%20required%20fields%20in%20a%20valid%20format. [cf_codeerr6] => Please%20double-check%20your%20verification%20code. [cf_customerr6] => nyy [cf_popup6] => nn [sendbutton6] => Finish )
I don't know what all of these 'cf_' fields mean.
Is there a way to check the captcha before posting to my alternative form action?
Perhaps in future versions of cforms, you can automatically forward fields for multipage forms with alternative form action, or provide an option for it. Also would be great is if the validation and tracking works even if there is an alternative form action. Another one I thought of was putting the ID as a field in the popup for the field, that way it is clear what it is for.
Thank you, Oliver, for all your hardwork and expertise. It has been tremendously helpful.
Regards,
Clara
|
|
|
Admin
| Oliver Munich, Germany posts 6237 6:47 am April 20, 2009
| |
|
|
Since multi page forms only work in nonAjax mode, the page must be reload to validate the captcha. You could for instance move the captcha field to the first form.
I don't know what all of these 'cf_' fields mean.
those are internally used fields.
Perhaps in future versions of cforms, you can automatically forward fields..
fields are by default available after form submission/ reload / loading the target URL, either in $_POST or $_SESSION (for MP forms).
Also would be great is if the validation and tracking works even if there is an alternative form action.
That is a contradiction & impossible per definition.
Another one I thought of was putting the ID as a field in the popup for the field, that way it is clear what it is for.
what ID, and what is "a field in the popup"?
|
|
|
|