Re: [Phplib-users] OOHForm - radio button
Brought to you by:
nhruby,
richardarcher
From: Marko K. <M.K...@os...> - 2002-10-01 11:01:08
|
> Unfortunately I can't find any examples in the documentation > on how to define radio buttons. The same problem with examples for checkboxes. Also it's not really obvious how to validate radiobuttons and checkboxes? How to properly define a default value (since usually there is nothing selected at the beginning) and how to process the result. Would be really good to improove the manual for this part. I also experimented with it, but couldn't really make it work. For instance, if I define my radio controls using: $f->add_element(array('type'=>'radio', 'name'=>'question', 'valid_e'=>'Please select an option', 'multiple'=>TRUE)); and output them with: for($i=0;$i<4;$i++) echo '<BR>'.$f->ge('question','Choice #'.$i) The text Choice#? won't be rendered as expected. The same for the checkboxes. Does anyone have a properly working example for these controls? Thanks in advance! Marko |