Forums

Form Clears Fields with Invalid Image Verification

wlomax 23 Apr, 2011
I have browsed the forum looking for solutions to the form reseting to "blank" fields if the validation image is not entered correctly.

Back in 2008 there were some post to use value="<?php echo $_POST'name']; ?>", but this not working for me. I have even tried to set a session value upon submit and that does not work either.

On the FAQ page http://www.chronoengine.com/faqs.html - (#35), there is a solution provided, but this does not work either.

I would like to retain checkbox selections as well if validation code does not work so the user does not have to select them again.

Variables/id being used are: name, email, phone, message

Another bit of information: I have Enable Validation set to "no" because I have a specific height to work with and the error messages push the form down and messes with the layout. I will do another post about this question.

Thanks in advance.
GreyHead 23 Apr, 2011
Hi wlomax,

Please set "Republish fields if error occured" to "Try to republish" on the Form Editor General tab.

Bob
wlomax 23 Apr, 2011
Hi Bob ,

Thanks, this works great, but, if I have selected one of the 15 checkboxes (how did you hear about us), the form will refresh will all the text in the text boxes (great) but it does the opposite for the chech boxes. Meaning, if I have selected 1 and I click submit without validation image it checks the other 14 and unchecks the one I actually selected.

Thanks.
GreyHead 24 Apr, 2011
Hi wlomax,

Not something that I've seen before. Please post a link to the form so we can take a quick look.

Bob
GreyHead 25 Apr, 2011
Hi Bill,

That's really odd; it may be that the lack of values for the checkboxes causes it. Try adding e.g. value='Google' and see if that fixes the problem.

Bob
wlomax 27 Apr, 2011
Hi Bob,

That worked, I added a value attribute to each of them and it works fine now. ... Well, that part of the form works now.

I still need to have the error message disappear so the form doesn't move down and validate a proper email address, but that is on the other post that you are helping with.

Thanks

Bill
This topic is locked and no more replies can be posted.