Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/22.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
Coldfusion 单选按钮错误?_Coldfusion - Fatal编程技术网

Coldfusion 单选按钮错误?

Coldfusion 单选按钮错误?,coldfusion,Coldfusion,获取错误 Context validation error for tag cfinput. The tag must be nested inside a cfform tag. 但是我确实在cfinput周围有表单标签。 是什么导致了错误 旁注:之前它是一个选择,但我想把它改为单选按钮 <form method="post" action="cse_allusers_addcomment.cfm" name="add_comment"> <cfout

获取错误

Context validation error for tag cfinput.  
The tag must be nested inside a cfform tag. 
但是我确实在cfinput周围有表单标签。 是什么导致了错误

旁注:之前它是一个选择,但我想把它改为单选按钮

<form method="post" action="cse_allusers_addcomment.cfm" name="add_comment">
        <cfoutput>
            <input type="hidden" name="txtSubmitter" value="#GetCurrentUser.emp_id#">
            ..more code...
        </cfoutput>
        <table>
        <thead>
        ......
        </thead>
        <tbody>
            <cfoutput>
           <cfloop index="i" from="1" to="5">
                 <cfset question = GetEmployeeCSEDepts["csedept_question" & i][GetEmployeeCSEDepts.CurrentRow]>
                   <cfif question neq "">

                       <tr>
                           <td valign="top">
                                        <cfinput type="radio" name="ratingradio" value="5">Exceptional<br>
                                        <cfinput type="radio" name="ratingradio" value="4">Exceeds Standards<br>
                                        <cfinput type="radio" name="ratingradio" value="3">Successful<br>
                                        <cfinput type="radio" name="ratingradio" value="2">Needs Improvement<br>
                                        <cfinput type="radio" name="ratingradio" value="1">Unsatisfactory<br>
                                        <cfinput type="radio" name="ratingradio" value="0">N/A<br>


                                  </td>
                         <td valign="top">#question#</td>
                     </tr>
                  </cfif>
                </cfloop>
            </cfoutput>
        </tbody>
        </table>

        <cfoutput>
        <p>
        <br>
        <textarea style="width:99%;" rows="3" name="txtPosComment"></textarea></p>
        </cfoutput>
        <p><input type="submit" name="Submit" value="Submit"></p> 

    </form>
您将其嵌套在标记中,但希望/需要嵌套在标记中


顺便问一下,你为什么要用标签呢?在给出的示例中,您不需要这样做。只需使用普通的HTML和标记。

刚刚在这里找到它,真不敢相信我会想念撒哈!这是常有的事。但是请记住,从您在这里发布的代码来看,使用cfinput是没有必要的。使用cf表单会向页面添加大量javascript,如果您不使用它,就不需要它。只需使用标准HTML输入标记。谢谢,我将其更改为,但您是否知道,由于每个问题都显示一个单选按钮,为什么我不能选择多个按钮?按设计,单选按钮只允许一个选择。如果要允许多个,请使用复选框。或者使用卡尔提到的唯一名称。