Hello,
I want to check that there are no empty fields when a guest submits the form.
My form is called "contact" and until now looks something like this:
In the general settings of the form I filled in
Form tag attachment:
something like onSubmit()
Now I guess I need to fill in the form code field:
On Submit code - before sending email:
(PHP code with tags)
the script: validateForm (which I lack at the moment and have no clue how it should look like=)
is there anyone who knows?
THanks in advance
Hanne
I want to check that there are no empty fields when a guest submits the form.
My form is called "contact" and until now looks something like this:
<?php global $my; $mainframe; ?> <p>Name: <input type="text" name="name" value="<?php echo $my->username; ?>" /></p> <p>Email: <input type="text" name="email" value="<?php echo $my->email; ?>" /></p> <p>Telefon: <input type="text" name="Telefon"></p> <p>Betreff: <input type="text" name="betreff"></p> <p>Nachricht: <textarea name="nachricht" cols="30" rows="5" wrap="virtual"></textarea> </p> <p><input type="submit" name="Submit" value="Senden"></p> <p><input type="hidden" name="title" value="<?php echo $mainframe->_head['title']; ?>" />
In the general settings of the form I filled in
onsubmit=return validateForm()in the row:
Form tag attachment:
something like onSubmit()
Now I guess I need to fill in the form code field:
On Submit code - before sending email:
(PHP code with tags)
the script: validateForm (which I lack at the moment and have no clue how it should look like=)
is there anyone who knows?
THanks in advance
Hanne