i add elements like this. i want this element to appear inside a div ..how do i do it..?
$form->addElement('text','first_name','First Name:');
asked Aug 31, 2010 at 10:28
Hacker
7,92620 gold badges91 silver badges169 bronze badges
-
5Please don't bombard us with that many details.phimuemue– phimuemue2010年08月31日 10:32:15 +00:00Commented Aug 31, 2010 at 10:32
-
3what framework are you using?knittl– knittl2010年08月31日 10:32:25 +00:00Commented Aug 31, 2010 at 10:32
1 Answer 1
i'll just shoot into the dark and assume the following:
$form->addElement() will return some sort of class object representing an html element. therefor, create a div element, save it to a variable and add the text element (whatever that may be ... <input type="text" />?) to it.
$div = $form->addElement('div');
$div->addElement('text','first_name','First Name:');
remember: i do not know what framework you are using, i'm just guessing here to give you some starting point
answered Sep 1, 2010 at 16:10
knittl
270k59 gold badges339 silver badges405 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
default