Including rsv.js
Introduction
Adding Validation to a form
- The example form
- Including rsv.js
- Defining your validation rules
- Adding the onsubmit handler
- The finished product
References
Before starting work on adding the validation rules, we first need to include the library in your webpage. Since Form Tools already has it bundled with its own files, you just need to locate it and point to it on your server. You can find the file at this location:
[form tools root]/global/scripts/rsv.js
The "[form tools root]" is the folder of wherever you installed Form Tools.
You can include the file by either a "relative" or "absolute" link. A relative link is linking to something in respect to the location of the current file. So, if you were to move your files around, you would need to update the relative links each time. An absolute link would be the full URL to the file. This would never change, regardless of what file is doing the including. Here's an example of both:
You'll need to add one of those lines - with the paths adjusted for your own file locations on your server in the top of your webpage, in between the <head> and </head> tags.