It's not a bug.

That's not how multiple select boxes are meant to work. What you really need
is a menu option that says "None" or "-". This CLEARLY shows the user that
he's now selecting nothing. To do this go here:
http://www.webdevelopment2.com/stupid-cakephp-trick-day-generatelist-empty-slot/

Basically, in your view (can't be uses with scaffolding obviously) you do
something like this:
echo <http://www.php.net/echo> form->input(group_id,
array<http://www.php.net/array>
('empty' => '–'));

--
Baz L
Web Development 2.0
http://WebDevelopment2.com/
On Dec 6, 2007 6:40 AM, Patrick Dinger <[EMAIL PROTECTED]> wrote:

>
> Hi,
> i solved it with a model function, but i think this is a bug in
> scaffolding and should be solved.
>
> my code:
>
>        function beforeSave()
>        {
>                if (!isset($this->data['Group']))
>                        $this->execute("DELETE FROM groups_tabgroups WHERE
> tabgroup_id =
> " . $this->data['Tabgroup']['id']);
>                return true;
>        }
>
>
> mfG,
> PD
>
> On 6 Dez., 11:36, Patrick Dinger <[EMAIL PROTECTED]> wrote:
> > Hi,
> > i am not sure if this a bug or a feature.
> >
> > I have three tables: users, groups and an assignment table.
> >
> > I am using scaffold to assign users to groups. The edit page shows me
> > a select box in which i am able to select the groups the user is
> > member of.
> >
> > When i use STRG+Click in the select box I am able to remove all groups
> > from the user so he should no longer assigned to any group. But when i
> > click save the assignment is not saved to the database.
> >
> > How do i solve this problem?
> >
> > Thx in adanvance
> > Patrick Dinger
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to