function __construct() { $this->attr(['action' => '/add', 'method' => 'post']); //we add the fields here $this->add(['name' => F::text()->maxlength(45)->label('Name')->required(), 'address' => F::textarea()->maxlength(200)->label('Address')->required(), 'save' => F::submit()->html('Save')->addClass('btn btn-default')]); //We set the relation with the database $this['name']->table = 'customer'; $this['name']->col = 'name'; $this['address']->table = 'customer'; $this['address']->col = 'address'; }