Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 复选框不工作_Php_Wordpress_Checkbox - Fatal编程技术网

Php 复选框不工作

Php 复选框不工作,php,wordpress,checkbox,Php,Wordpress,Checkbox,我在WordPress的WP Pro测验插件中遇到了一个问题。存在可见但不可选择的“单一答案选项”。我需要这些选项,我想我可能能够让复选框发挥作用,从而得到我在测验中需要的结果 <div class="inside"> <p class="description"> <?php _e('If "Different points for each answer" is activated, you

我在WordPress的WP Pro测验插件中遇到了一个问题。存在可见但不可选择的“单一答案选项”。我需要这些选项,我想我可能能够让复选框发挥作用,从而得到我在测验中需要的结果

        <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('Do not show 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
是什么导致这些复选框“变灰”

        <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('Do not show 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


由于被
disabled=“enabled”
禁用,因此该值为灰色,即使该值为
已启用
,输入也会被禁用,任何值都会禁用输入,事实上,您只需将
禁用
,它就会被禁用,最新的浏览器只需读取
已禁用
并禁用输入即可。删除
disabled=“enabled”
,输入将被启用。

是灰色的,因为被
disabled=“enabled”
禁用,即使值被
启用,输入也被禁用,任何值都将禁用输入,事实上,您只需将
禁用
,输入将被禁用,最新的浏览器只需读取
disabled
并禁用输入。删除
disabled=“enabled”
,输入将被启用。

我发现,名称值与$this值(大写字母)不匹配。插件作者一定错过了。希望这个函数能起作用。
        <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('Do not show 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

        <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('Do not show 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


我发现,名称值与$this值(大写字母)不匹配。插件作者一定错过了。希望这个函数能起作用。

        <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('Do not show 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


TL;DR:disabled属性是一个布尔值。@rnevius布尔值?我不是,我只是那样做了,还是什么都没有。@taxicala我删除了那一段代码,但当我通过inspect元素查看它时,它显示disabled=“disabled”,即使我不再有那段代码了;DR:disabled属性是一个布尔值。@rnevius布尔值?我不是,我只是那样做了,还是什么都没有。@taxicala我删除了那部分代码,但当我通过inspect元素查看它时,它显示disabled=“disabled”,即使我不再在其中包含该代码。那么肯定还有其他东西添加了该属性。将其删除
,以及
disabled=“enabled”
。我想它又返回了
disabled
属性。但要确保你知道你在做什么,IDK如果它会破坏你插件的功能。那么删除你评论中的所有代码<代码>>
这是我当前的代码。我更新了代码以反映当前的位置
disabled=“enabled”
已被删除。将其与
disabled=“enabled”
一起删除。我想它又返回了
disabled
属性。但要确保你知道你在做什么,IDK如果它会破坏你插件的功能。那么删除你评论中的所有代码<代码>>
这是我当前的代码。我更新了代码以反映当前的位置
disabled=“enabled”
已被删除。