SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatContainer
└─SwatDisplayableContainer
└─SwatFormField
public class SwatFormField
extends SwatDisplayableContainer
| Field Summary | |
|---|---|
| string | Access key. |
| protected string | Container tag to use. |
| protected string | Contents tag to use. |
| boolean | Whether or not to display validation messages in this form field. |
| boolean | Optional note of text to display with the field. |
| string | Optional content type for the note. |
| mixed | |
| boolean | Whether or not to show a colon after the title of this form field. |
| string | The visible name for this field, or null. |
| string | Optional content type for the title. |
| mixed | |
| protected string | A CSS class name set by the subwidgets in this form field. |
| Constructor Summary | |
|---|---|
SwatFormField(string id) Creates a new form field. |
|
| Method Summary | |
|---|---|
| void | display() Displays this form field. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected array | Gets the array of CSS classes that are applied to this form field. |
| string | getTitle() Gets the title of this form field. |
| protected SwatHtmlTag | Get a SwatHtmlTag to display the title. |
| protected void | notifyOfAdd(SwatWidget widget) Notifies this widget that a widget was added. |
| Methods inherited from Swat.SwatDisplayableContainer | |
|---|---|
| display, getCSSClassNames | |
| Methods inherited from Swat.SwatContainer | |
|---|---|
| add, addChild, copy, display, displayChildren, getChild, getChildren, getDescendantStates, getDescendants, getFirst, getFirstDescendant, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, notifyOfAdd, packEnd, packStart, printWidgetTree, process, remove, replace, sendAddNotifySignal, setDescendantStates | |
| Methods inherited from Swat.SwatWidget | |
|---|---|
| addCompositeWidget, addMessage, confirmCompositeWidgets, copy, createCompositeWidgets, display, displayHtmlHeadEntries, getCSSClassNames, getCompositeWidget, getCompositeWidgets, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, isDisplayed, isInitialized, isProcessed, isSensitive, printWidgetTree, process, replaceWithContainer | |
| Methods inherited from Swat.SwatUIObject | |
|---|---|
| addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible | |
public string $access_key = null
Access key
Sets an access key for the label of this form field, if one exists.
protected string $container_tag = 'div'
Container tag to use
Subclasses can change this to change their appearance.
protected string $contents_tag = 'div'
Contents tag to use
Subclasses can change this to change their appearance.
public boolean $display_messages = true
Whether or not to display validation messages in this form field
Defaults to true. Set to false to prevent the displaying of messages in this form field.
public boolean $note = null
Optional note of text to display with the field
public string $note_content_type = 'text/plain'
Optional content type for the note
Default text/plain, use text/xml for XHTML fragments.
public mixed $required = false
public boolean $show_colon = true
Whether or not to show a colon after the title of this form field
By default, a colon is shown.
public string $title = null
The visible name for this field, or null
public string $title_content_type = 'text/plain'
Optional content type for the title
Default text/plain, use text/xml for XHTML fragments.
public mixed $title_reversed = null
protected string $widget_class
A CSS class name set by the subwidgets in this form field
public SwatFormField(string id)
Creates a new form field
id - a non-visible unique id for this widget.public void display()
Displays this form field
Associates a label with the first widget of this container.
protected void displayContent()
protected void displayMessages()
protected void displayNotes()
protected void displayRequired()
protected void displayTitle()
protected array getCSSClassNames()
Gets the array of CSS classes that are applied to this form field
public string getTitle()
Gets the title of this form field
Satisfies the {SwatTitleable::getTitle()} interface.
protected SwatHtmlTag getTitleTag()
Get a SwatHtmlTag to display the title
Subclasses can change this to change their appearance.
protected void notifyOfAdd(SwatWidget widget)
Notifies this widget that a widget was added
This sets class propertes on this form field when certain classes of widgets are added.
widget - the widget that has been added.
A container to use around control widgets in a form
Adds a label and space to output messages.