# Validating A Form

**URL:** <https://forum.kirupa.com/t/validating-a-form/269620>\
**Category:** flash\
**Created:** [August 29, 2008, 4:48pm UTC](https://forum.kirupa.com/t/validating-a-form/269620 "2008-08-29T16:48:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmayo86](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jmayo86](https://forum.kirupa.com/u/jmayo86)\
**Post date:** [August 29, 2008, 4:48pm UTC](https://forum.kirupa.com/t/validating-a-form/269620/1 "2008-08-29T16:48:53Z")

</div>

Ok, basically i have an email form that does this:

- Validates fields if they are not filled in and displays error
- Sends email if it is filled

But… before i put the validator on, it went to a success message, but now it doesn’t.

All that you do is fill in name, email, telephone and message and click submit and it emails 😃

Attached is the FLA, if anyone could explain how and why this wont work id be grateful.

[http://www.jasonmayo.co.uk/preview/golpys/booking.fla](http://www.jasonmayo.co.uk/preview/golpys/booking.fla)

Ok heres the code…

Form Movie Clip

```auto

onClipEvent(data){
	gotoAndStop(2);
}

```

Actions Frame

```auto
stop();
form.name="";
form.email="";
form.phone="";
form.message="";

```

Submit Button

```auto
on (release) {
	if(form.name == "" ){
		gotoAndStop(3);
	}
	if(form.email == "" ){
		gotoAndStop(3);
	}
	if(form.phone == "" ){
		gotoAndStop(3);
	}
	
	else {
		form.loadVariables("booking_submit.php","POST");
	}
}

```
