You need to manually modify the code, scaffolding cannot guess
everything for you.
It's pretty easy to add a default/empty option to your input(), see
the API for syntax.
On Aug 19, 9:18 am, 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
-~----------~----~----~----~------~----~------~--~---