If you only need a field for user name, open "Settings" tab on quiz edit page and enable "Collect users' data -> Ask user name" checkbox.
If you want to add extra fields, it requires to modify the form in the template file. Add something like this:
Code: |
<div class="quiz-user-data-email data-row">
<label for="<?php echo $prefix . '_userdata_firstname'; ?>">First name :</label>
<input type="text" id="<?php echo $prefix . '_userdata_firstname'; ?>" data-key="firstname" autocomplete="off" placeholder="<?php esc_attr_e( 'Enter your first name', 'ari-stream-quiz' ); ?>" />
</div>
|
and modify PHP code in <plugin_directory>/includes/controllers/quiz-session/class-ajax-collect-data.php file.
Regards,
ARI Soft