I got this part working. Now I need to insert into  questionidfk the value 
(#Evaluate(field)#, but now it looks like this test2_229 and i only need the 
229 . How can i trim this variable 
<cfif isDefined("form.fieldnames")>
<CFLOOP LIST="#form.fieldnames#" Index="field">

<cfquery name="qryInsert" datasource="cfelsunrise" dbtype="odbc">
                insert into answers (questionidfk,answer,empID) values 
(#Evaluate(field)#,'#Evaluate(field)#',#session.empID#)
        
        
        </cfquery> 
</CFLOOP>
</cfif>

>Have you tried dumping the contents of "form.fieldnames"
>
>-- 
>Scott Stewart
>ColdFusion Developer
> 
>SSTWebworks
>4405 Oakshyre Way
>Raleigh, NC. 27616
>(919) 874-6229 (home)
>(703) 220-2835 (cell)
>
>I am trying to gather the result of the survey. so when i click on the
>submit button I wanto collect the values from the entire form that were
>checked . Instead i get passed all the id rather than id that was checked 
>
><CFLOOP LIST="#form.fieldnames#" Index="field">
><cfif isDefined("form.fieldnames")>
><cfquery name="qryInsert" datasource="cfelsunrise" dbtype="odbc">
>               insert into answer (answer,empID) values
>(#evaluate(field)#,#session.empID#)
>       
>       
>       </cfquery>
>       </cfif>
></CFLOOP> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304492
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to