Re: Allow empty selection for relationship id (NULL)
debug your bake scripts variables - especially the content of the
schema
it might be in there somewhere if NULL is allowed or not
then you can easily change the default behavior
well, because its not that important - at least not for anybody
else :)
but as the core team would say: "feel free to provide a patch"
if you do that they might put it in. and you are happy.
On 25 Jan., 00:14, Ryan Schmidt <google-2...@ryandesign.com> wrote:
> Well, I don't want all belongsTo relations to allow NULL selections; logically, I only want this allowed for those defined in the database as allowing NULL values. So my question is how can I do that, and my second question is why the default cake baking templates don't already do that.
>
> On Jan 24, 2011, at 04:53, euromark wrote:
>
>
>
>
>
>
>
> > you will need to create a custom template
> > /templates/custom/views/form.ctp
>
> > and add your empty=>'' snippet for all "belongsTo" relations
>
> > On 24 Jan., 02:45, Ryan Schmidt wrote:
> >> Thanks, that works great, specifically:
>
> >> echo $this->Form->input('some_id', array('empty' => ''));
>
> >> But I wonder why the bake templates don't set that up properly for me, and how I could modify the bake templates to do so.
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home