Re: QuickForm Won't display
| From: | David Dahl | Date: | Sun, 16 Jun 2002 20:11:37 +0000 |
| Subject: | Re: QuickForm Won't display | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1681@lists.php.net to get a copy of this message | ||
I am confused here. I cannot put a variable into a text field.
Can you label these params for me like this:
hidden field: addElement(TYPE, NAME, VALUE)
text field: addElement(TYPE, NAME, LABEL, ?????, ??????)
text area: addElement(TYPE, NAME, LABEL, ?????, ??????)
etc...
here is my code which does not display the variable in the text field:
$userFormEdit = new HTML_QuickForm('users1', 'POST');
$userFormEdit->addHeader('Edit Association User');
$userFormEdit->addElement('hidden', 'a', 'users');
$userFormEdit->addElement('hidden', 'sub', 'edit_user2');
$userFormEdit->addElement('hidden', 'user_id', $user_id);
//this one does not work right:
$userFormEdit->addElement('text', 'namel', 'Last Name', $row[namel]);
$buttons2[] = &HTML_QuickForm::createElement('submit', null, 'View');
$buttons2[] = &HTML_QuickForm::createElement('reset', null, 'Reset');
$userFormEdit->addElementGroup($buttons2);
$userFormDisplayEdit = $userFormEdit->toHTML();