Date: 10/23/00
- Next message: Arno A. Karner: "Re: [phplib] PHPLib prepend setting confusing other virtuals"
- Previous message: John Melville: "[phplib] PHPLib prepend setting confusing other virtuals"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Greetings,
After wading through the PHPLib docs and fiddling with lots of code,
here is some clarification on using radio buttons (specifically how to
handle the default checked button) and OOH Forms.
When declaring your fields in setup_fields, only do one add_element for
your radio button group (no matter how many elements there may be):
$this->form_data->add_element(array( "type" => "radio",
"name" => "thing",
"value" => "default_value"));
This will be the default checked value for the radio group. Then when
you render the form, add any additional radio elements as you need:
echo "Pick a thing:\n";
echo "Default Thing:";
$this->form_data->se("thing","default_value"); // This will be
checked by default
echo "Thing 1:";
$this->form_data->se("thing","firstthing");
echo "Thing 2:";
$this->form_data->se("thing","secondthing");
echo "Thing 3:";
$this->form_data->se("thing","thirdthing");
There was a thread on this very issue a while ago but I don't think the
question was ever answered to anyone's satisfaction.
Hope this helps,
Jon
-- | v Jonathan Gale, Caldera Systems | | ( ) email: jgale <email protected> | | ~ http://www.caldera.com |--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Arno A. Karner: "Re: [phplib] PHPLib prepend setting confusing other virtuals"
- Previous message: John Melville: "[phplib] PHPLib prepend setting confusing other virtuals"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

