EZform-TEXT ActionScript Reference

Properties

formPhp
recipientEmail
subject
fromName
fromEmail
orderArray
notSend
requiredArray
requiredField
requiredMessage
emailField
emailTextField
emailMessage
urlField
urlTextField
urlMessage
sentTextField
sentMessage
submitErrorTextField
submitErrorMessage
heading
lineSpacing
layoutStyle
hideUncheckedCheckboxes

Events

ON_ERROR_REQUIRED
ON_ERROR_EMAIL
ON_ERROR_URL
ON_SUBMIT
ON_SUBMIT_ERROR

Methods

submitForm

 

 

Properties

formPhp

The name and path of the form php file on the webserver.

myForm.formPhp = "forms/formhtml.php";

trace(myForm.formPhp); // outputs the current formPhp value

TOP

recipientEmail

The recipient address for form response emails.

myForm.recipientEmail = "yourName@yourUrl.com";

trace(myForm.recipientEmail); // outputs the current recipientEmail value

TOP

subject

The subject of form response emails.

myForm.subject = "Feedback form response ";

trace(myForm.subject); // outputs the subject formPhp value

TOP

fromName

The name in the from field for form response emails.

myForm.fromName = Name.text; // sets the fromName to be the value entered by the user in the input field with instance name "Name"

trace(myForm.fromName); // outputs the current fromName value

TOP

fromEmail

The email address for replies to form response emails.

myForm.fromEmail = Email.text; // sets the fromEmail to be the value entered by the user in the input text field with instance name "Email"

trace(myForm.fromEmail); // outputs the current fromEmail value

TOP

orderArray

Array of fields in the order in which they should appear in the response emails.

myOrder = new Array(Name, Email, Comment); // example of order array called "myOrder"

myForm.orderArray = myOrder; // sets the orderArray array to be the array defined as "myOrder"

TOP

notSend

Array of fields or variables that should not be submitted with the form.

notArray = new Array(Required, Message); // example of array of values not to send called "notArray "

myForm.notSend = notArray; // sets the notSend array to be the array defined as "notArray"

TOP

requiredArray

Array of field instance names that are required.

myArray = new Array(Name, Email); // example of array of fields that are required called "myArray"

myForm.requiredArray = myArray; // sets the requiredArray array to be the array defined as "myArray"

TOP

requiredField

The instance name of the textField where the missing required field message should appear.

myForm.requiredField = "requiredTxt";

trace(myForm.requiredField); // outputs the current requiredField value

TOP

requiredMessage

The missing required field message.

myForm.requiredMessage = "Please complete all required fields";

trace(myForm.requiredMessage); // outputs the current requiredMessage value

TOP

emailField

The instance name of the field for e-mail validation.

myForm.emailField = "Email"; // specifies that the field with instance name "Email" is for e-mail validation.

trace(myForm.emailField); // outputs the current emailField value

TOP

emailTextField

The instance name of the textField where the invalid email address message should appear.

myForm.emailTextField = "requiredTxt"; // specifies that the field with instance name "requiredTxt" for invalid e-mail messages.

trace(myForm.emailTextField); // outputs the current emailTextField value

TOP

emailMessage

The invalid email address message.

myForm.emailMessage = "An invalid e-mail address was entered ";

trace(myForm.emailMessage); // outputs the current emailMessage value

TOP

urlField

The instance name of the textField for URL validation.

myForm.urlField = "Website"; // specifies that the field with instance name "Website" is for url validation.

trace(myForm.urlField); // outputs the current urlField value

TOP

urlTextField

The instance name of the textField where the invalid URL message should appear.

myForm.urlTextField = "requiredTxt"; // specifies that the field with instance name "requiredTxt" for invalid url messages.

trace(myForm.urlTextField); // outputs the current urlTextField value

TOP

urlMessage

The invalid URL address message.

myForm.urlMessage = "An invalid URL was entered ";

trace(myForm.urlMessage); // outputs the current urlMessage value

TOP

sentTextField

The instance name of the textField where the sent message should appear.

myForm.sentTextField = "requiredTxt"; // specifies that the field with instance name "requiredTxt" for the sent message.

trace(myForm.sentTextField); // outputs the current sentTextField value

TOP

sentMessage

The message to display in the sentTextField when the form has been sent.

myForm.sentMessage = "Thank you for submitting the form";

trace(myForm.sentMessage); // outputs the current sentMessage value

TOP

submitErrorTextField

The instance name of the textField where the submit error message should appear.

myForm.submitErrorTextField = "requiredTxt"; // specifies that the field with instance name "requiredTxt" for the submit error message.

trace(myForm.submitErrorTextField); // outputs the current sentTextField value

TOP

submitErrorMessage

The message to display when there has been an error in the submission of the form.

myForm.submitErrorMessage = "There was a problem submitting the form.";

trace(myForm.submitErrorMessage); // outputs the current submit error message value

TOP

heading

The heading line text inside the form response emails.

myForm.heading = "This is the response from the feedback back:";

trace(myForm.heading); // outputs the current heading value

TOP

lineSpacing

The line spacing between fields in the form response email.

myForm.lineSpacing = 2;

trace(myForm.lineSpacing); // outputs the current lineSpacing value.

TOP

layoutStyle

The style of the form response email.

myForm.layoutStyle = "style1";

Valid Values

"style1"
"style2"
"style3"

TOP

hideUncheckedCheckboxes

When set to true the email omits any checkboxes that hold a false value.

myForm.hideUncheckedCheckboxes = true;

TOP

Events

ON_ERROR_REQUIRED

Event to trigger when required field is omitted.

Example:
import com.flashloaded.EzFormTEXT_AS3;

myForm.addEventListener(EzFormTEXT_AS3.ON_ERROR_REQUIRED, onError);

function onError(eo:Event):void {
   trace(eo.type);
}

TOP

ON_ERROR_EMAIL

Event to trigger when an invalid email address is entered.

Example:
import com.flashloaded.EzFormTEXT_AS3;

myForm.addEventListener(EzFormTEXT_AS3.ON_ERROR_EMAIL, onError);

function onError(eo:Event):void {
   trace(eo.type);
}

TOP

ON_ERROR_URL

Event to trigger when an invalid URL is entered.

Example:
import com.flashloaded.EzFormTEXT_AS3;

myForm.addEventListener(EzFormTEXT_AS3.ON_ERROR_URL, onError);

function onError(eo:Event):void {
   trace(eo.type);
}

TOP

ON_SUBMIT

Event to trigger when the form is submitted.

Example:
import com.flashloaded.EzFormTEXT_AS3;

myForm.addEventListener(EzFormTEXT_AS3.ON_SUBMIT, onSubmit);

function onSubmit(eo:Event):void {
   trace(eo.type);
}

 

ON_SUBMIT_ERROR

Event to trigger when there is a problem in submitting the form.

Example:
import com.flashloaded.EzFormTEXT_AS3;

myForm.addEventListener(EzFormTEXT_AS3.ON_SUBMIT_ERROR, onError);

function onError(eo:Event):void {
   trace(eo.type);
}

TOP

 

Methods

submitForm

Submits the form.

Example:

myForm.submitForm();