Create a form II
We and our form, but as this, we can not, if not confident that the end user, fill out the information that we ask to send it, but the fact is that without filling any of the fields, also sent, so we got an email completely empty.
There are many ways to find scripts on the Web that will assist us but we can also do this from the same Dremweaver and we will see here.
Pressing 1, where the arrow, we can change the menu and display the commands that interest us at all times. Form Activate now, if you put your mouse cursor over them, you will see that there is a description of each.

2 º create a new form or, you can use the same, whatever you want. (I did a new
And press the form tag to select the entire form:

In the top menu go to Window / Behaviors:

3 ° It will activate a menu on the right column with this:

Click on the + sign and displays a menu, go to Validate Form:

4 ° In fields with name, select shift
those who want to validate

* Note: Anything that will mean insert any character. In case of a field that requires a figure in numbers, we would change to Number.
5 ° Without accepting even select the next field to validate:

We set value as required to do so, this does not make much sense right? As an example, the age limit, and then we scored number of: placing the figure in the fields we want.
6 ° Finally, select the email field:

Marking required (do not forget) and email address. Note that while we were setting up the fields, added one (R), (RinRange and figures that we have inserted) and mail (RisEmali) Now if we accept.
7 ° In the right pane, in behaviors we see that there are now some commands:

They must have appeared or did not do well. But it may happen that instead of onSubmit, had another command, or by double clicking on it, appears a selection camp where we find that we need:

If we want to make a change in a field that we have validated or add one more click on Validate Form and we will revert to the previous table for editing.
8 th to validate a single field, just that we select that field and Behaviors, proceed to do so. But this time instead of onSubmit, we must ensure that the command is onBlur:

9 ° If we look to the source code, we can see that the only variety was added onSubmit = parameter in calls to the actions we have validated.
We also find a script that if you dare should be modified as they are pop-ups that will see the user to fill out the form if not done as said,

Enlarge image to see better here.
The text that goes inside the rectangle is to be translated and put it back in Castilian. Warning not to remove or add a quote or change anything else, if we do not work.
10 ° keep our document and we got on the server when the user wants filled in. The form is not afraid of using that data to insert are correct, but to be filled-in which we validated or not to send the form, as it this message and will not let you send it:

See my example here
Still, it remains necessary that the user has installed a mailer on your computer to enable the sending of these forms.
To avoid this, it is necessary to use some programs such as CGI, formail, perl, javascripts, etc ... Normally there are free hosts and forms prepared or there is nothing more we can do this we have seen in this tutorial or above.
It is therefore important when choosing a server, knowing that we will install or already have at our disposal. Or we can work with php or asp, which will also have installed the server. Later we will see the odd script that could be used in any case.















