Reputation: 499
Getting error
Context validation error for tag cfinput.
The tag must be nested inside a cfform tag.
But I do have the form tag around the cfinput. What could be causing the error?
Side note: before it use to be a select , but I would like to change it to a radio button.
<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>
Upvotes: 0
Views: 198
Reputation: 13548
You have it nested in a <form>
tag but <cfinput>
is expecting/requiring to be nested within a <cfform>
tag.
By the way, why are you using <cfinput>
tags anyway? You do not need to in the example given. Just use normal HTML <form>
and <input>
tags.
Upvotes: 2