Hi Hugo,
Try this in your scaffold edit-file (edit.ctp):

        $scaffoldFields=array_flip($scaffoldFields);
        foreach($scaffoldFields as &$v){
                $v=array('empty'=>'');
        }

...this sould be before this part (this is unmodified code):

        echo $form->create();
        echo $form->inputs($scaffoldFields, array('created', 'modified',
'updated'));
        echo $form->end(__('Submit', true));


regards Jonas:))


On Aug 15, 8:24 pm, Hugo M <ham1...@gmail.com> wrote:
> Ok, thanks! I think scaffolding is a good tool but is not enough when
> you need something else than ABM. Anyway, I think empty values in
> combos should be added to scaffolding x). Too bad is not a "can be
> null" config belongs to param or something like that.
>
> 2010/8/15 euromark <dereurom...@googlemail.com>:
>
> > i never use scaffold...
> > make sure your baking templates are as you need them, bake the views
> > and simply add the missing (new) fields by hand if they are introduced
> > later on
> > thats almost quicker and allows you to modify the empty param and
> > other stuff permanently.
>
> > On 15 Aug., 19:49, Hugo M <ham1...@gmail.com> wrote:
> >> Yeah, I use scaffolds only in backend. The problem is I'm creating new
> >> fields and modelds in the database and I don't want to update (for
> >> now) my controllers every time, so scaffolding is perfect for me (at
> >> backend).
>
> >> 2010/8/15 Jeremy Burns | Class Outfit <jeremybu...@classoutfit.com>:
>
> >> > I would move off of scaffolds and on to your own code. Scaffolds are for 
> >> > quick and dirty, not production/proper sites - and you get the benefit 
> >> > of learning so that you won't need to rely on scaffolds in future.
>
> >> > Jeremy Burns
> >> > Class Outfit
>
> >> > jeremybu...@classoutfit.com
> >> >http://www.classoutfit.com
>
> >> > On 15 Aug 2010, at 02:58, Hugo M wrote:
>
> >> >> Hi! I have some scaffolded controllers and a model Service with a
> >> >> belongs to relationship with model user. The thing is that the service
> >> >> may not have an owner (user). There's a way to show an empty parameter
> >> >> in a scaffolded controler's combo? I know empty parameter works with
> >> >> $form->select but with scaffold I can't put that parameter :S.
>
> >> >> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> >> >> with their CakePHP related questions.
>
> >> >> You received this message because you are subscribed to the Google 
> >> >> Groups "CakePHP" group.
> >> >> To post to this group, send email to cake-php@googlegroups.com
> >> >> To unsubscribe from this group, send email to
> >> >> cake-php+unsubscr...@googlegroups.com For more options, visit this 
> >> >> group athttp://groups.google.com/group/cake-php?hl=en
>
> >> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> >> > with their CakePHP related questions.
>
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "CakePHP" group.
> >> > To post to this group, send email to cake-php@googlegroups.com
> >> > To unsubscribe from this group, send email to
> >> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> >> > athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to