TM::Apeform Change Log 2009-08-25 * TinyMCE example added. * Small changes to reflect my current coding style: closing tag "?>" removed from the end of the files, spaces after "!" removed. 2009-02-07 * Unquoted HTML in select options caused rendering errors. 2007-07-15 * Text elements can handle single values in 'value', 'maxLength' and 'size' a lot better. Usefull for TM::MyCSVAdmin. * Test.php fixed and improved. 2007-01-05 * Added some preventive "if" to the JavaScript focus handler. 2006-06-24 * If the user submitts a file and then waits for a long time, the file is lost. Now file() will notice this and triggers an error. * Maximum filename length for 'unixname' reduced to 64 which is the max. length in Microsoft's "Joliet" file system. 2006-06-22 * Some examples fixed and improved, e.g. example_colors.php. 2006-06-17 * Bugfix: _isSubmitted was not set when the first element was a "file". (Thanks to Julien Huon!) * MIME type "image/pjpeg" (bug in IE) will be corrected to "image/jpeg". 2006-02-19 * Detects and prevents "form post hijacking" (newline characters are stripped from single line text elements). * Detects and cleans invalid values: Text exceeding maxlength limit; checkbox, radio and select values which are not part of the $options array; null bytes. * addClass() is allowed for header() elements. 2005-12-18 * It's possible to change a "text" to "textarea" without getting a warning. Importand for TM::MyCSVAdmin. 2005-06-01 * Some code beautifications. Separated "submit" and "image". 2005-04-26 * Fixed a tiny bug according to HTML special characters in the title="help" tooltips (does not use htmlspecialchars() any more). 2005-04-16 * Fixed a bug: Multiple text elements got the same id. (Thanks to René Pönitz!) * Renamed toHtml() to toHTML() because camel case should not destroy such abbreviations/technical terms. Luckily, PHP is case insensitive. 2005-02-28 * Removed from the default templates because it's deprecated since HTML 4.0. Replaced with . * Added some alternative templates (see comments). 2005-02-27 * Added $form->anchor to set a "scroll to" target when the submit button was hit. (Thanks to René Pönitz!) * Fixed a tiny bug in select() according to HTML special characters. * Replaced some == with strcmp()/strcasecmp() who are binary safe. Replaced some count() cause it's slow. * Added a regex and callback example. 2004-11-07 * getTemplate() added. (Thanks to Filippo Toso!) * getName() can handle both absolute (0 and above) and relative (-1 and below) offsets now, similar to error(). WARNING! This is incompatible to previous versions of the class! 2004-10-31 * addClass() added. Adds one or more stylesheet classes to the outer template of the form element added last. (Thanks to Filippo Toso!) * {class} added to the default 'input' template. * addAttribute() added. Adds any attribute or JavaScript handler to the inner input tag. (Thanks to Filippo Toso!) * handler() is deprecated now, use addAttribute() instead. * Re-enabled some lines of code in file(). File name extension of uploaded files will be preserved to be sure the real content type is used. * "window." replaced with "self." in JavaScript. * Multiple text fields and template 'accesskey' added to the documentation. 2004-10-25 * Added an 'acceskey' Template. Replaces every use of a with whatever you want, e.g. a. WARNING! This is a quick hack! It may fail if you use somewhere else in the form values. (Thanks to Filippo Toso!) * Some Examples are using multiple text fields now. * Another bug with multiple texts fixed. 2004-09-20 * error() accepts absolute (0 and above) and relative (-1 and below) offsets now. WARNING! This change is incompatible to previous versions! * _getUnixName() improved, handles Windows-1252 characters too. * Last line (the return) in text() fixed. 2004-07-31 * text() is able to display multiple input fields now. Use an array value in at least one of the method parameters defaultValue, maxLength or size. Units are still possible but changed a little bit. 2004-04-30 * Support for units added. Call $form->text("Label", "Help\tUnit") for example. The units value is displayed behind the element. * Added two examples adopted from PEAR::HTML_QuickForm. * Added another nice CSS-only example to example_templates.php. * test.php is back (uses PEAR::PHPUnit now). 2004-04-18 * In template 'input' the tag {error} is optional now. If omited, an error message will replace the label (as previous versions of the class did). If present, an error message will NOT replace the label. WARNING! This change is incompatible to previous versions of the class! * New elements: header() (Thanks to Shimrod!) and staticText() (similar to text, but not editable). New template for header added. * Added posibility to specify an id for the form using Apeform(0, 0, "id"). Now two or more forms in one page are possible. (Thanks to René Pönitz!) See example_multiform.php. * Auto-focus is disabled by default if the form gets a non-default id. Set setFocus to true to enable it. * Submit button always get accesskey="s" if only one button is defined. * Multiple calls of toHtml() failed. Fixed. * Changed element id's from "element3l" to "element3i". * The default templates
wasn't XHTML compatible. Changed to
. 2004-03-08 * Tiny speed-ups (count() moved out of for()). 2004-01-10 * The file upload triggers an user warning if "safe mode" restrictions are in effect and tmpDir is not set properly. The garbage collection does not crash any more. * Handling of special "umlaut" characters improved in _getUnixName(). * In action="...", any "&" becomes "&" according to the W3C. * A bunch of code beautyfications. * example_multiform.php added. * Removed test.php. 2003-12-28 * Added summary="" to the default template. 2003-11-17 * Added getName(). (Thanks to Shimrod!) * In toHtml(), replaced PHP_SELF with PHP_SELF?QUERY_STRING. (Thanks to Shimrod!) REQUEST_URI doesn't work on non-Apache servers. * In _getFocusHandler(), replaced forms[0] with forms['form']. (Thanks to Shimrod!) * In file(), removed the environment stuff. tempnam() handles this. (Was a bug caused by a bug in realpath(). It never returns false.) * file() displays at least first 12 characters of the filename submitted. * _doGarbageCollection() introduced. * Improved the example_advertisement.php example. 2003-11-12 *