Re: [PHPLIB] oohforms: default CHECKED & radio From: Davor Cengija (davor <email protected>)
Date: 11/18/99

On Wed, 17 Nov 1999, Bob Strouper wrote:

>Hello,
>
>How do I get one radio button in a group of radio buttons
>to be checked?
>
>I have:
>...
>$f->add_element(array("type"=>"radio","name"=>"myradio"));
>...
>$f->show_element("myradio", "yes");
>$f->show_element("myradio", "no");
>...
>
>I would like to have the "'myradio', 'no'" element to
>include CHECKED="true" by default. Is this possible?

        Same thing as with SELECT.

if(!$myradio) $myradio="yes";
$f->load_defaults();
$f->show_element("myradio", "yes");
$f->show_element("myradio", "no");

        At least, that's the way I'm doing it.
>
>Thank you,
>Bob
>
>__________________________________________________
>FREE Email for ALL! Sign up at http://www.mail.com
>
>-
>PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
>To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
>the body, not the subject, of your message.
>

-- 
      v
Davor Cengija
davor <email protected>
===================================
"Please allow 30 days for delivery"

- PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>. To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in the body, not the subject, of your message.