Looks like if I use the name with index like 'category.0.subcategory' but
I can't get consistent result. 

Is there any limitation of how deep I can go?

I am using 1.2.8

Shinya

-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of cake-learner
Sent: Wednesday, December 15, 2010 10:54 PM
To: CakePHP
Subject: possible to create a nested post with forms?

I am trying create a form so that when post that data this will still
keep the relationships with other element.
Say i have a category name and a subcategory name like shown in below.
How can i define the form so that the relationship between this
category and subcategory will be kept when submitted?

Category 1
-subcategory 1
Categ 2
-subcategory 1
-sbucategory 2

and this form is submited

Array{
   Category => Array{
                          name => 'Category 1'
                          subcategory => Array{
                                                       'name' =>
'subcategory'
}
}

<?= $form -> input( 'Category.name', array( 'name' =>
'Category.name[]', 'label' => '', 'class' => 'category_title' ) ); ?>

Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.

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+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to