PDA

View Full Version : Validate fields not required



WolfgangEdenharder
02-Jul-2007, 07:33 AM
Well, I use the following input fields in my form.


<label for="em">E-mail</label><br />
<input class="form" id="em" name="email" type="text" size="40" /><br />

<label for="tlf">Telefon</label><br />
<input class="form" id="tlf" name="telefon" type="text" size="40" />

None of these two fields are required, but if one or both are filled out, I want to validate the value. How can I do that?

russellr
02-Jul-2007, 07:52 AM
Hi,

You use "conditions" for this.

Here's the documentation: http://www.tectite.com/fmdoc/creating_forms.php

WolfgangEdenharder
02-Jul-2007, 08:24 AM
Nice. I'm quite a novice, so please can You direct me to one or more examples showing the use of conditions? Some usefull regular expressions and where to place the different CODE elements?

I need to validate the field 'email', and the field 'telephone' as digits only.

russellr
02-Jul-2007, 10:12 PM
Hi,

You can search the forums for examples of conditions.

You can also subscribe for support and we'll help you write it.