I have a problem in the WP-Pro-Quiz plugin for WordPress. There are “Single Answer Options” that are visible, but not selectable. I need these options, I was thinking I might be able to get the checkboxes to function and in turn get the result I need in my quiz.
What is causing these checkboxes to be “Greyed Out”?
<?php
}
private function singleChoiceOptions($data)
{
$single = $data[0];
?>
<div class="postbox" id="singleChoiceOptions">
<h3 class="hndle"><?php _e('Single choice options', 'wp-pro-quiz'); ?></h3>
<div class="inside">
<p class="description">
<?php _e('If "Different points for each answer" is activated, you can activate a special mode.<br> This changes the calculation of the points',
'wp-pro-quiz'); ?>
</p>
<label>
<input type="checkbox" name="answerPointsDiffModusActivated"
value="1" <?php $this->checked($this->question->isAnswerPointsDiffModusActivated()); ?>>
<?php _e('Different points - modus 2 activate', 'wp-pro-quiz'); ?>
</label>
<br><br>
<p class="description">
<?php _e('Disables the distinction between correct and incorrect.', 'wp-pro-quiz'); ?><br>
</p>
<label>
<input type="checkbox" name="disableCorrect"
value="1" <?php $this->checked($this->question->isDisableCorrect()); ?>>
<?php _e('Disable correct and incorrect.', 'wp-pro-quiz'); ?>
</label>
<div style="padding-top: 20px;">
<a href="#" id="clickPointDia"><?php _e('Explanation of points calculation', 'wp-pro-quiz'); ?></a>
<?php $this->answerPointDia(); ?>
</div>
</div>
</div>
<?php
}
The are gray because the are disabled by
disabled="enabled"
, even if the value isenabled
, the input gets disabled, any value will disable the input, in fact, you can just putdisable
and it will be disabled, latest browers just readdisabled
and disable the input. removedisabled="enabled"
and the input will be enabled.I figured it out, the name values weren’t matching the $this value, capital letters. Plugin author must’ve missed it. Hopefully the function works.