Hello, thanks for your reply!
i found the solution here:
http://groups.google.com/group/cake-php/browse_thread/thread/21b2d153ab4b6d98/e3cd242c5583d029?lnk=gst&q=radio+selected&rnum=2#e3cd242c5583d029
the html code I get is the following:
<label for="FeedbackTimeofday">Time</label>
<input type="radio" name="data[Feedback][timeofday]"
id="timeofday_08:00-12:00" value="08:00-12:00" />08:00-12:00
<input type="radio" name="data[Feedback][timeofday]"
id="timeofday_13:00-17:30" value="13:00-17:30" />13:00-17:30
<input type="radio" name="data[Feedback][timeofday]"
id="timeofday_value" value="value" />08:00-12:00
How can I make "08:00-12:00" as selected?
Any idea?
Best regards
Ralph
On 18 Apr., 13:25, jeko <[EMAIL PROTECTED]> wrote:
> The HTML output should tell you what the problem is. Basically, you
> are supplying a third radio option, check the HTML source, it will
> make sense.
>
> On Apr 18, 5:55 am, szeta <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I found an answer how to select an option in the html-radio helper
> > with the 'value' field in the options-array.
> > It does not work for me:
>
> > <?php echo $html->radio('Feedback/timeofday',
> > array('08:00-12:00'=>'08:00-12:00','13:00-17:30'=>'13:00-17:30',
> > 'value'=>'08:00-12:00')); ?>
>
> > I am expecting:
> > (*) 08:00-12:00
> > ( ) 13:00-17:30
>
> > But the result looks like:
> > ( ) 08:00-12:00
> > ( ) 13:00-17:30
> > ( ) 08:00-12:00
>
> > What am i doing wrong?
>
> > Regards
> > Ralph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---