FormField
|
+--TextField
|
+--FloatField
|
+--CurrencyField
public class CurrencyField
extends FloatField
Field Summary | |
---|---|
mixed | The clear text sign. |
mixed | The HTML that appears to the left of the field value. |
Fields inherited from FORMfields.fields.FloatField | |
---|---|
REGEX_FLOAT, maxValue, minValue |
Fields inherited from FORMfields.fields.TextField | |
---|---|
maxLength, minLength, size |
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 | |
---|---|
CurrencyField(string name, string label, int required, int maxLength, int minLength, int size, mixed maxValue, mixed minValue, mixed signHtml, float the) Creates a new CurrencyField. |
|
__construct(string name, string label, int required, int maxLength, int minLength, int size, mixed maxValue, mixed minValue, mixed signHtml, float the) Creates a new CurrencyField. |
Method Summary | |
---|---|
string | format(string str, string signHtml) A static method that returns str as a formatted currency value. |
string | Returns the display value of this field. |
string | Returns the HTML used to display the input portion of this field. |
boolean | isValid() Checks for field errors detected by this field, including a check for blank. |
Methods inherited from FORMfields.fields.FloatField | |
---|---|
isValid |
Methods inherited from FORMfields.fields.TextField | |
---|---|
getEditableFieldTag, isValid |
public mixed $sign
The clear text sign.
public mixed $signHtml
The HTML that appears to the left of the field value. See HTML Special Characters
public CurrencyField(string name, string label, int required, int maxLength, int minLength, int size, mixed maxValue, mixed minValue, mixed signHtml, float the)
Creates a new CurrencyField.
public string format(string str, string signHtml)
A static method that returns str as a formatted currency value. Note: the decimal places will be padded to 2 digits.
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 boolean isValid()
Checks for field errors detected by this field, including a check for blank. This method ensures that the value has 2 decimal places at most. If an error is detected, the setError() method is called to set the appropriate error message.
CurrencyField is a field for editing an amount of money in any specified currency.