Formbuilder compare number

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
steven_germany
Forum Members
Forum Members
Posts: 34
Joined: Tue Apr 21, 2009 6:52 pm

Formbuilder compare number

Post by steven_germany »

Hi,

just a simple little thing - or maybe not ...?

In an form i have an input-field like this "8 + 4 = ?"
(a small thing to prevent from bots)

And after hitting the submit-button i want
the form to check the input - in this case to be "12" ...

Any simple ideas?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Formbuilder compare number

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: Formbuilder compare number

Post by Jeff »

You can use the validation regex for the text field.
steven_germany
Forum Members
Forum Members
Posts: 34
Joined: Tue Apr 21, 2009 6:52 pm

Re: Formbuilder compare number

Post by steven_germany »

Hey Jeff ...

can you explain me how to do it?
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: Formbuilder compare number

Post by Jeff »

Select "Match Regular Expression" under Field Validation. Then fill in the "Validation Regex:" field on the Advanced Tab with what you want it to validate with. The Regex can be as simple as "12" to match 12 or more complex.

Learn More: https://www.google.com/webhp?q=regex%20tutorial
Test it: http://regexpal.com/
Post Reply

Return to “Modules/Add-Ons”