Form Tools
Form validation with Form Tools - Printable Version

+- Form Tools (
+-- Forum: Modules / Other (
+--- Forum: Form Validation: JS + PHP (
+--- Thread: Form validation with Form Tools (/showthread.php?tid=102)

Form validation with Form Tools - Ben - Apr 2nd, 2009

Form validation is one of those nagging tasks that you don't want to do, but often you have no choice, whether its to counter spam or ensure the form submission contains all necessarily fields.

Form Tools comes bundled with both client- and server-side validation scripts to help simplify the job of adding validation. The two scripts go hand in hand: in many cases, you can simply copy & paste your validation rules from JS to PHP, change the syntax and you have both client- and server-side validation.

The two scripts were written by myself, a long long loooooong time ago. You can learn about them on my site, here:

There are also a couple of Form Tools-specific tutorials to help out:

Of course, you're more than welcome to use your own validation scripts if you're more familiar with something else.

Please use this forum to post all validation-related questions.

- Ben

RE: Form validation with Form Tools - erdesign - Aug 18th, 2009

I have successfully made the form validate correctly, but now I have a new problem. Once the form has validated I need it to post the form information to Form Tools: <form action="" method="post">.

I'm using the rvs.js validation. I need a way for the js to say once it's valid submit to the process.php for Form Tools to log the information and handle it accordingly. Is this possible? If so how?


RE: Form validation with Form Tools - Ben - Aug 21st, 2009

Hi erdesign,

I actually don't quite follow! That's exactly how it should be working right now! Could you maybe post your code & I could take a look?

- Ben

RE: Form validation with Form Tools - erdesign - Aug 22nd, 2009

I've got it working properly now. You should probably show an example in your validation process that your first line of <form> code needs to look like this:

<form action="" onsubmit="return rsv.validate(this, rules)" method="post">

The location of process.php will vary but what I didn't know is action needed to be called in before onsubmit.

Thanks for the assistance!