enclose the whole form within a <cfoutput></cfoutput>  then
<cfloop> through the query.

Fred

----- Original Message -----
From: "Erika Foster" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 09, 2000 12:55 PM
Subject: Nesting <CFoutput>'s


> I need an input form driven from a loop - up to 52 inputs.
One set of inputs
> is a database driven select box, which needs to call a
query to populate the
> drop-down.  I'm having trouble with Nesting the
<CFOUTPUT>s.  Here's the
> snippet of code that I'm trying to do:
>
>
>       <cfloop index="i" from="1" to="52" step="1">
>       <cfquery name="getdupes" datasource="personnel">
>        SELECT *
>        FROM planning_track
>        WHERE week=#createodbcdate(startweek + ((7*(i-1))+
1))# AND
> person=#person#
>       </cfquery>
>       <cfif getdupes.recordcount is 0>
>       <TR>
>        <td height="40">
>        <cfoutput >
>         Week of #dateformat(startweek + ((7*(i-1))+ 1))#:
>
>        <input type="hidden" name="week#i#"
value=#dateformat(startweek +
> ((7*(i-1))+ 1))#>
>        </td>
>         <TD><select name="task#i#">
>          <option value="">
>          <cfoutput>
>          <option value="#gettasks.task#">#gettasks.task#
>          </cfoutput>
>          </select>
>
>
>        </td>
>
>        <TD><input type="text" name="task#i#"></td>
>
>       </tr>
>       </cfoutput>
>       </cfif>
>       </cfloop>
>       <tr>
>        <td colspan="2" align="right"><input type="submit"
> value="submit"></td>
>
> I'm getting this error:
>
> Invalid tag nesting configuration
>
> A query driven CFOUTPUT tag is nested inside a CFOUTPUT
tag that also has a
> QUERY= attribute. This is not allowed. Nesting these tags
implies that you
> want to use grouped processing. However, only the
top-level tag can specify
> the query that drives the processing.
>
> I don't see any way around nesting these tags the way I
have... I need to
> use both the loop and the query for the dropdown.
>
> What am I doing wrong?
>
> Thanks.
>
> Erika Foster
> engineering-environmental Management
> Applications Developer
> (505) 866-1654
> [EMAIL PROTECTED]
>
> ----------------------------------------------------------
--------------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=li
sts/cf_talk or send a message to
[EMAIL PROTECTED] with 'unsubscribe' in the
body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to