CodeIgniter Forums
Field Classes (help me) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Field Classes (help me) (/showthread.php?tid=9838)



Field Classes (help me) - El Forum - 07-10-2008

[eluser]najm[/eluser]
welcom

i am newbie in codeigniter and i want to do a captcha with rapyd Field Classes i write the code but it does not work this is my code please help me :

Code:
<?php
class Captcha_rapyd extends Controller {  
  
    function Captcha_rapyd()  
     {  
          parent::Controller();  
          $this->load->library("rapyd");  
     }
     function index()
     {
         $this->rapyd->load("fields");    
        
        
         $form->captcha = new captchaField("captcha", "captcha");  
        
        $form->build();  
        $data["output"] = $title->output;  
        $data["rapyd_head"] = $this->rapyd->get_head();      
        
     }
}
  
  
?>



Field Classes (help me) - El Forum - 07-10-2008

[eluser]najm[/eluser]
thank you i have solve this problem :

the controller :

Code:
<?php
class Captcha_rapyd extends Controller {  
  
    function Captcha_rapyd()  
     {  
        parent::Controller();  
        $this->load->library("rapyd");  
     }
     function index()
     {
        $this->rapyd->load("fields","dataform");  
        
        $form = new DataForm("captcha_rapyd/index/process");  
        $form->captcha = new captchaField("captcha", "captcha");
        
        //$form->build($form);
        $form->build_form();
        $data["output"] = $form->output;  
        $data["rapyd_head"] = $this->rapyd->get_head();          
        $this->load->view('captcha_rapyd_view',$data);
    }
}
  
  
?>


the view (view name is captcha_rapyd_view) :

Code:
<?=$output?>
<?=$rapyd_head?>