FormField
|
+--RadioButtonField
public class RadioButtonField
extends FormField
Field Summary | |
---|---|
mixed | The maximum length of the "Other" string. |
mixed | The number of columns used to display the radio button choices. |
mixed | True if the other field should be displayed so that the user can enter an other string when their desired selection doesn't exist. |
mixed | A string array of options associated with each radio button. |
mixed | The sub field the edits the other string. |
mixed | An array of radio button sub fields. |
mixed | The number of rows used to display the radio button choices. |
mixed | True if an empty sub field constitutes an invalid value. |
Fields inherited from FORMfields.fields.FormField | |
---|---|
autoPropagate, data, disableEnterHandler, displayValuesOnNewLine, editable, enabled, endingString, enterTabHandler, enterTabs, error, extraHtml, fieldBelowLabel, formError, help, hidden, htmlify, id, isData, label, labelForId, multiValues, name, required, subFieldDisplayValueSeparator, subFieldSeparator, subFieldValueSeparator, subFields, subFieldsCannotBeEmpty, trimWhitespace, validators, value, valueIsHtml |
Constructor Summary | |
---|---|
RadioButtonField(string name, string label, int required, array options, int rows, int cols, boolean includeOtherChoice) Creates a new RadioButtonField. |
|
__construct(string name, string label, int required, array options, int rows, int cols, boolean includeOtherChoice) Creates a new RadioButtonField. |
Method Summary | |
---|---|
string | Returns the display value of this field. |
string | Returns the HTML used to display the input portion of this field. |
void | Retrieves the posted field value. |
the | getSingleButtonEditableFieldTag(FormField radioButton) Returns the HTML to display the editable portion of a radio button. |
the | getSingleButtonFieldTagForLabel(string label) Returns the HTML to display the field of a single radio button. |
the | getSingleButtonLabelTag(RadioButtonField radioButton) Returns the HTML to display the label of a single radio button. |
the | getSingleButtonLabelTagForLabel(string label) Returns the HTML to display the label of a single radio button. |
the | getSingleButtonTag(RadioButtonField radioButton) Returns the HTML to display a single radio button. |
the | getSingleButtonTagForLabel(string label) Returns the HTML to display a single radio button. |
array | getValue() Returns the value of this form field. |
boolean | isValid() Checks for field errors detected by this field, including a check for blank. |
void | setValue(string value) Sets the value of this form field. |
public mixed $OTHER_STRING_MAX_SIZE = 40
The maximum length of the "Other" string.
public mixed $cols = null
The number of columns used to display the radio button choices.
public mixed $includeOtherChoice = false
True if the other field should be displayed so that the user can enter an other string when their desired selection doesn't exist.
public mixed $options = null
A string array of options associated with each radio button.
public mixed $otherChoice
The sub field the edits the other string.
public mixed $radioButtons
An array of radio button sub fields.
public mixed $rows = null
The number of rows used to display the radio button choices.
public mixed $subFieldsCannotBeEmpty = false
True if an empty sub field constitutes an invalid value.
public RadioButtonField(string name, string label, int required, array options, int rows, int cols, boolean includeOtherChoice)
Creates a new RadioButtonField.
public string getDisplayValue()
Returns the display value of this field. For example, the field may have a value of "2127348943" and its display value could be "212-734-8943".
public string getEditableFieldTag()
Returns the HTML used to display the input portion of this field.
public void getParameter()
Retrieves the posted field value. In other words, sets this field value using the appropriate values in $_REQUEST.
public the getSingleButtonEditableFieldTag(FormField radioButton)
Returns the HTML to display the editable portion of a radio button.
public the getSingleButtonFieldTagForLabel(string label)
Returns the HTML to display the field of a single radio button.
public the getSingleButtonLabelTag(RadioButtonField radioButton)
Returns the HTML to display the label of a single radio button.
public the getSingleButtonLabelTagForLabel(string label)
Returns the HTML to display the label of a single radio button.
public the getSingleButtonTag(RadioButtonField radioButton)
Returns the HTML to display a single radio button.
public the getSingleButtonTagForLabel(string label)
Returns the HTML to display a single radio button.
public array getValue()
Returns the value of this form field.
public boolean isValid()
Checks for field errors detected by this field, including a check for blank. This method ensures that if the other choice is checked, that a value for other is supplied. If an error is detected, the setError() method is called to set the appropriate error message.
public void setValue(string value)
Sets the value of this form field.
RadioButton a field for displaying a group of radio button boxes where only one box can be selected at a time.