A Quiz Tag can be used to add question-and-answer sets to a contact form. The user is required to correctly enter an answer before the contact form can be submitted. A Quiz Tag can be a highly effective method of preventing contact-form spam. The more creative your questions and answers, the more effective a spam-preventative it is. However, if you get too creative, you may come up with an IQ test and prevent human users from submitting your contact form.
Quiz Tags are composed of the type, the name of the tag, and one or more pipe-separated question-and-answer sets. For example, if you want to have your user solve a simple math question, you can use:
[quiz my-quiz "What is 4 times 6?|24|twenty-four|twenty four"]
Note that you can include additional answers for a question by separating them with the pipe symbol. First you enter the question, then a pipe symbol, and the first answer. If you want to include additional answers as in the example above, you just separate them with pipe symbols. If a user answered the question above with “24,” “twenty-four,” or “twenty four,” each would correctly answer the question, and the form could be submitted.
You can put multiple question-and-answer sets in the tag, and the question posed on your contact form will be selected randomly.
- id:id – adds the id attribute to the tag
- class:class – adds a class attribute to the tag
- minlength:integer – sets the minimum character length allowed for the answer
- maxlength:integer – sets the maximum character length allowed for the answer
- size:integer – sets the size attribute of the input field