FormEntry Javascript

Quick Links:

FormEntry makes extensive use of Javascript to verify the <form> data. There are a number of good books and sites on the web which describe Javascript. Javascript and Javascript Kit are two I've found helpful.

Javascript routines are invoked to insure that all definitions marked as Required, have a value. Javascript routines can be invoked as you leave each field of the <form> to verify the field is valid (see Conditions for more details). For instance, you can verify a numeric field is actually a number and that it is in the proper range. You may also disable Javascript checking for any single definition (see Additional Flags for more) as well as disable all Javascript checks in the local_config.php file.

There are a number pre-defined Javascript routines that are called and are found in header.php. These will require fairly recently browsers (at least Internet Explorer 5, Netscape 6 or Mozilla 0.9). You may find that these need some changing for your site. If you correct bugs or invent improvements, please contact the author. Each Javascript function is uniquely named ('valid' + column name).

Javascript Trace

Figuring out what's going on with Javascript can be a little tedious. In local_config.php the variable $CFG[jstrace] can be set to enable an internal Javascript trace. When this is enabled, a button labelled Javascript Trace will appear after a search has been made for some records and you are editting a record. Clicking on this button will open a window where trace messages will be written by each of the FormEntry Javascript routines when the user selects 'Save Data'.

This window must be opened anew each time a new definition is editted. This window also provides links to launching the browser's Javascript Console and to the Venkman debugger which you may find useful to figure out what is going on.

Quick Links:

Direct questions to: Terry Gliedt (Include 'Formentry' in the subject line so my SPAM filter lets your message through.)

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. See