NEWBIE ALERT! - Basic Form: Please help me find my fault - 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: NEWBIE ALERT! - Basic Form: Please help me find my fault (/showthread.php?tid=42821) |
NEWBIE ALERT! - Basic Form: Please help me find my fault - El Forum - 06-20-2011 [eluser]John Lopez[/eluser] Message: Hi guys! I am new to CI and is starting to play around with the form_helper() functions. I have written the following set of code blocks, I always comment my practices so it would be easy for me to share to you guys if I get stuck on something. Can you please tell me my fault? My instinct tells me I am following the User Guide correctly, but my mind tells me I am doing something wrong, but I can't pinpoint where it is. Too much chatter, here's my MVC. (I don't use a database yet so I don't have a Model.) View Code: <!DOCTYPE HTML> Controller Code: class Home_controller extends CI_Controller { Result Styling a Contact Form The Default Style Code: Fatal error: Call to undefined function form_open() in C:\xampp\htdocs\ci_formdesign\application\views\home_view.php on line 43 There you go, critics are very welcome to express their thoughts! :-P NEWBIE ALERT! - Basic Form: Please help me find my fault - El Forum - 06-20-2011 [eluser]John Lopez[/eluser] I GOT THE SOLUTION Sorry about this guys, the only thing i forgot is loading the form helper itself. NEWBIE ALERT! - Basic Form: Please help me find my fault - El Forum - 06-20-2011 [eluser]Aken[/eluser] You need to load most helpers prior to using them! Add this to any controller method that utilizes the helper: Code: $this->load->helper('form'); NEWBIE ALERT! - Basic Form: Please help me find my fault - El Forum - 06-20-2011 [eluser]InsiteFX[/eluser] You also have this wrong! Code: echo '<p>' . form_textarea($input_name) . '</p>'; NEWBIE ALERT! - Basic Form: Please help me find my fault - El Forum - 06-21-2011 [eluser]John Lopez[/eluser] Thanks guys! I have it working already... It was all a mix up of careless placement of code and a short span of patience.. haha! :-P |