0

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
2
  • 5
    Please don't bombard us with that many details. Commented Aug 31, 2010 at 10:32
  • 3
    what framework are you using? Commented Aug 31, 2010 at 10:32

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.