online9873
New Member
I am using CakePHP 2.2.3. I have a contact form with a model without a table but with validation rules.My problem is, how to tell CakePHP that the input type is textarea ? I could use \[code\]$this->Form->textarea()\[/code\] but I've noticed that when I use it, it doesn't create the proper HTML to report validation errors back. If I use \[code\]$this->Form->input()\[/code\] it just creates a normal input type text.It should create something like:\[code\]<div class="input email required"><input name="data
" required="1" type="email" id="QuoteEmail"/></div>\[/code\]but instead it creates something like:\[code\]<textarea name="data[Quote][company_description]" id="QuoteCompanyDescription"></textarea>\[/code\]notice the absence of \[code\]<div class="input email required"></div>\[/code\], which I assume is the DOM element CakePHP uses to inject the validation error.I would like to know what's the best way to achieve this.