Re: Form validation problem. (COMPLETED)

by "Mike Taylor" <lonewolf(at)one.net>

 Date:  Fri, 27 Apr 2001 00:35:19 -0400
 To:  "Charlton,
Mark" <Mark.Charlton(at)saint-gobain.com>,
<hwg-languages(at)hwg.org>
 References:  CRYNT40SRV
  todo: View Thread, Original
Gotcha.  So I should really rename my database columns to reflect the rank
number, not the value if I want this to work.

For example, right now in my SQL database table that houses this
information, I named the columns, "RED," "GREEN" and "BLUE" and then my plan
was to insert into each column the rank value.    But by your approach I
should really reverse this,  naming the columns "rank1, rank2, etc."

This way, I'd eliminate any need for client-side validation, because the
forms would do it by virtue of the like-named radio buttons.

Thanks for the help!
Mike

----- Original Message -----
From: "Charlton, Mark" <Mark.Charlton(at)saint-gobain.com>
To: "'Mike Taylor'" <lonewolf(at)one.net>; <hwg-languages(at)hwg.org>
Sent: Thursday, April 26, 2001 9:16 PM
Subject: RE: Form validation problem. (COMPLETED)


> I would suggest that you have 5 radio button groups.  GRoup 1, group 2,
...
> group 5.
>
> Set up like this:
>
> <.h1>Q1) Best colour for tomato soup<./h1>
>
> RED
> <.input type=radio name='Q1 Rank 1' value=red>
> <.input type=radio name='Q1 Rank 2' value=red>
> <.input type=radio name='Q1 Rank 3' value=red>
> <.input type=radio name='Q1 Rank 4' value=red>
> <.input type=radio name='Q1 Rank 5' value=red>
>
> GREEN
> <.input type=radio name='Q1 Rank 1' value=GREEN>
> <.input type=radio name='Q1 Rank 2' value=GREEN>
> <.input type=radio name='Q1 Rank 3' value=GREEN>
> <.input type=radio name='Q1 Rank 4' value=GREEN>
> <.input type=radio name='Q1 Rank 5' value=GREEN>
>
>
> BLUE
> <.input type=radio name='Q1 Rank 1' value=BLUE>
> <.input type=radio name='Q1 Rank 2' value=BLUE>
> <.input type=radio name='Q1 Rank 3' value=BLUE>
> <.input type=radio name='Q1 Rank 4' value=BLUE>
> <.input type=radio name='Q1 Rank 5' value=BLUE>
>
> That should force only one rank per question, but should return
>
> Q1 Rank 1 = BLUE
> Q1 Rank 2 = GREEN
> Q1 Rank 3 = RED
>
> HTH
> Mark

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.