CodeIgniter Forums
form helper generated form is above head tags[SOLVED] - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: form helper generated form is above head tags[SOLVED] (/thread-13071.html)



form helper generated form is above head tags[SOLVED] - El Forum - 11-10-2008

[eluser]quince[/eluser]
Hi people,
i'm using form helper and have got one problem with it
in controller file i load->helper('form') and add form elements and then load->view('someview').Generated form looks ok and acts exactly i want but in the view file form is the first object, i mean it's even before-above head tags so it's first thing you see then is the rest of view file, text, some dom objects ect...
How to put form where it "belongs" ?
Thanks


form helper generated form is above head tags[SOLVED] - El Forum - 11-10-2008

[eluser]narkaT[/eluser]
the form-helper-functions are meant to be executed in a view file Smile


form helper generated form is above head tags[SOLVED] - El Forum - 11-10-2008

[eluser]rogierb[/eluser]
You add form elements in your controller?
And then load your view?

If so, it makes sence the form is displayed before the view.

Add the form elements to your view. That should solve it(at least if I understood you correctly)

R.


form helper generated form is above head tags[SOLVED] - El Forum - 11-10-2008

[eluser]quince[/eluser]
yes it makes sence.... Smile
thanks you both, what a noob i am
cheers
Smile