Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетил 16671 программист и 1769 роботов. Сейчас ищут 1205 программистов ...

HTML_QuickForm::addElement()

Вернуться к: Creating a basic form

HTML_QuickForm::addElement()

HTML_QuickForm::addElement() – Adds an element into the form

Synopsis

require_once 'HTML/QuickForm.php';

object &HTML_QuickForm::addElement ( mixed $element )

Adds an element into the form. If $element is a string representing an element type, then this method accepts variable number of parameters, their meaning and count depending on element type.

Parameters starting from second will be passed to the element's constructor, consult the docs for the appropriate element to find out which parameters to pass.

Parameter

mixed $element

element object or type of element to add (text, textarea, file...)

Return value

return reference to added element

Throws

Possible PEAR_Error values
Error code Error message Reason Solution
QUICKFORM_UNREGISTERED_ELEMENT Element '$element' does not exist in HTML_QuickForm::_loadElement() Tried to add an element of unknown type Check the type name spelling or use HTML_QuickForm::registerElementType()
QUICKFORM_INVALID_ELEMENT_NAME Element 'elementName' already exists in HTML_QuickForm::addElement() Tried to add an element having a name of an existing element, but of different type Choose a different name for an element

Note

since 1.0

This function can not be called statically.



Вернуться к: Creating a basic form

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware