SS Quiz
[resolved] Validation error (2 posts)

  1. johanna2patricia
    Posted 2 years ago #

    I try to validate my site, but I get this error:"The for attribute of the label element must refer to a form control."
    I understand that there probably is an id missing, but I have no clue where to change that.
    I get it for the name and email input, because I am using those.
    "<label for="user_name">Name: </label><input type="text" id="ssuser_name" nam…"
    Can somebody help?



  2. johanna2patricia
    Posted 2 years ago #

    Ok I figured it out.
    The user_name and the id must have the same name.
    the same goes for the ssemail.
    So I changed that in the client-side.php and also in the quiz.js. Now everything is working fine and validates.
    This is the new code for the client-side.php :

    echo '<label for="user_name">'.__("Name", 'ssquiz').': </label>';
    echo '<input type="text" id="user_name" name="user_name" value="" />';
    echo '<br />';
    if(get_transient("email".$session)) {
    echo '<label for="email">'.__("E-Mail", 'ssquiz').': </label> ';
    echo '<input type="text"  id="email" name="email" value="" />';

    And in the quiz.js just change all the ssuser_name to: user_name and ssemail to: email


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • SS Quiz
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic