Custom data forms in CakePHP

Posted by Affian on Stack Overflow See other posts from Stack Overflow or by Affian
Published on 2010-05-07T09:30:25Z Indexed on 2010/06/01 2:03 UTC
Read the original article Hit count: 315

Filed under:
|
|
|

I'm building a controller to manage group based ACL in CakePHP and when I create or edit a group I want to be able to select what permissions it has. The group data table only stores a group ID and a group Name as the permissions are stored in the ACO/ARO table.

I have an array from the ACO that I want to turn into a set of checkboxes so you can check them to allow access from that group to that ACO. So first off, how do I turn this array into a set of checkboxes. The array looks like this:

array(
    [0] => array(
        [Aco] => array(
            [alias] => 'alias'
            [id] => 1)
        [children] => array (
            [0] => array(
                [Aco]=>
            ...etc  
    ))
    [1] => array(
        ...etc
)

My next question is how can I check these once the form has been submitted to the controller to allow the selected actions?

[Update] Ok changing the angle of my question, how can I use the Form helper to create forms that are not based on any Model?

© Stack Overflow or respective owner

Related posts about php

Related posts about forms