in reply to nesting foreach statements
Let's say you have a group called "color" with values red, yellow and green, and you want to pre-select this in a form (where the field is also called "color").
In our example, you read in your data file and find the user has selected green. So:
Then when creating form, print thismy $q = new CGI; $q->param('color','green');
and the correct color will already be selected.$q->radio_group(-name=>'color', -values=>['red','yellow','green']);
hth
cLive ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (cLive ;-)Re: nesting foreach statements
by Ogmios (Initiate) on Apr 07, 2002 at 00:01 UTC | |
by cLive ;-) (Prior) on Apr 07, 2002 at 04:38 UTC |