开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜