I would like to have required fields to be filled back in (if they were filled in correctly) when someone clicks on the “return to form link” on the bad_template page.
“realname” and “email” are required fields. Someone fills in “realname” to “BOB” but leaves the “email” field blank and hits the submit button. They will be taken to the bad_template page. When they click on the “return to form link” the form will have “realname” filled in as “BOB” …. So, now they don’t have to fill “BOB” back in.
All the NON required fields are filled back in, but all of the required fields are left blank.
My template is a .html file, but I tried a .php version of it with this:
<input id="realname" type="text" name="realname" value="<?php echo $realname; ?>" />