cancel
Showing results for 
Search instead for 
Did you mean: 

feedback form error redirect

nimbus
Dabbler
Posts: 13
Registered: 05-03-2008

feedback form error redirect

Hello.
I've had a few issues trying to get a simple feedback / enquiry form working on my site using ccgi/username etc
In the end, I tried the "easy" option: //homepages.plus.net/cgi-bin/form
and this seems to work fine... except
Although the "thanks" redirect works ok, the missing fields one still takes you to the thanks page, rather than the error page. I search this forum and another user point at this:
<input type=hidden name="missing_fields_redirect" value="http://your.host.com/error.html">
which I have adopted and included into my page.
After a bit  of testing, a missing field won't send the email, but still takes you to thanks.html.
any ideas?
Thanks
6 REPLIES
prichardson
Grafter
Posts: 1,503
Registered: 05-04-2007

Re: feedback form error redirect

I have just created a form using our feedback form with the following form elements.
recipient, subject, realname, missing_fields_redirect, redirect, required, req1, req2, req3, opt1, opt2, opt3
I added a value of "req1,req2,req3" to the required element and tried it out.
Redirected me according to the values provided, validating it correctly and receiving the message when expected. ie, I got a failed messages when validation failed, and an email and success page when it passed.
Do you have an example page this is occurring on, and I can take a look for you. PM me if you do not wish to make the address public.
nimbus
Dabbler
Posts: 13
Registered: 05-03-2008

Re: feedback form error redirect

This is obviously further beyond me than I thought  Undecided
I'm unsure of the correct syntax for the required values,
Happy to post the URL if it helps others:
http://nimbusphotographic.co.uk/contact.html
Please note, the site isn't finished yet!  Smiley
prichardson
Grafter
Posts: 1,503
Registered: 05-04-2007

Re: feedback form error redirect

From that we can see you need a "required" hidden form field, to ensure that you specify which items are a must.
I would suggest something like "name,email,text area" as the value for this
nimbus
Dabbler
Posts: 13
Registered: 05-03-2008

Re: feedback form error redirect

Ok..
I've added these;
<input type=hidden name="required" value="name">
<input type=hidden name="required" value="email">
<input type=hidden name="required" value="text area">
And it's nearly there!
If I miss out the name or the content, it returns the error page,
but if all i do is put "rob" in the email field and nothing in the name or test area, it goes to the thanks page.
But thanks for your patience so far!  Smiley
prichardson
Grafter
Posts: 1,503
Registered: 05-04-2007

Re: feedback form error redirect

Ahh, not quite Cheesy
Try the following
<input type="hidden" name="required" value="name,email,text area">
The value is a coma seperated value of all the fields that should exist
nimbus
Dabbler
Posts: 13
Registered: 05-03-2008

Re: feedback form error redirect

Fantastic!!!
Ahh.. all it takes is the know-how and you yourself can be a god!!
Thanks so much  Smiley