Re: Cake 3 - Modelless Forms with nested forms / elements

2015-06-02 Thread slowjack2k
Hi Karthik, I don't know how your answer should solve my problem. Maybe I didn't explain it enoug. I would like to have a Form, where I can fill in multiple Phonenumbers and I don't know bevor hand how many phone numbers there will be. After receiving the data from the user I want to validate t

Re: Cake 3 - Modelless Forms with nested forms / elements

2015-06-01 Thread Karthik Keyan
Hi, Create the form name in /src/UserForm1.php namespace App\Form; use Cake\Form\Form; use Cake\Validation\Validator; class UserForm1 extends Form { protected function _buildValidator(Validator $validator) { return $validator ->notEmpty('annul_income', 'plea

Cake 3 - Modelless Forms with nested forms / elements

2015-05-31 Thread slowjack2k
Hi, within the documenation I did only find a simple example (http://book.cakephp.org/3.0/en/core-libraries/form.html). Is it possible to create a form with "Sub-Forms"? class PhoneNumberForm extends Form end class ContactForm extends Form{ protected function _buildSchema(Schema $schema)