Form class
A container object for form elements. This is for when we have a classical form which is just a set of form elements for filling in, rather than a mixture of page layout and elements. It is rendered in a vanilla table with each field stacked vertically to the right of its label..
Located in /form-defs.php (line 96)
RenderableObject | --StylableObject | --HTMLObject | --form
Class | Description |
---|---|
![]() |
SubForm class The sub-form is a special case of the form class. The difference is that it is expected to be part of an existing form, and therefore is rendered without the form tags. |
![]() |
multipart_form class The multipart_form is just a standard form, but with the enctype pre-set to the "multipart/form-data" setting required for file multiparts of binary form data. |
Accept-charset attributes - comma-delimited list
Action attribute
Elements array. Contains form elements
Width taken by element (RHS) side of the form in %
Encoding type
Whether to force forma elements to be read-only
Whether to append colon ":" to labels
Optional class/style for labels
Justification mode for labels "right" or "left"
Method attribute
Script to call on form submit
Whether to render labels for fields
Type of form 'normal' or 'subform'
Inherited from HTMLObject
HTMLObject::$accesskey
HTMLObject::$align
HTMLObject::$alt
HTMLObject::$bgcolor
HTMLObject::$bgurl
HTMLObject::$border
HTMLObject::$color
HTMLObject::$height
HTMLObject::$hspace
HTMLObject::$lang
HTMLObject::$langdir
HTMLObject::$linkover_text
HTMLObject::$name
HTMLObject::$onblur
HTMLObject::$onchange
HTMLObject::$onclick
HTMLObject::$ondblclick
HTMLObject::$onfocus
HTMLObject::$onkeydown
HTMLObject::$onkeypress
HTMLObject::$onkeyup
HTMLObject::$onload
HTMLObject::$onmousedown
HTMLObject::$onmousemove
HTMLObject::$onmouseout
HTMLObject::$onmouseover
HTMLObject::$onmouseup
HTMLObject::$onselect
HTMLObject::$size
HTMLObject::$src
HTMLObject::$tabindex
HTMLObject::$target
HTMLObject::$title
HTMLObject::$user_attributes
HTMLObject::$valign
HTMLObject::$vspace
HTMLObject::$width
Inherited from StylableObject
StylableObject::$class
StylableObject::$id
StylableObject::$style
Constructor Create a form object. Sets basic form attributes.
Adds a form element object to the form. This is usually an object you have previously created eg. with new form_textfield(...) etc.
Add annotation to the form Adds text content to the form in the field column. The text is added literally, so you can add in effects like <em>..</em> etc.
Add a button Adds a button element to the form.
Add file upload fields Special function to add repeated fileupload fields to the form.
These share the same naming, but with square brackets "[]" appended.
Add form separator row
Adds a separator row to the form If no heading is given then this produces a ruled line across the form. If a heading is given then this text is put in a row just below the ruled line. Feel free to add in HTML formatting using normal HTML tags like etc.
Add text to the form Adds text content to the form spanning both columns. The text is added literally, so you can add in effects like <em>..</em> etc.
Check if form contains file upload field Check all elements for presence of file upload field. This is mainly for internal use.
Force all of the contained fields to be rendered read-only
This renders the form as HTML, including the form tags and every form element in the form.
Set the proportion of the form taken up by the form field elements as opposed to the labels. This is specified as an integer which is the proportion as a percentage. Eg: 70 would be '70%'.
Set onsubmit script Defines the onsubmit script to call when the user submits the form.
Set the form type This can be 'normal' or 'subform'. Use the subform variant when you already have <form> tags being provided by other means. Then when you render the subform only the fields will be returned.
Inherited From HTMLObject
HTMLObject::HTMLObject()
HTMLObject::inherit_attributes()
HTMLObject::setaccesskey()
HTMLObject::setalign()
HTMLObject::setalt()
HTMLObject::setbackground()
HTMLObject::setbgcolor()
HTMLObject::setborder()
HTMLObject::setcolor()
HTMLObject::setheight()
HTMLObject::sethspace()
HTMLObject::setlang()
HTMLObject::setlangdir()
HTMLObject::setname()
HTMLObject::setsize()
HTMLObject::setsrc()
HTMLObject::settabindex()
HTMLObject::settarget()
HTMLObject::settitle()
HTMLObject::setvalign()
HTMLObject::setvspace()
HTMLObject::setwidth()
HTMLObject::set_attribute()
HTMLObject::set_linkover_text()
HTMLObject::set_onblur()
HTMLObject::set_onchange()
HTMLObject::set_onclick()
HTMLObject::set_ondblclick()
HTMLObject::set_onfocus()
HTMLObject::set_onkeydown()
HTMLObject::set_onkeypress()
HTMLObject::set_onkeyup()
HTMLObject::set_onload()
HTMLObject::set_onmousedown()
HTMLObject::set_onmousemove()
HTMLObject::set_onmouseout()
HTMLObject::set_onmouseover()
HTMLObject::set_onmouseup()
HTMLObject::set_onselect()
HTMLObject::set_tabindex()
HTMLObject::taghtml()
Inherited From StylableObject
StylableObject::StylableObject()
StylableObject::clearstyle()
StylableObject::setclass()
StylableObject::setcss()
StylableObject::setid()
StylableObject::setstyle()
Inherited From RenderableObject
RenderableObject::RenderableObject()
RenderableObject::html()
RenderableObject::render()
RenderableObject::wml()
RenderableObject::wmlup()
RenderableObject::xml()
Documentation generated by phpDocumentor 1.3.0RC3