Quote:
Today at 04:16 AM Cyricx said this in Post #41
Love this hack 
Question, is it possible to "require" an answer? Seems you can submit without answering any of the questions. 
Great hack, I've got so many uses for this it's limitless.
|
I purposely made it like that to open up the possibilites. To make answering a question compulsory, do this:
In form1.php, find:
PHP Code:
if ($action=="submit") {
BELOW, add:
PHP Code:
if ($answer1 == "") {
eval("standarderror(\"".gettemplate("formanswer")."\");");
}
Replace $answer1 with the answer variable you want to make compulsory. Repeat that piece of code again and again for any other answers.
Then, add a new template called "formanswer" with the contents:
Code:
You did not answer a compulsory question. Please press backspace to redo the form.
Done!