简体   繁体   中英

html form elements

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:'); 

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM