How do i get the form field contents while editing (updating) entries in database ? |
[eluser]Pokhara[/eluser]
my controler is Code: function edit_lsidebar(){ and model is Code: function edit_lsidebar($heading, $content_text, $url, $link_text){ all i want is see the contents in the forms while editing fields. How do i do it ?
[eluser]mi6crazyheart[/eluser]
Sorry, if i miss-understood u'r question. But, if u want to see the content of u'r form then u can do htis by using this input function... Code: echo $this->input->post('heading'); // This will show u the content of heading input field of u'r form Similarly, u can get others input field's content by that input function where(Inside controller function or model function) ever u want.
[eluser]Pokhara[/eluser]
Yes, i want to see the contents of the form in views while editing contents. So what will be my controller and views ? when i do this in views Code: <input type="text" name="heading" value="<?php echo $heading?>" size="50" /> i get this Code: Severity: Notice any help would be appreceated
[eluser]mi6crazyheart[/eluser]
Are u validating u'r form data in u'r controller by using CI's form validation class ? I think u might've not. You should go through this portion of validation class: http://ellislab.com/codeigniter/user-gui...latingform If u use validation class according as it has shown in user_guide then, validation class it self send all those form fields value automatically to view if any error cause. Bcz, the error which is coming in u'r side is occurring for that reason. My suggestion, just do accordingly as it has shown in user_guide. |
Welcome Guest, Not a member yet? Register Sign In |