• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[HELP] Form Generation Library (radiogroup )

#1
[eluser]ci_mohammed[/eluser]
hi all Smile

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 .


Messages In This Thread
[HELP] Form Generation Library (radiogroup ) - by El Forum - 05-01-2012, 05:27 PM
[HELP] Form Generation Library (radiogroup ) - by El Forum - 05-01-2012, 08:16 PM
[HELP] Form Generation Library (radiogroup ) - by El Forum - 05-01-2012, 08:29 PM
[HELP] Form Generation Library (radiogroup ) - by El Forum - 05-02-2012, 06:36 AM
[HELP] Form Generation Library (radiogroup ) - by El Forum - 05-02-2012, 06:52 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.