Support » Plugin: Surveys » Extra radio button and box after each answer

  • Hi,

    Modified the piece of code below to remove the extra radio button.

    Can you pl explain what this piece is doing?

    show_survey.php, line 131 onwards

    if($ques->allow_user_answer)  {
        echo "<input type='$type' name='answer-{$ques->ID}[]' id='answer-id-{$ans->ID}' class='answer' value='user-answer' />\n";
        if($ques->user_answer_format == 'textarea')
          echo "<textarea name='user-answer-{$ques->ID}' rows='5' cols='30' class='user-answer'></textarea>";
        elseif($ques->user_answer_format == 'checkbox')
           echo "<input type='checkbox' name='user-answer-{$ques->ID}' class='user-answer' value='1' />";
          echo "<input type='text' name='user-answer-{$ques->ID}' class='user-answer' value='' />";

    The modification is in the top if statement:
    if($ques->allow_user_answer && $type != 'radio')

    Not sure if this is going to cause problems elsewhere, though.

  • The topic ‘Extra radio button and box after each answer’ is closed to new replies.