hello all,
i'm pretty sick of writing html forms (big form, updates or inserts into
database table). so i've decided to write a dynamic form generator: you
give it some input (an XML file describing the form [title, colors,
fonts], DBI connection DSN, input attributes [type, validation rule, LOV
source if it's multiple choice, etc] etc) and it spits out the HTML if
there's no input, and processes the input if there is.
it will be able to process multi-page forms (with Prev, Next buttons) via
a <Page></Page> tag, and do basic DBI error recovery. I've done a cursory
search of freshmeat and found nothing that has this functionality.
However, I'd like to know if anyone of the list is aware of a similar
product (Oracle WebDB has a similar philosophy but different
implementation and is far more general). because i dont want to reinvent
the wheel.
anyway below is a sample config file that describes a form (dont worry
there is no code or parser yet, im just writing out the config so i know
what features i must implement..)
<form>
<name>test_form</name>
<title>A Test Form</title>
<dsn>DBI:Oracle:@host.com</dsn>
<user>scott</user>
<password>tiger</password>
<table>scott.emp</table>
<labelfont>face="arial, helvetica" size="2"</labelfont>
<inputfont>face="courier new, lucida" size="1"</inputfont>
(you can put font overrides inside each <input> node)
<input>
<name>first_name</name>
<label>Enter Your First Name</label>
<type>text</type>
<validation/> <-- not defined; or just omit
<sqlvalidation>NOT IN (SELECT first_name FROM table)</sqlvalidation>
</input>
<input name="email_me">
<label>Please select Y or N</label>
<type>radio</type>
<validation/> <-- null tag; or just omit them altogether
<sqlvalidation/> <-/
<lov>Y|N</lov> <-- list of values separated by |
<sqllov/> <-- SQL query returning one column to use as LOV
</input>
</form>
--
---------------------------------------------------------------------
Orlando Andico <[EMAIL PROTECTED]> POTS Phone: +63 (2) 937-2293
Mosaic Communications, Inc. GSM Mobile: +63 (917) 531-5893
Any sufficiently perverted technology is indistinguishable from Perl.
-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]