Re: Custom empty value for selectTag

2006-12-04 Thread shanlalit
in place of $levelID, in the form use (array('' = 'Select level') + $levelID) :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To

Re: Custom empty value for selectTag

2006-04-27 Thread kain
I use this: $array_prezzi = $this-Cost-generateList('Cost.contract_id = '.$contract_id.'', 'id ASC'); if (is_array($array_prezzi)) { $this-set('prezzi', array('' = 'TUTTI') + $array_prezzi); } else {

Re: Custom empty value for selectTag

2006-04-26 Thread saavedrajj
thanks but doesn't work: I have this in my controller: $this-set('levelID', am(array(0 = 'Select a Level')), $this-User-Level-generateList( null, name_en ASC)); and only view shows: ?php echo $html-selectTag('User/level_id', $levelID, null, null, $html-tagValue('User/level_id'), true);?

Re: Custom empty value for selectTag

2006-04-26 Thread nate
If you read the API, you'll notice that the last parameter in selectTag is called $showEmpty. In the code above, you have it set to true. What do you suppose that does? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Custom empty value for selectTag

2006-04-25 Thread saavedrajj
There's a way to asign a name and a value for the empty value of a salecTag? for example: select name=data[User][user_level_id] option value=0Select a Level/option // -- CUSTOM EMPTY VALUE option value=1Administrator/option option value=2Editor/option option value=3Guest/option