Hi,
I have a contact form which works correct, however I want to add two non required fields in the AS. I can’t get it to work.
The two fields are company_name and web_name (I have added these files in the reset function below), these are not required to be filled out.
I can’t get it to work so that they are not required to be filled out at the submit function.
I hope you can help me with this.
this._parent.btns.btnsend.onRelease = submit;
this._parent.btns.btnclear.onRelease = reset;
function submit()
{
if( contact_name.text == "" || contact_email.text == "" ||
contact_subject.text == "" || contact_message.text == "" )
{
message_status.text = "Please fill up all text fields.";
}
else if( contact_email.text.indexOf('@') < 2 || contact_email.text.indexOf('.') < 0 )
{
message_status.text = "Please enter the valid email address.";
}
else
{
message_status.text = "";
gotoAndStop("send");
}
}
function reset()
{
contact_name.text = contact_email.text = contact_subject.text = company_name.text = web_name.text =
contact_message.text = message_status.text = "";
clearInterval(interval_id);
gotoAndStop("stop");
}
Thanks