[eluser]ci_mohammed[/eluser]
hi all
this is my first Topic in the forum , i hope to find some help ,
can some one tell me how to use radiogroup in Form Generation Library.
pls some one tell me how to use it in controller and model .
i trying to use it but i faced some problem .
here is what i do
in model
Code:
$news->isInMain = $data['isInMain'];
$news->isactive = $data['isActive'];
$news->can_comment = $data['can_comment'];
in controller
Code:
$isInMain[] = array(1, 'yes');
$isInMain[] = array(0, 'no');
$isActive[] = array(1, 'yes');
$isActive[] = array(0, 'no');
$can_comment[] = array(1, 'yes');
$can_comment[] = array(0, 'no');
$this->form->radiogroup('isInMain', $isInMain, 'isInMain:', '1', 'required')->br();
$this->form->radiogroup('isActive', $isActive, 'isActive:', '1', 'required')->br();
$this->form->radiogroup('can_comment', $can_comment, 'comment:', '1','required')->br();
this it error msgs that i faced
-------------------------------------
A PHP Error was encountered
Severity: Notice
Message: Undefined index: isInMain
Filename: models/News.php
Line Number: 29
------------------------------------
------------------------------------
A PHP Error was encountered
Severity: Notice
Message: Undefined index: isActive
Filename: models/News.php
Line Number: 30
------------------------------------
------------------------------------
A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: mysql/mysql_driver.php
Line Number: 552
------------------------------------
can some one tell me the problem ..
or to tell me how to use it step by step , and i will be very grateful .