QuickForm element types

QuickForm element types

QuickForm element types -- What elements can be added to QuickForm

Elements overview

As of release 3.2.5, HTML_QuickForm knows 23 element types that can be created via createElement() and added to the form via addElement(). These can be divided into two big groups: standard HTML elements and custom elements.

Standard HTML elements

'button'

Class for <input type="button" /> elements, HTML_QuickForm_button

'checkbox'

Class for <input type="checkbox" /> elements, HTML_QuickForm_checkbox

'file'

Class for <input type="file" /> elements, HTML_QuickForm_file

'hidden'

Class for <input type="hidden" /> elements, HTML_QuickForm_hidden

'image'

Class for <input type="image" /> elements, HTML_QuickForm_image

'password'

Class for <input type="password" /> elements, HTML_QuickForm_password

'radio'

Class for <input type="radio" /> elements, HTML_QuickForm_radio

'reset'

Class for <input type="reset" /> elements, HTML_QuickForm_reset

'select'

Class for <select> elements, HTML_QuickForm_select. The class allows loading of <option> elements from array or database.

'submit'

Class for <input type="submit" /> elements, HTML_QuickForm_submit

'text'

Class for <input type="text" /> elements, HTML_QuickForm_text

'textarea'

Class for <textarea> elements, HTML_QuickForm_textarea

'xbutton'

Class for <button> elements, HTML_QuickForm_xbutton

Custom element types

'advcheckbox'

Class for an advanced checkbox type field, HTML_QuickForm_advcheckbox. Basically this fixes a problem that HTML has had where checkboxes can only pass a single value (the value of the checkbox when checked).

'autocomplete'

Class for a text field with autocompletion feature, HTML_QuickForm_autocomplete. The element looks like a normal HTML input text element that at every keypressed javascript event, searches the array of options for a match and autocompletes the text in case of match.

'date'

Class for a group of elements used to input dates (and times), HTML_QuickForm_date

'group'

Class for a form element group, HTML_QuickForm_group. QuickForm allows grouping of several elements into one entity and using this entity as a new element.

'header'

Class for adding headers to the form, HTML_QuickForm_header

'hiddenselect'

This class, HTML_QuickForm_hiddenselect, behaves as a select element, but instead of creating a <select> it creates hidden elements for all values already selected with setDefaults() or setConstants().

'hierselect'

Class to dynamically create "chained" HTML <select> elements, HTML_QuickForm_hierselect. Choosing an option in the first <select> changes the available options of the second select and so on.

'html'

Deprecated. A pseudo-element used for adding raw HTML to form, HTML_QuickForm_html. Intended for use with the default renderer only, template-based ones may (and probably will) completely ignore this.

'link'

Class for a link type field, HTML_QuickForm_link

'static'

Class for static data, HTML_QuickForm_static