Version History --------------- Listed below is the complete version history of the changes to the qForms API. Use the following key to determine the type of change: [*] A change in the behavior, pay close attention to these changes, as they could affect existing applications using the qForms JSAPI [+] Some additional functionality has been added. This should not affect existing code. [-] A bug was fixed or some other minor change was made that should not affect existing code. ************************************************************************* * Don't forget to donate! * * ----------------------- * * If you leverage the power of qForms, consider donating some money to * * help aid future development: * * * * http://www.pengoworks.com/qForms/donations/ * * * ************************************************************************* Build 142 (April 2, 2007) --------------------------------------------------------------------------- [*] Added code to _addValidator() function to fix issue with Safari. Safari when reading a function() to a string, converts all escaped characters (\n) in a quoted string into their escaped value. This means that string that contain newlines ("\n") are incorrectly converting to newlines causing JS errors when converting the function back to real function. Safari appears to be the only browser with this issue. Build 141 (October 23, 2006) --------------------------------------------------------------------------- [*] Fixed bug in the wddx.js library relating to the qFormAPI.serialize() method. The method did not properly declare local variables, which was causing data corruption. [*] Fixed bug in the qFormAPI.validate() function where if you called the method without having the qFormAPI.validateAll set to true a JS error would be generated. Now an alert() message is thrown to warn of the incorrect syntax. Build 140 (July 13, 2006) --------------------------------------------------------------------------- [*] Change the _stripInvalidChars() function so that with numeric values only numbers remain. Checking for decimals was causing problems in other routines. [*] Fixed bug in _f_checkForErrors() where this.qForms._skipValidation was being checked instead of this.qForm._skipValidation. [+] Added field.requiredMessage property--which you can use to override the default required message. [-] Removed compressed library (for time being.) Build 139 (June 21, 2004) --------------------------------------------------------------------------- [-] Change the _q_checkForErrors() function so that the call to the isNotEmpty() method used escaped double quotes instead of single quotes. This should allow single quotes in the description property. [*] Changed the validateNumeric method to use the parseFloat() function to check for a valid numeric value. [+] Added validateSame validation method [+] Added validateInteger validation method [-] Used my old homegrown compression routine on the compressed files. It doesn't compress the files down as much as either jsCruncher Pro or w3compiler, but it shouldn't break the source code either. [+] Added cfform.js validation module. This should give you all of the exact same functionality as provided w/CFFORM. Build 138 (May 13, 2004) --------------------------------------------------------------------------- [-] Fixed a bug in the is/validateFormat() method which affected masks which contained 3 or fewer characters. [-] Fixed bug in Opera v7.x where single checkbox elements where not working w/the setValue()/getValue() methods. I had fixed this in the v2 builds already. [-] Fixed bug w/validateLengthGT and LT if the value was equal to the specified argument than no error was thrown (and it should be). [+] Added qFormAPI.styleAttribute which allows you to specify a single property to apply a style change to. This defaults to "backgroundColor". This provides a quick CSS hack until v2 is released. If you change the qFormAPI.errorColor to a valid CSS property value you can do more than change the color. For example: qFormAPI.styleAttribute = "border"; qFormAPI.errorColor = "1px dotted red"; NOTE: This is experimental at best, you need test in different browser. [+] Added obj._skipValidation property which allows you to toggle validation off/on for an entire form. Setting the property to true will cause the validation routines to be skipped for that form object. [+] Added the validation_addon.js library. At this point, this contains one additional validation method called validateAtLeastOne(), which you can use to confirm that at least one field out of a list of fields contain a value. Build 137g (March 31, 2003) --------------------------------------------------------------------------- [*] Change the output of the wddx.js to match the SDK's wddx.js which converts all name attributes to lowercase. [*] Changed the qFormAPI.reAttribs to "gi" for all cases. In no cases should a RegEx be passed the "m" argument [*] Removed the qFormAPI.userAgent property [*] Removed the qFormAPI.isMacIE property [-] Fixed setFields.htm example file--the option arrays did not contain a value attribute. Build 137f (February 27, 2003) --------------------------------------------------------------------------- [-] Fixed another Mac IE bug. It appears that the Mac RegEx engine will throw an error if you try to perform a regular expression on an empty string (or more specifically, if you try to replace whitespacing at the beginning of an empty string, it'll return an "out of memory" error.) Build 137e (February 27, 2003) --------------------------------------------------------------------------- [-] Fixed bug w/IE5.0 on Windows. Turns out the RegExp bug w/the "m" attribute isn't specific to Mac 5.0/5.1--it's specific to versions lower than 5.5 (at least it appears that way.) [*] Removed the qFormAPI.isMacIE and qFormAPI.isMac properties--since they're no longer needed. [+] Added the qFormAPI.isIE5 check. Don't use this in your code, as it's not gaurenteed to remain a valid property. Build 137d (February 27, 2003) --------------------------------------------------------------------------- [-] Fixed bug with is/validateDifferent() in which the error message wouldn't display the description for the field passed as an argument. Build 137c (February 26, 2003) --------------------------------------------------------------------------- [-] Fixed 2 bugs in the functions.js file where the _ltrim() and _rtrim() had an extra parenthesises in them. [-] Fixed bug in _rtrim() where the s variable wasn't getting updated after deleting the last character. This would cause a inifite loop if the last character was a whitespace char. [-] Split the strings that contained the phrases " tags. Build 137b (February 18, 2003) --------------------------------------------------------------------------- [-] Removed the commented String.prototype.rereplace prototype from the functions_js12.js file. It appears that NS7 on the Mac was parsing this String prototype--even though it was in a comment block. This was definitely a bug in NS7, but it fixes the problem. [-] Fixed bug in Mac IE, line 86 of the qforms.js file should have had the keyword "MSIE" in lowercase (i.e. "msie".) Because of this, RegExp may not have worked in Mac IE5.x. Build 137a (February 16, 2003) --------------------------------------------------------------------------- [-] Fixed bugs in the validation.js where the _param() functions weren't explicitly declaring "number" for numeric values Build 137 (February 08, 2003) --------------------------------------------------------------------------- [*] The obj.removeFields() method now requires JS v1.2. (This shouldn't be a problem, since the only reason to invoke the method is when using DHTML to add/remove fields dynamically. All DHTML browsers support JS 1.2) [*] When using the setValue() method on a select box, and a value has been supply that doesn't exist, it'll first try to reset the field to the defaultValue of the select box and if that doesn't exist, then the first item in the option array is selected. Previously no change occurred. [-] Changed all instances of parseInt(x) to parseInt(x, 10) to avoid bugs when not explicitly specifying the base number to convert to. [-] Fixed bug in the _Field_createDependencyTo() method which was incorrectly passing the name property instead of the type property. (and for the wrong field even!) [-] Fixed bug in Field.prototype.disabled() which was causing select boxes not to be disabled. (Thanks Matt!) [-] Fixed bug causing the Field.prototype.removeField() method to not work correctly (Thanks Matt!) [-] Fixed RegExp--most of the RegExp were missing the escaping backslash. (Thanks Matt!) [-] Fixed bug w/_stripInvalidChars() function which caused custom rules not to work--like are used by the validateFormat("SSN") method. [+] Added the obj.fieldName.validatorAttached property, to track whether or not the checkForErrors should be added to the onBlur event. Previously the checkForErrors event was being triggered each time a validator was attached. Build 136b (September 11, 2002) --------------------------------------------------------------------------- [-] Fixed oddity in the new String.prototype.rereplace() method which appears was causing IE to ignore the "global" instance property on the RegExp object. I fixed this by passing the attributes [+] Added qFormAPI.version property to show the current build number [+] Added qFormAPI.userAgent property which stores the current browser information in lowercase [+] Added qFormAPI.isMac property to indicate whether the current browser is running on a Mac OS. Build 136a (September 5, 2002) --------------------------------------------------------------------------- [-] Switch the logic for the validateLengthGT()/validateLengthLT() validation routines. This has been reversed since introduction. Build 136 (September 4, 2002) --------------------------------------------------------------------------- [-] Fixed bug which would cause some of the field extension method (trim(), toUpperCase(), etc) to loop endlessly if placed in some event handlers of the fields. [-] Fixed bug in _stripInvalidChars() function in the functions_js12.js file which was cause the custom RegExes to be case sensitive. [-] Fixed bug in _transferOptions() function when the sort argument is passed as null. This only caused a problem if you're manually calling the function outside of the qForms API. [-] Fixed bug in validateFormat() method, which caused an error when a custom mask was used. [-] Fixed bug w/disabled() method which didn't handle fields that were arrays [-] Fixed miscellaneous bugs w/Mac IE (fieldset, empty form elements) [-] Re-wrote RegEx support for Mac IE compatibility [-] Made HTML generation XHTML compatible [-] Fixed bug in date validation routine w/Leap Year dates (Feb 29) (thanks to zadarum for spotting this and sending a fix) [-] Fixed bug in JS version detection routine that was causing strange warning dialog box in some version of the Mac IE [-] Added an add-on String prototype to correctly handle RegEx support for the multiline property in Mac IE [-] Thanks to Steve Moore for all his patience in helping work out the Mac IE issues (and the rest of your guys) [-] Fixed bug in is/validatePhoneNumber() method which wasn't stripping just numbers. (Thanks to Dave Babbitt) [-] Compressed validation.js is now working. The bug with the validateDate() is fixed. It should be safe to use the compressed version of this script now. Build 135a (October 31, 2001) --------------------------------------------------------------------------- [-] Fixed documentation. The validateFormat() was incorrectly documented as a core field extension called "format()." Build 135 (October 31, 2001) --------------------------------------------------------------------------- [*] The isNotNull() validator now will always run--regardless of whether the field is required or not. Using this method essentially requires a field, but allows you to define a custom error message. (NOTE: Once a validation method is applied, there's no way to remove the validation during runtime. This means you should never use this validation method on fields in which you may not want to validate the field based upon a condition.) [*] Changed the doBlur argument of the setValue() method to doEvents. The value of this argument now determines if any of the events for the field will be triggered after calling the setValue() method. The default value for this argument is still true. [*] Changed the isDate() validation method. Made some changes to the masking methods. 2 digit year masks ("yy") are now allowed. [+] Added the _swapOptions() function--which swaps two nodes in a select box. [+] Added the obj.fieldName.moveUp() and obj.fieldName.moveDown() methods. [+] Added the obj.onError() event which runs when an error occurs. If this event returns false, it will cancel errors from being shown. [-] Fixed error in validateExp() documentation. Method throws errors if the expression is *true*, not false. [-] Made the "this.value" property available to the createDependecyTo() methods. [-] Fixed more errors in the documentation. [-] Fixed bug in validate/isRange() method which was causing the "high" argument not to be recognized. [+] Added the "type" of characters required to the validate/isLength() method. (i.e. "The state field must include 2 numeric characters.") Build 134a (August 28, 2001) --------------------------------------------------------------------------- [+] Added the qFormAPI.showStatusMsgs property which can be set to false to disable status bar messages from showing up (such as the initialization of the validation methods.) [-] Fixed bug in the obj.addField() method which was causing form fields that are arrays (such as checkboxes w/the same name) to be excluded from qForms object. Build 134 (August 23, 2001) --------------------------------------------------------------------------- [*] Fixed some grammatic errors in the docs. [-] Netscape 6 seems to be considering the