
RCS file: /home/nwiger/perlmod/lib/CGI/RCS/FormBuilder.pm,v
Working file: /home/nwiger/perlmod/lib/CGI/FormBuilder.pm
head: 2.13
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 113;	selected revisions: 113
description:
CGI::FormBuilder for building form-based applications
----------------------------
revision 2.13
date: 2004/10/04 18:00:56;  author: nwiger;  state: Exp;  lines: +89 -46
many patches, including a big Text::Template enhancement and <label> addition
----------------------------
revision 2.12
date: 2003/10/01 21:25:44;  author: nwiger;  state: Exp;  lines: +98 -60
many bugfixes, including:
- bad -x "sendmail -t" test
- XHTML compliance
- more sensible internal multiple => 1 handling
- problem with $validate || $required leaving JS remnants
- addition of skip => /pat/ option to mail*
- fix for broken 2.11 field.invalid test
----------------------------
revision 2.11
date: 2003/07/11 18:08:56;  author: nwiger;  state: Exp;  lines: +7 -9
ok, *really* fixed the security problem this time, thanks to Remi
----------------------------
revision 2.10
date: 2003/07/09 18:20:23;  author: nwiger;  state: Exp;  lines: +9 -4
added patches from Brad Bowman
----------------------------
revision 2.9
date: 2003/07/07 18:39:10;  author: nwiger;  state: Exp;  lines: +33 -20
patched a serious security issue discovered by Robert Mathews
----------------------------
revision 2.8
date: 2003/06/05 17:55:47;  author: nwiger;  state: Exp;  lines: +117 -2536
added top-level HTML::Template field
added ability to specify coderefs to validate
added 'ALL' key to validate options
misc bugfixes
some other stuff I can't remember right now
----------------------------
revision 2.7
date: 2002/10/04 17:42:22;  author: nwiger;  state: Exp;  lines: +1153 -587
see changes.2.07
----------------------------
revision 2.6
date: 2002/02/28 00:42:05;  author: nwiger;  state: Exp;  lines: +68 -59
applied patch from Randy Kobes fixing test failures on Win32
----------------------------
revision 2.5
date: 2002/02/21 23:26:54;  author: nwiger;  state: Exp;  lines: +12 -12
fixed bug in individual 'static' settings, added more tests
changed default <tr> valign to 'middle' to make it better
----------------------------
revision 2.4
date: 2002/02/21 23:04:54;  author: nwiger;  state: Exp;  lines: +43 -31
added the ability to specify individual fields as 'static', thanks
to help from Koos Pol
added the valign attribute to twiddle <tr> alignment, defaults to 'top'
added simple "generated by" message so version is apparent, may remove later
----------------------------
revision 2.3
date: 2002/02/19 22:21:17;  author: nwiger;  state: Exp;  lines: +6 -6
changed submit/reset names *back* to _submit/_reset per much earlier
version, to prevent JavaScript collision that exists with form.submit();
----------------------------
revision 2.2
date: 2002/02/14 22:38:37;  author: nwiger;  state: Exp;  lines: +60 -18
fixed bug in sticky option that was overwriting default values
removed check for 'submit' field in submitted() function
added _name suffix to javascript validate() generation, allowing
multiple javascript validation functions when forms are named
----------------------------
revision 2.1
date: 2002/01/04 23:26:18;  author: nwiger;  state: Exp;  lines: +19 -3
added new 'force' option to allow field() to win reliably
fixed test suite so it works on Windoze correctly
----------------------------
revision 2.0
date: 2001/12/22 02:25:22;  author: nwiger;  state: Exp;  lines: +617 -266
v2.0 normalized with many bug fixes, docs, features
----------------------------
revision 1.99
date: 2001/12/19 00:45:09;  author: nwiger;  state: Exp;  lines: +9 -10
major bug introduced when removed "@v" test; had to redo
getting CGI params via $CGI object, now should work reliably
----------------------------
revision 1.98
date: 2001/12/18 00:41:04;  author: nwiger;  state: Exp;  lines: +11 -18
- interim checking with several docs updates
- most likely next CPAN version will be 2.0
----------------------------
revision 1.97
date: 2001/12/18 00:16:28;  author: nwiger;  state: Exp;  lines: +246 -201
- new semantics of 'required' option, read the docs!
- fixed many documentation errors and omissions
- redid SYNOPSIS so is more concise and readable
- added separate README since docs are now so huge
- more debugging messages
- fixed YA0B (Yet Another 0 Bug)
- updated JavaScript generation so field names like 'db:host' safe
- more new tests for new features
- instead of stringification, now use length to test if val exists;
  if this introduces any bugs please let me know
----------------------------
revision 1.96
date: 2001/12/14 22:21:18;  author: nwiger;  state: Exp;  lines: +6 -5
squashed a few silly uninitialized warnings
----------------------------
revision 1.95
date: 2001/12/14 22:16:56;  author: nwiger;  state: Exp;  lines: +80 -61
fixed a bug with mixed-case values, added arrayref capability, more docs
added lots of tests, many more to come, this should help bugfinding
----------------------------
revision 1.94
date: 2001/12/13 22:36:00;  author: nwiger;  state: Exp;  lines: +5 -5
fixed another insidious bug w/ keepextras turning 0 val into ""
----------------------------
revision 1.93
date: 2001/12/12 23:32:47;  author: nwiger;  state: Exp;  lines: +27 -10
fixed an insidious bug with $form->submitted that was preventing
it from working in edge cases; also added ability to key off alt field
----------------------------
revision 1.92
date: 2001/12/12 22:00:43;  author: nwiger;  state: Exp;  lines: +3 -3
fixed major bug w/ predefined regexps
----------------------------
revision 1.91
date: 2001/12/11 23:49:21;  author: nwiger;  state: Exp;  lines: +40 -33
updated docs and acknowledgements, no code changes
----------------------------
revision 1.90
date: 2001/12/11 23:04:26;  author: nwiger;  state: Exp;  lines: +284 -38
integrated massive patch enabling Template Toolkit c/o Andy Wardley
refined several regexps thanks to Mark Belanger
fixed numerous bugs, including insidious header problem and 0-stickiness
----------------------------
revision 1.89
date: 2001/11/12 21:53:19;  author: nwiger;  state: Exp;  lines: +34 -2
added docs on multiscreen app
----------------------------
revision 1.88
date: 2001/11/12 21:05:48;  author: nwiger;  state: Exp;  lines: +39 -3
added fieldtype and fieldattr, very useful options
----------------------------
revision 1.87
date: 2001/11/10 00:17:29;  author: nwiger;  state: Exp;  lines: +93 -13
*interim checkin* many docs improvements, made _ismember case-insesitive
NOTE: this release changed name of submit buttons from _submit to submit!
----------------------------
revision 1.86
date: 2001/11/09 01:31:37;  author: nwiger;  state: Exp;  lines: +29 -7
fixed several bugs, and added new regex patterns thanks to Mark Belanger
----------------------------
revision 1.85
date: 2001/11/07 23:43:02;  author: nwiger;  state: Exp;  lines: +35 -40
fixed a bug where field(value => $x) was not working for sticky values
also fixed a problem where header => 0 was removing too much useful stuff
also added a feature where single-option fields are checkboxes, otherwise
you can't unselect them properly
----------------------------
revision 1.84
date: 2001/10/29 18:57:30;  author: nwiger;  state: Exp;  lines: +5 -5
Mark Belanger pointed out that the STATE validation list was somehow
missing Illinois (IL). Ooops.
----------------------------
revision 1.83
date: 2001/10/16 00:18:12;  author: nwiger;  state: Exp;  lines: +34 -6
added new jsclick option
----------------------------
revision 1.82
date: 2001/10/15 23:53:19;  author: nwiger;  state: Exp;  lines: +4 -3
I should really test these more thoroughly before checking them in
----------------------------
revision 1.81
date: 2001/10/15 23:52:15;  author: nwiger;  state: Exp;  lines: +23 -15
fixed bug with single-value radio boxes, removing radionum opt
----------------------------
revision 1.80
date: 2001/10/15 23:42:41;  author: nwiger;  state: Exp;  lines: +3 -3
fixed typo - eek!
----------------------------
revision 1.79
date: 2001/10/15 23:41:37;  author: nwiger;  state: Exp;  lines: +8 -7
fixed bug with _sessionid introduced in last revision, fixed
spurious 'numeric ge' warnings lines 351 and 153
----------------------------
revision 1.78
date: 2001/10/15 20:40:01;  author: nwiger;  state: Exp;  lines: +3 -3
POD fubar
----------------------------
revision 1.77
date: 2001/10/15 20:39:08;  author: nwiger;  state: Exp;  lines: +3 -3
added ! /^_/ catch to keepextras option and fixed syntax error
----------------------------
revision 1.76
date: 2001/10/15 18:21:28;  author: nwiger;  state: Exp;  lines: +51 -20
fixed bug in _special_fields being re-passed, added name opt
to the _submitted key so that $form->submitted is more accurate
----------------------------
revision 1.75
date: 2001/10/10 21:56:21;  author: nwiger;  state: Exp;  lines: +5 -4
added better sticky catch
----------------------------
revision 1.74
date: 2001/10/10 20:25:03;  author: nwiger;  state: Exp;  lines: +58 -50
ok, *this* time I think all the bugs have been worked out
with taking both sets of options to new() and render()
----------------------------
revision 1.73
date: 2001/10/10 20:13:35;  author: nwiger;  state: Exp;  lines: +26 -19
had to move params option to new() - only
----------------------------
revision 1.72
date: 2001/10/10 20:00:23;  author: nwiger;  state: Exp;  lines: +5 -2
finally fixed sticky attr (maybe...)
----------------------------
revision 1.71
date: 2001/10/09 23:53:48;  author: nwiger;  state: Exp;  lines: +9 -7
additions to @OURATTR, fixed extra opts problem with <form>
----------------------------
revision 1.70
date: 2001/10/09 23:27:50;  author: nwiger;  state: Exp;  lines: +34 -9
updated and corrected docs
----------------------------
revision 1.69
date: 2001/10/09 20:33:48;  author: nwiger;  state: Exp;  lines: +7 -6
fixed bad $method, added safety for {labels}, header now defaults to 0!
----------------------------
revision 1.68
date: 2001/10/09 18:58:46;  author: nwiger;  state: Exp;  lines: +532 -492
massive option revamp (all live in render() now) and doc reordering
----------------------------
revision 1.67
date: 2001/10/02 23:15:54;  author: nwiger;  state: Exp;  lines: +3 -7
fixed bug with new implementation of $hashref = $form->field;
----------------------------
revision 1.66
date: 2001/10/02 22:54:50;  author: nwiger;  state: Exp;  lines: +13 -3
changed form->field in scalar context
----------------------------
revision 1.65
date: 2001/09/19 18:26:08;  author: nwiger;  state: Exp;  lines: +57 -33
updated docs, fixed the sticky option so it actually works
----------------------------
revision 1.64
date: 2001/09/19 00:10:40;  author: nwiger;  state: Exp;  lines: +61 -21
fixed several JavaScript bugs with respect to checkboxes and radios
added more docs, improved look of JavaScript code that was generated,
now properly handle multiple select lists in client side JavaScript
----------------------------
revision 1.63
date: 2001/09/18 22:46:18;  author: nwiger;  state: Exp;  lines: +14 -8
fixed a bug (behavior?) with a values => HASH call to render()
overwriting field values that had been manually set via field()
----------------------------
revision 1.62
date: 2001/09/14 20:52:34;  author: nwiger;  state: Exp;  lines: +12 -7
changed semantics of hidden fields in a non-static mode, and also
added code to properly handle onChange attr to <select> elements
----------------------------
revision 1.61
date: 2001/09/14 17:56:34;  author: nwiger;  state: Exp;  lines: +53 -14
added nameopts option and renamed sort option to sortopts
----------------------------
revision 1.60
date: 2001/09/14 16:58:09;  author: nwiger;  state: Exp;  lines: +5 -3
revamped _opt to handle all types of data docs claim it does :-)
----------------------------
revision 1.59
date: 2001/09/13 22:57:31;  author: nwiger;  state: Exp;  lines: +169 -51
before I lose track, moved $CGI init to ->new, added separate _opt and _sort,
and arrayref and hashref support to options arg in field
----------------------------
revision 1.58
date: 2001/09/10 21:41:03;  author: nwiger;  state: Exp;  lines: +4 -4
added proper handling for boolean values
----------------------------
revision 1.57
date: 2001/09/10 21:33:57;  author: nwiger;  state: Exp;  lines: +24 -26
collapsed smart options to single "smartness" one
----------------------------
revision 1.56
date: 2001/09/10 21:15:18;  author: nwiger;  state: Exp;  lines: +6 -6
changed field detection to only w/ realsmart on
----------------------------
revision 1.55
date: 2001/09/07 21:38:25;  author: nwiger;  state: Exp;  lines: +46 -16
added lalign, fixed OURATTR, added jsfunc, fixed labels, other stuff
----------------------------
revision 1.54
date: 2001/09/04 22:42:40;  author: nwiger;  state: Exp;  lines: +85 -22
no bugs in field(), it all works fine
----------------------------
revision 1.53
date: 2001/09/01 02:07:35;  author: nwiger;  state: Exp;  lines: +6 -5
fixed up checkbox/radio default values
----------------------------
revision 1.52
date: 2001/09/01 01:51:32;  author: nwiger;  state: Exp;  lines: +6 -10
added more functionality to opt handling methods
----------------------------
revision 1.51
date: 2001/09/01 01:48:02;  author: nwiger;  state: Exp;  lines: +4 -4
bug in arrayref handling of opts
----------------------------
revision 1.50
date: 2001/09/01 00:27:01;  author: nwiger;  state: Exp;  lines: +54 -7
added jshead stuff. still work to do for cleanup and docs.
----------------------------
revision 1.49
date: 2001/08/31 21:12:09;  author: nwiger;  state: Exp;  lines: +11 -7
fixed required => , added 'ALL' (no docs)
----------------------------
revision 1.48
date: 2001/08/31 20:39:14;  author: nwiger;  state: Exp;  lines: +6 -4
added ARRAYREF handling of key=name
----------------------------
revision 1.47
date: 2001/08/30 17:26:34;  author: nwiger;  state: Exp;  lines: +57 -24
the top-level attr tag is still undocumented
----------------------------
revision 1.46
date: 2001/08/24 20:33:56;  author: nwiger;  state: Exp;  lines: +100 -29
mailconfirm, mailresults
----------------------------
revision 1.45
date: 2001/08/24 00:27:36;  author: nwiger;  state: Exp;  lines: +249 -42
egads! it's growing like a monster!!!
----------------------------
revision 1.44
date: 2001/08/23 20:49:44;  author: nwiger;  state: Exp;  lines: +19 -12
added more docs
----------------------------
revision 1.43
date: 2001/08/23 20:38:46;  author: nwiger;  state: Exp;  lines: +159 -68
added docs on realsmart option
----------------------------
revision 1.42
date: 2001/08/23 00:22:21;  author: nwiger;  state: Exp;  lines: +3 -3
oops with DATE preset regex
----------------------------
revision 1.41
date: 2001/08/23 00:17:21;  author: nwiger;  state: Exp;  lines: +6 -2
# fatal error if they try to validate nonexistent field
----------------------------
revision 1.40
date: 2001/08/21 22:04:05;  author: nwiger;  state: Exp;  lines: +25 -8
added tmpl_param and renamed param to cgi_param
----------------------------
revision 1.39
date: 2001/08/20 23:41:08;  author: nwiger;  state: Exp;  lines: +60 -42
this works pretty well, but has a few problems. for one thing,
I'm not sure what to do about the _sessionid or _submitted
fields. Part of me says to leave them out and let the user
insert them if they want. _sessionid is automatically
handled anyways by keepextras, but not really - you want
it there even if you have keepextras off. So, we reallyt
want to track this stuff automatically. This means I just
have to decide what the submitted() function is going to
return... maybe the number of times only in an array ctxt?
----------------------------
revision 1.38
date: 2001/08/20 23:16:32;  author: nwiger;  state: Exp;  lines: +29 -12
next version will have totally different arg handling in
the render() function - as it should have!!!
----------------------------
revision 1.37
date: 2001/08/20 22:58:49;  author: nwiger;  state: Exp;  lines: +139 -20
added param()
----------------------------
revision 1.36
date: 2001/08/20 21:43:14;  author: nwiger;  state: Exp;  lines: +21 -13
works, not 100% happy with internals or docs yet
----------------------------
revision 1.35
date: 2001/08/20 21:28:44;  author: nwiger;  state: Exp;  lines: +12 -8
ok, this time it *really* works with stickiness
----------------------------
revision 1.34
date: 2001/08/17 23:07:03;  author: nwiger;  state: Exp;  lines: +3 -3
finally works. internals are getting ugly.
----------------------------
revision 1.33
date: 2001/08/17 22:49:55;  author: nwiger;  state: Exp;  lines: +11 -4
never code on Fridays
----------------------------
revision 1.32
date: 2001/08/17 22:35:23;  author: nwiger;  state: Exp;  lines: +3 -12
sticky still broke if say field(value => $val) explicitly!
----------------------------
revision 1.31
date: 2001/08/17 22:33:45;  author: nwiger;  state: Exp;  lines: +4 -4
more crap to handle stickiness
----------------------------
revision 1.30
date: 2001/08/17 22:31:54;  author: nwiger;  state: Exp;  lines: +14 -7
attempted fixes for CGI values => sticky
----------------------------
revision 1.29
date: 2001/08/16 17:51:25;  author: nwiger;  state: Exp;  lines: +17 -6
hopefully fixed the multi-render problem
----------------------------
revision 1.28
date: 2001/08/15 22:39:01;  author: nwiger;  state: Exp;  lines: +4 -2
added template option to render()
----------------------------
revision 1.27
date: 2001/08/15 22:31:55;  author: nwiger;  state: Exp;  lines: +46 -23
updated things to use "field-email" instead of "email" and
also fixed problems with hidden fields not maintaining
multiple values in static forms correctly.
----------------------------
revision 1.26
date: 2001/08/15 18:41:20;  author: nwiger;  state: Exp;  lines: +64 -12
passing it on for double-checking
----------------------------
revision 1.25
date: 2001/08/15 18:16:33;  author: nwiger;  state: Exp;  lines: +159 -50
updated docs galore. going to send to klubic/william for proof
----------------------------
revision 1.24
date: 2001/08/15 04:34:52;  author: nwiger;  state: Exp;  lines: +48 -2
more docs, lots and lots and lots to go
----------------------------
revision 1.23
date: 2001/08/15 04:23:40;  author: nwiger;  state: Exp;  lines: +22 -19
I *really* think now that output() should be render(), since
it doesn't imply the printing that "output" does...
----------------------------
revision 1.22
date: 2001/08/15 04:07:59;  author: nwiger;  state: Exp;  lines: +48 -29
doc fixes, still lots to go
----------------------------
revision 1.21
date: 2001/08/15 03:31:51;  author: nwiger;  state: Exp;  lines: +15 -16
misc documentation
----------------------------
revision 1.20
date: 2001/08/15 03:23:35;  author: nwiger;  state: Exp;  lines: +355 -22
Lots and lots of docs
----------------------------
revision 1.19
date: 2001/08/15 01:09:00;  author: nwiger;  state: Exp;  lines: +168 -3
lots o' docs
----------------------------
revision 1.18
date: 2001/08/14 23:36:04;  author: nwiger;  state: Exp;  lines: +101 -30
added documentation
----------------------------
revision 1.17
date: 2001/08/09 00:30:53;  author: nwiger;  state: Exp;  lines: +8 -5
fixed misc bugs
----------------------------
revision 1.16
date: 2001/08/09 00:29:46;  author: nwiger;  state: Exp;  lines: +29 -8
this is really getting pretty cool, now it supports the
magical ->submitted and will also support ->sessionid in 2 secs
----------------------------
revision 1.15
date: 2001/08/08 23:41:35;  author: nwiger;  state: Exp;  lines: +175 -96
interim checkin
----------------------------
revision 1.14
date: 2001/08/08 21:37:20;  author: nwiger;  state: Exp;  lines: +87 -68
all the form building and stickiness is done. now it's onto
validation, testing for submittedness, and handling multiple
submit tags. hmmm.
----------------------------
revision 1.13
date: 2001/08/08 21:11:49;  author: nwiger;  state: Exp;  lines: +21 -42
now use @OURATTR for attr cleaning.
----------------------------
revision 1.12
date: 2001/08/08 20:59:07;  author: nwiger;  state: Exp;  lines: +115 -52
this version was gearing up to use %HTMLATTR, but it's just way
better to take out our custom tags so that we don't have to update
the module for every new version of HTML
----------------------------
revision 1.11
date: 2001/08/08 00:03:48;  author: nwiger;  state: Exp;  lines: +121 -26
This thing is getting monolithic, but now generates JavaScript too!
----------------------------
revision 1.10
date: 2001/08/07 20:24:54;  author: nwiger;  state: Exp;  lines: +31 -3
validate => javascript support sort of, not really
----------------------------
revision 1.9
date: 2001/08/07 18:31:21;  author: nwiger;  state: Exp;  lines: +24 -20
have to split up %attr and non-whatever, since it's polluting our tags...
----------------------------
revision 1.8
date: 2001/08/07 18:12:05;  author: nwiger;  state: Exp;  lines: +16 -6
now successfully handle multiple selected fields. woo-hoo!
----------------------------
revision 1.7
date: 2001/08/07 01:02:41;  author: nwiger;  state: Exp;  lines: +43 -23
excellent, just no support for multiple values. hmmm. tomorrow....
----------------------------
revision 1.6
date: 2001/08/07 00:10:27;  author: nwiger;  state: Exp;  lines: +20 -8
working well, the only thing that this doesn't handle yet is the
ability to have multiple options AND multiple values (like
with multiple select lists and checkboxes). Hmm.
----------------------------
revision 1.5
date: 2001/08/06 23:52:32;  author: nwiger;  state: Exp;  lines: +199 -54
this is getting pretty damn cool
----------------------------
revision 1.4
date: 2001/08/03 21:16:58;  author: nwiger;  state: Exp;  lines: +68 -12
Form building is getting pretty damn cool, just need to abstract
it a little more to make it even easier...
----------------------------
revision 1.3
date: 2001/08/03 19:13:28;  author: nwiger;  state: Exp;  lines: +29 -11
The very simplest cases are handled. Still no processing, and no
customization of field attrs (like checkbox, size, etc).
----------------------------
revision 1.2
date: 2001/08/03 18:48:07;  author: nwiger;  state: Exp;  lines: +51 -13
the form generation is simple and fairly flexible. now we
have to figure out where the form processing fits in...
----------------------------
revision 1.1
date: 2001/08/03 00:27:50;  author: nwiger;  state: Exp;
Initial revision
=============================================================================
