cfinput error

Posted on 2006-04-03
Last Modified: 2013-12-24
Oh-oh, I've done it now. I am getting these errors when I try to go to

attributes.fuseaction: cust_catalog message: Context validation error for tag CFINPUT.
detail: The tag must be nested inside a CFFORM tag.
Type: Template

1 (31,0) C:\CFusionMX\wwwroot\WEB-INF\cftags\input.cfm
2 (21,0) C:\CFusionMX\wwwroot\WEB-INF\cftags\input.cfm
3 (17,0) C:\CFusionMX\wwwroot\WEB-INF\cftags\input.cfm
4 (45,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\includes\inc_dsp_product_on_menu_page.cfm
5 (162,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\dsp_cust_category_list.cfm
6 (236,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\index.cfm
7 (234,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\index.cfm
8 (6,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\index.cfm
9 (1,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\index.cfm
10 (1,0) F:\Inetpub\wwwroot\mymagickitchen_dev\catalog\index.cfm

 Can anyone see what the problem is in the code? Here it is:


      <cfif NOT IsDefined("categoryName") OR categoryName NEQ get_product_list.product_group_type>
      <cfset categoryName = get_product_list.product_group_type>
             <tr bgcolor="##FF5416"><td colspan="6" align="left"><IMG src="#request.imagesroot#/spacer.gif" ALT="" BORDER=0 width="10" height="1"><span class="head2" style="color: ##ffffff"><b>#categoryName#</b></span></td></tr>
      <cfset i = 1 + #i#>
      <tr bgcolor="#IIf(CurrentRow Mod 2, DE('F5F5EB'), DE('ffffff'))#">
            <td align="center" ><img src="#request.imagesroot#/spacer.gif" ALT="" BORDER=0 width="10" height="1"></td>
            <td align="left">
                  <table border="0" cellspacing="0" cellpadding="0" width="100%" >
                              <td><img src="#request.imagesroot#/spacer.gif" alt="" border=0 width="3" height="1"></td>
                              <td class="entrees" align="left" colspan="2">
                                    <cfif #get_product_list.heart# neq "">
                                    <a href="index.cfm?fuseaction=dsp_nutrition&<cfif IsDefined('pageref')>&#pageref#</cfif>" CLASS="text"> <FONT COLOR="666600">#trim(</FONT>...<i>learn more</i></a>

                        <cfif #get_product_list.short_description# neq "" and #get_product_list.dsp_short_desc# eq 1>
                                    <td><img src="#request.imagesroot#/spacer.gif" alt="" border=0 width="3" height="1"></td>
                                    <td><img src="#request.imagesroot#/spacer.gif" alt="" border=0 width="5" height="1"></td>
                        <!--- Display the product ratings. --->
                        <cfinclude template="inc_dsp_product_ratings_on_menu_page.cfm">
            <!--- If the product is a meal package then we won't display the quantity and price options. --->
            <cfif trim( EQ "Magic Meal Packages">
                  <td colspan="4" align="center"><a href="index.cfm?fuseaction=dsp_nutrition&<cfif IsDefined('pageref')>&#pageref#</cfif>" class="text"><font color="##666600"><i>Learn more...</font></i></a></td>
                  <!--- Decrement the count in this case so we don't mess up the product count. --->
                  <cfset i = i - 1>
                  <td align="center" class="entrees"><cfinput type="text" NAME="quantity#i#" VALIDATE="INTEGER" VALUE="0" MESSAGE="Please enter the quantity" size="1" style="width:20"></td>
                  <td align="center" class="entrees">$#NumberFormat(get_product_list.price, "__________.__")#</td>
                  <td align="center" class="entrees">
                        <cfif get_product_list.sizes eq 1>
                              <cfquery datasource="#request.maindsn#" name="get_sizes">
                                    select id,name from sizes where order by sort_order
                        <cfif get_sizes.recordcount GT 1>
                                    <select name="sizes#i#">
                                          <cfloop query="get_sizes">
                                                <option value="">
                                    <input name="sizes#i#" type="Hidden" value="">
                              <input type="hidden" name="sizes#i#" value="0">
                  <td align="center"  class="entrees"><input type="image" src="#request.imagesroot#/bag_mini.gif" name="submit_#i#" width="15" height="16" border="0"></td>
      <tr><td colspan="6" ><img src="#request.imagesroot#/spacer.gif" alt="" BORDER="0" width="4" height="3"></td></tr>
      <tr><td colspan="6"><img src="#request.imagesroot#/spacer.gif" alt="" border="0" width="4" height="3"></td></tr>
      <input type="hidden" name="product_id#i#" value="">


Thanks in advance, I'll keep looking in the meantime...
Question by:mel150
    LVL 18

    Assisted Solution


    It's just as the message says, the <cfinput type="text" must be in a <cfform tag, I don't see your <cfform tag.


    Author Comment

    OK, that's got me looking :)...

    in mymagickitchen_dev\catalog\dsp_cust_category_list.cfm, I have this code, which includes pulls the template for the code above, which was on mymagickitchen_dev\catalog\includes\inc_dsp_product_on_menu_page.cfm (does that make sense?) I think that's where the cfform tag is..:

    <CFFORM ACTION="index.cfm?#request.urltoken#" METHOD="POST" NAME="form1">
                            <CFSET i=0>
                               <CFLOOP QUERY="get_product_list">
                                  <!--- Display each product on the menu page.--->                                
                                  <cfinclude template="includes/inc_dsp_product_on_menu_page.cfm">
                                  <INPUT TYPE="Hidden" NAME="fuseaction" VALUE="buy">
                                  <cfif #Rest_Cat# eq 0>
                                        <INPUT TYPE="Hidden" NAME="product_type" VALUE="3">
                                        <INPUT TYPE="Hidden" NAME="product_type" VALUE="1">
                                  <input TYPE="hidden" NAME="count" VALUE="#i#">
                                  <input TYPE="hidden" NAME="Cat_sort" VALUE="#Cat_sort#">
                                  <input TYPE="hidden" NAME="Rest_Cat" VALUE="#rest_cat#">
                                  <input type="hidden" name="from_entrees" value="#from_entrees#">
                               <input TYPE="hidden" NAME="custom_session" VALUE="1">
                            <cfif isdefined("pageRef")>
                                  <input TYPE="hidden" NAME="pageRef" VALUE="#pageRef#">
                        <TR><TD colspan="6"><IMG src="#request.imagesroot#/spacer.gif" ALT="" BORDER=0 width="4" height="3"></TD></TR>
                        <TR><TD colspan="2" align="right" height="35" VALIGN="TOP"><INPUT TYPE="IMAGE" src="#request.imagesroot#/nav/add_all_items.gif" name="add_all_items" width="150" height="20" BORDER="0"></TD></CFFORM>
    LVL 18

    Expert Comment


    It's not being executed or not getting to it. The message is very clear:

    attributes.fuseaction: cust_catalog message: Context validation error for tag CFINPUT.
    detail: The tag must be nested inside a CFFORM tag.

    I'm not familiar with fusebox but I know the CF messages are accurate.
    LVL 9

    Accepted Solution

    I'd do a text search on your code pages affected by the error for CFINPUT - the page you pasted is odd because although it uses CFFORM, there are no CFFORM tags anywhere inside them - just regular HTML <input> tags.

    I'd start looking for a closing CFFORM tag on "includes/inc_dsp_product_on_menu_page.cfm" since it gets inserted into your CFFORM on the page you displayed in your comments.  I've run in to these problems when I've inadvertently included a page into a form and the page I included had a form on it.  Nesting forms will cause all kinds of errors and broken functionality.
    LVL 9

    Expert Comment

    By the way, I'm guessing you found it since I see no error message when I view the pagelink you posted.  And as a side note - the food looks delicious. :D

    Author Comment

    thanks- I didn't really find it, I just uploaded the two pages again and it began to work. Thanks to you both for your help on this, I think the issue is we have two tired web developers working on it and we got our pages crossed.

     And thanks for the compliment on the food! It makes me hungry, working on this website. :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
    When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now