your form is post(most likely) will be in $this->data, so just do some
sort of logic in your controller to see if delete is set then delete
it, then see if publish is set then publish the thing / unpublish the
thing.
On Nov 24, 2:40 pm, Josey <josey.mor...@gmail.com> wrote:
> Is it possible to have multiple controller actions in one form?
>
> What I'm trying to do is this:
>
> I have a form that lists all my posts, if you're logged in as admin
> you get a checkbox beside every post.
> You would select these checkboxes to perform certain actions.
>
> As of right now I have it pointing towards my delete action to remove
> multiple rows in the database at once. Works like a charm.
>
> What I struggle with is the fact that "Publish/unpublish" will also be
> an option alongside "Delete" so how do I tell the form what action the
> button is supposed to take?
>
> Thanks to all.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment