Forum Moderators: coopster
So far, I haven't been able to find a free form processor with that kind of functionality. Many will do error checking, but it normally gives an error page with a "back" link. I'm looking for some way of doing the more user-friendly method of reloading the form, with the errors marked, and all the correct data still entered.
Unfortunately, while I can put together the error checking easily enough, I can't figure out a good way of keeping the form data in anything other than text fields. For instance, how do you get a checkbox or radio button to stay selected, and is there any way to make sure the right <option> in a select box stays selected?
I know there must be ways of doing this, but I sure don't know how. Any tips, references or tutorials will sure be helpful!
Thanks,
Matthew
<edit> Hey, this is my 1000'th post! </edit>
$lastname = (isset($_POST['lastname'])) ? $_POST['lastname'] : '';
// and in your form
<input type="text" name="lastname" value="<?php print $lastname; ?>" />
<div id="rbutt"><span>Organization type (choose one):</span><br />
<label for="ins">
<input type="radio" name="group" id="ins" value="Institution"
<?php if ($_POST['group'] == 'Institution') echo'checked="checked" '?>/>
$50 Institution</label><br />
<label for="gal">
<input type="radio" name="group" id="gal" value="Gallery"
<?php if ($_POST['group'] == 'Gallery') echo'checked="checked" ';?>/>
$30 Gallery</label><br />
<label for="art">
<input type="radio" name="group" id="art" value="Artist"
<?php if(($_POST['group']!= 'Gallery') && ($_POST['group']!= 'Institution')) echo'checked="checked" ';?>/>
$15 Artist</label><br />
</div>
Just depends on what kind of validation you need.
Here are a couple of sites with some reading on the subject.
[quirksmode.org...]
[xs4all.nl...]
I was just reading up on this a few weeks ago and the methods appear good. (I didn't get around to trying it myself.)
Good luck.