Techbirds | Knowledge Hub
How to create a rounded button in android: For Example like this: Step1: add a xml file button_round.xml in drawable folder with following code:
replace these lines with :
10 total views, 1 views today
10 total views, 1 views today
Problem : model which doesn’t actually have a table. for example validating a form on site e.g contact form Solution :
class ContactForm extends AppModel { var $name = ‘contactForm’; var $useTable = false; var $_schema = array( ‘name’ => array(‘type’=>’string’, ‘length’=>100), ’email’ => array(‘type’=>’string’, ‘length’=>255), ‘details’ => array(‘type’=>’text’) ); var $validate = array( ‘name’ => array( ‘rule’=>array(‘minLength’, 1), ‘message’=>’Name is required’ ), ’email’ => array( ‘rule’=>’email’, ‘message’=>’Must be a valid email address’ ), ‘details’ => array( ‘rule’=>array(‘minLength’, 1), ‘message’=>’Feedback is required’ ) ); }
class ContactForm extends AppModel { var $name = ‘contactForm’; ‘name’ => array(‘type’=>’string’, ‘length’=>100), ’email’ => array(‘type’=>’string’, ‘length’=>255), ‘details’ => array(‘type’=>’text’) ‘rule’=>array(‘minLength’, 1), ‘message’=>’Name is required’ ), ‘message’=>’Must be a valid email address’ ), ‘rule’=>array(‘minLength’, 1), ‘message’=>’Feedback is required’ ) |
Note: just use var $useTable = false; 9 total views, no views today
9 total views, no views today