Re: Empty combo option + scaffolding

2010-08-25 Thread jonne
Hi Hugo, I really like the scaffolding-feature, and for my purpouse it's often enough. I was looking for the same as you where, and have a suggestion (a little late, though...): Add the following code to the scaffold edit-view where you want the empty values to display:

Re: Empty combo option + scaffolding

2010-08-25 Thread jonne
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();

Re: Empty combo option + scaffolding

2010-08-15 Thread Jeremy Burns | Class Outfit
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

Re: Empty combo option + scaffolding

2010-08-15 Thread Hugo M
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

Re: Empty combo option + scaffolding

2010-08-15 Thread euromark
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

Re: Empty combo option + scaffolding

2010-08-15 Thread Hugo M
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

Empty combo option + scaffolding

2010-08-14 Thread Hugo M
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