brilliant.. thanks so much!
On Aug 19, 3:54 pm, grigri <[EMAIL PROTECTED]> wrote:
> Try this:
>
> echo $form->input('user_id', array('empty' => 'No User'));
>
> On Aug 19, 2:18 pm, thom <[EMAIL PROTECTED]> wrote:
>
> > ok, i have a users and an authors table:
>
> > User hasOne Author
> > Author belongsTo User
>
> > this is so i can link an author to a user-account (for page login)..
> > it is however optional.. i have to be able to create authors that
> > arent related to any user which is where the problem comes in.. after
> > doing al the scaffolding with: cake bake all
>
> > i am presented with all the right forms.. adding/editing an author
> > allows me to select the related user.. HOWEVER: it doesn't allow me to
> > select no user.. im talking about something like <option value="">--
> > none --</option>.. please note that i made sure the user_id field in
> > authors allows NULL values.. furthermore there are no validation rules
> > set for user_id in the Author Model so that should default to required
> > = false!?
>
> > im out of guess here.. i know there are probably ways to hack the view
> > but i want scaffolding to do the work for me.. are there any modifiers/
> > options i forgot?
>
> > or at least something like
>
> > $form->input('user_id', array('required' => false));
>
> > in the view? i checked the 1.2. docs without any luck.. any advice/
> > places to look appreciated..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---