Hi,
> Does no one know how to declare a selectTag, so that the first empty
> entry is selected by default?
Normally, you would set an entry to be selected by default like this:
$html->selectTag(
'User/contact',
$Contactlist,
$html->tagValue('User/contact') ? $html->tagValue('User/contact') :
'xxx',
array( 'size' => '10', 'multiple' => 'multiple')
)
where xxx is the option value to be selected.
The automatically added element by $html->selectTag() has no value, so I see
only 2 possibilities:
- you add the empty element "by hand" to $Contactlist and give it a value
- or you write your own helper method selectTag() where you can assign a
value to the autogenerated element.
Hope this helps :)
Heiner
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---