0

I've a form in Zend that I use to manage the privileges of a series of resources (we're talking about dynamic ACLs stored in a db). So, for each of them I want to decide, through a select element (dropdown) who has the access. The controller will receive the request and handle it. My question is: how can I do to add elements to the form for having the possibility to store all the choices in one single array composed by many elements as the number of select element of form? Can I ask you a short real example? Thank you!

1 Answer 1

1
$myArray = array(   ''=>'Select',
                           'Father'=>'Father',
                           'Mother'=>'Mother',
                           'Brother'=>'Brother',
                           'Sister'=>'Sister',
                           'Daughter'=>'Daughter',
                           'Son'=>'Son',
                           'Other'=>'Other',
                 );

'relationship' => array(
                    'type'=>'select',
                            'options'=>
                                    array(
                                    'label'=>'Relation',
                                    'multiOptions' => $myArray,                                                            
                                    )
                ),

OR

check this

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.