It helped a lot but I still have some questions.
It looks as if you can't pull a value in this method. Everything must come from the name field. So for example
the root name (so to speak) is deliveryMethod and the publicationID and delivery method need to be combined with the name.
<input type="radio" name="deliveryMethod#publicationID#online">
To make pulling data easier I would use 1,2,3 for the delivery method
1= online
2= mail
3= both
EXAMPLE BELOW:
<cftransaction>
<cfloop list="#FORM.fieldnames#" index="i">
<cfif i CONTAINS "info_purchase">
<cfquery name="deliveryMethod" datasource="">
INSERT INTO deliveryMethod
(
customerID,
customerRequestItem,
deliveryMethod
)
VALUES
(
'#FORM.customerID#',
'#Mid(i,14,11)#',
#Right(i,1)#
)
</cfquery>
</cfif>
</cfloop>
</cftransaction>
It works, thanks very much. Just wondering if I'm missing anything here.
==================
>Gilbert,
> This should loop over all the radio buttons that were in the
>submitted form who's name starts with 'deliverymethod'.
>
>Greg
><cftransaction>
> <cfif isDefined("form.submit")>
> <cfloop list="#FORM.fieldnames#" index="i">
> <cfif i CONTAINS "deliverymethod">
> <cfquery>
> stuff
> </cfquery>
> </cfif>
> </cfloop>
> </cfif>
></cftransaction>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

