Support » Plugin: WP Survey And Quiz Tool » Poll bug when validating required fields

  • Resolved ered15


    Hi, i download this plugin and its nice, but i was struggling with a bug when i created a POLL, i found that when the user doesn’t select any option and submits the FORM the code validates the Questions that are required and the titles of the Questions that weren’t answered should turn red instead some do and some don’t, so i found the solution for this hope it helps someone with the same problem:

    REPLACE LINE 34 of the file \pages\site\poll\section.php

    if ( empty($_SESSION['wpsqt']['current_message']) || in_array($questionId,$_SESSION['wpsqt']['required']) ){

    if ( empty($_SESSION['wpsqt']['current_message']) || $givenAnswer[0]!='' ){

    REPLACE LINE 42 of the file \pages\site\poll\section.php

    if ( !empty($_SESSION['wpsqt']['current_message']) && !in_array($questionId,$_SESSION['wpsqt']['required']) ){

    if ( !empty($_SESSION['wpsqt']['current_message']) && $givenAnswer[0]=='' ){


  • The topic ‘Poll bug when validating required fields’ is closed to new replies.