• Resolved iisisrael

    (@iisisrael)


    Wrapping checkbox / radio input questions with <label> helps with UX and adding classes gives easier CSS control. Diff of suggested modifications to models/question.php:

    --- a/wp-content/plugins/chained-quiz/models/question.php	Sun Feb 09 13:16:28 2014 -0600
    +++ b/wp-content/plugins/chained-quiz/models/question.php	Sun Feb 09 13:16:50 2014 -0600
    @@ -98,7 +98,7 @@
     				$output = "";
     				foreach($choices as $choice) {
     					$choice_text = stripslashes($choice->choice);
    -					$output .= "<div class='chained-quiz-choice'><input type='$type' name='$name' value='".$choice->id."' $autocontinue> $choice_text</div>";
    +					$output .= "<div class='chained-quiz-choice'><label class='chained-quiz-label'><input class='chained-quiz-frontend chained-quiz-$type' type='$type' name='$name' value='".$choice->id."' $autocontinue> $choice_text</label></div>";
     				}
    
     				return $output;

    Thanks!

    https://www.ads-software.com/plugins/chained-quiz/

Viewing 1 replies (of 1 total)
  • Plugin Author Bob

    (@prasunsen)

    Thanks for the suggestion, will review and probably add it soon.

Viewing 1 replies (of 1 total)
  • The topic ‘Checkbox / radio input wrappers’ is closed to new replies.