It looks like you are trying to loop over, for example, the results for
newsletter A.  You don't need to.  Newsletter A's result should be a
single value -- either online, hardcopy, or "both".

You are also checking to see if Newsletter A's result exists.  If one of
the radio buttons is checked, it will.  If you plan to have situations
where none of the buttons for that newsletter are selected, it would
probably be better to add a "neither" category instead.

I don't know if that answers your question, but I hope it helps get a
better fix on the problem in general.

--Ben Doom

Gilbert Midonnet wrote:

> I'm getting lost doing something that I thought would be easy. Loops
> that work well with checkboxes break with radio buttons. Updates aren't
> working and I'm going crazy.
>
> A client would like there to be a list of newsletters for customers to
> order. Each newsletter can be seen on-line, have a hardcopy, or both.
>
> NAME OF NEWSLETTER --- ONLINE --- HARDCOPY --- BOTH
> NEWSLETTER A ------------ O ---------- O ------ O -
> NEWSLETTER B ------------ O ---------- O ------ O -
> NEWSLETTER C ------------ O ---------- O ------ O -
> NEWSLETTER D ------------ O ---------- O ------ O -
> NEWSLETTER E ------------ O ---------- O ------ O -
>
> It's the inserting/updating that's driving me nuts.
>
> Checkboxes are simple but radio buttons are driving me nuts.
>
> The loop below works well for checkboxes.
>
> <cftransaction>
> <cfif isDefined ("some_name")>
> <cfloop list="#FORM.some_name#" index="myLoop">
>
> <cfquery>
>
> </cfquery>
>
> </cfloop>
> </cfif>
> </cftransaction>
>
> I've been unable to make it work for radio buttons.
>
> In the first place the name of the checkboxes have to be different. So I
> do something like.
>
> <input type="radio" name="deliveryMethod#newsletterID#">
>
> All my lists and loops are failing. I'm now on my 50th permutation and
> going crazy.
>
> Gil
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to