"Why create the FormHelper an additional hidden input field?!?!?!"
there is nothing wrong.the answer can be found here: http://stackoverflow.com/questions/10049917/cakephp-checkbox-is-showing-extra-hidden-field/10049937#10049937
Am Dienstag, 24. April 2012 14:48:07 UTC+2 schrieb Sipatshi:
hi,Controller:class ConfigurationsController extends AppController {
public $components = array(
'Security'
);
public function index(){
/*..................*/
}
}View:<?php
echo $this->Form->create('Configurations ');
echo $this->Form->input('Trader.name'); /****Settings:table: traderscolumn: has_ftp tinyint(1)View Result:<div class="input checkbox"><input type="hidden" value="0" id="TraderHasFtp_" name="data[Trader][has_ftp]"><input type="checkbox" id="TraderHasFtp" value="1" name="data[Trader][has_ftp]"><label for="TraderHasFtp">Has Ftp</label></div>Question:Why create the FormHelper an additional hidden input field?!?!?!****/
echo $this->Form->input('Trader.has_ftp');
echo $this->Form->input('Ftp.ftp_server');
echo $this->Form->input('Ftp.ftp_login_name');
echo $this->Form->input('Ftp.ftp_password');
echo $this->Form->input('Ftp.root_directory'); /****Settings:
table: ftps
column: vendor tinyint(1)
View Result:<div class="input text">
<label for="FtpVendor">Vendor</label>
<input type="text" id="FtpVendor" name="data[Ftp][vendor]">
</div>Question:The FormHelper creates an input field instead of a checkbox!?!?!***/
echo $this->Form->input('Ftp.vendor');
echo $this->Form->end('Absenden');//What i´m doing wrong?
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment