Request Email and Name to Submit a Quiz (WatuPRO)

Note: while this still works, it’s no longer cool. Check the new options instead.

When you select “Send email to the user with their results” in the quiz settings, an auto-generated field for collecting email appears on top of the quiz. (This is for non-logged in users – when user is logged in, this field does not appear).

Now, from version 4.1.1.5 we have a more elegant solution. You can add “name” and “email” fields yourself in the quiz description area. And more, if you use these fields with combination with the {{{button}}} tag, the user will have to fill them even before starting the quiz.

Here is how to use them:

In the exam description field simply enter any of the following two codes at the places where you want the fields to appear:
{{{name-field}}}
{{{email-field}}}
You can of course use only one of the fields if you wish. You can add any content around them, for example:
Your name: {{{name-field}}} (please enter your full name)
You can use the fields with or without a start button (the {{{button}}} tag), that’s up to you.
By default these fields are required and the user cannot submit the exam (when no “start” button is used) or reveal the exam contents (when “start” button is used) without filling the fields.
However you can make any of these fields optional if you add class “optional” to them. Like this:
Your name: {{{name-field class=”optional”}}} (so this is optional and won’t display an alert if left empty)
Your email (required): {{{email-field}}} (and this remains required)
You can also pass any HTML attributes if you want to style the fields beyond the default style. For example
{{{email-field size=”100″ onclick=”someJavascriptFunction();”}}} 
and so on.

In Certificates:

From version 4.1.4.6 exactly the same codes can be used to display the entered information in certificates. What if you use the same certificates for quizzes that use these codes and for quizzes that don’t use them? Don’t worry. The code {{{name-field}}} will then default to the behavior of the %%USER-NAME%% variable, and the {{{email-field}}} will be populated with the email from the user’s profile.

In the Final Screen / Email Contents

To display the user name there please use the %%USER-NAME%% variable.