2014-06-12 4 views
0

오류를라디오 버튼에 오류가 있습니까?

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> 

답변

2

당신은 <cfinput><cfform> 태그 내에 중첩되는 요구/기대되는 <form> 태그에 중첩하지만 있습니다.

그런데 어쨌든 <cfinput> 태그를 사용하는 이유는 무엇입니까? 주어진 예에서는 그렇게 할 필요가 없습니다. 정상적인 HTML <form><input> 태그 만 사용하면됩니다.

+0

방금 ​​얻었습니다 http://help.adobe.com/livedocs/coldfusion/8/htmldocs/help.html?content=formatData_02.html – user3591637

+0

그럴 수 없다고 생각합니다. – user3591637

+0

하! 그것은 일어난다. 그러나 'cfinput'을 사용하여 여기에 게시 한 코드는 필요하지 않습니다. 'cf' 폼을 사용하면 페이지에 자바 스크립트가 많이 추가되고, 사용하지 않을 경우에는 필요가 없습니다. 그냥 표준 HTML'input' 태그를 사용하십시오. –

관련 문제