FormField
|
+--TextField
|
+--TextAreaField
|
+--EmailListField
public class EmailListField
extends TextAreaField
Field Summary | |
---|---|
mixed | The max number of email addresses that can be in the list. |
mixed | The min number of email addresses that can be in the list. |
Fields inherited from FORMfields.fields.TextAreaField | |
---|---|
cols, rows |
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 | |
---|---|
EmailListField(string name, string label, int required, int maxEmails, int minEmails, int rows, int cols) Creates a new EmailListField. |
|
__construct(string name, string label, int required, int maxEmails, int minEmails, int rows, int cols) Creates a new EmailListField. |
Method Summary | |
---|---|
array | Returns this field's value as an array of email address strings. |
void | Returns a string of email addresses that can be used when sending an email. |
boolean | isValid() Checks for field errors detected by this field, including a check for blank. |
Methods inherited from FORMfields.fields.TextAreaField | |
---|---|
getEditableFieldTag |
Methods inherited from FORMfields.fields.TextField | |
---|---|
getEditableFieldTag, isValid |
public mixed $maxEmails = null
The max number of email addresses that can be in the list.
public mixed $minEmails = null
The min number of email addresses that can be in the list.
public EmailListField(string name, string label, int required, int maxEmails, int minEmails, int rows, int cols)
Creates a new EmailListField.
public array getEmailArray()
Returns this field's value as an array of email address strings.
public void getEmailValue()
Returns a string of email addresses that can be used when sending an email.
public boolean isValid()
Checks for field errors detected by this field, including
a check for blank. This method ensures that the email
addresses are in one of the forms:
user@example.com
User <user@example.com>
'User' <user@example.com>
The email addresses can be separated by a newline,
semicolon or comma.
If an error is detected, the setError() method is called
to set the appropriate error message.
EmailListField is a field for editing a list of email addresses. This field accepts email addresses separated by a new line, semicolon or comma that are in the form: user@example.com
User <user@example.com>
'User' <user@example.com>
user@example (if strict validation is turned off)