Hi all,
--
-- In my Cake 2.3 app I'm using saveAll($this->request->data, array('deep' => true)) to save deep model associations and the validation is working fine. My input fields for any deeply associated models have the error class applied if I try to submit the form having left them blank, which is great.
The problem is that the Form helper isn't adding the "required" class to the div of any deeply associated models - e.g.:
-----
echo $this->Form->create('MyModel');
echo $this->Form->input('MyModel.required_field); // this field correctly has the "required" class :-)
echo $this->Form->input('MyRelatedModel.required_field); // this field also has the "required" class :-)
echo $this->Form->input('MyRelatedModel.AnotherModel.required_field); // this field does NOT have the "required" class :-(
-----
Does anyone know of a solution?
Thanks!
Alex
Alex Bovey
Web Developer | Alex Bovey Consultancy Ltd
Registered in England & Wales no. 6471391 | VAT no. 934 8959 65
alex@bovey.co.uk | t 0844 567 8995 | m 07828 649386 | f 0870 288 9533
PHP | CakePHP | MySQL | jQuery | HTML5 | CSS3 | Drupal | Wordpress | Hosting
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment