myself many times. The biggest problem is that HTML form fields have such an
inconsistent interface. For example, compare the HTML markup for a set of
radio buttons with a select box: very different, yet the two widgets
effectively do the same thing. I use a product called TerraForm [disclosure:
I sell it] to build forms which acts as an intermediary between the
developer and the HTML, providing a consistent markup. This makes doing what
you want to do much easier as the appearance of the field is simply
controlled by one database field. Example here:
http://www.eswsoftware.com/products/terraform/gallery/dynamic.cfm . Also,
check out this product by Bill Kaigler:
http://www.cfcodewriter.com/content.cfm?contentnbr=41
With the code you have written below, would you have one record for each
radio button? How about one record for all the radio buttons, then another
field containing a list of allowed values. You could use the same syntax for
checkboxes or select boxes. I'd also recommend a field for a human-friendly
field name, and a field tracking whether the field is required or not.
_____
From: [EMAIL PROTECTED] [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 July 2004 1:24 p.m.
To: CF-Talk
Subject: Help! - Dynamically Generate Forms from SQL DB - Bad Idea?
Hello List -
I am looking to store information about variables nad form fields in a db to
conditionally build html forms -
Has anyone stored the variable name, and the form type in a database - and
built the form dynamically on the fly?
I can't seem to find any references to it and am thinking because it must be
a bad idea.
Basically - store
name | type | state
LastName text
LastName text
HowToContact radio checked
Then build components that write the html form- ie - if it's a radio button
-
<cfoutput><input type="#type#" name="#VarName#" #state#></cfoutput>
Another purpose is - if I decide to do forms in Flash - perhaps I can have
the database spit out an XML document to use to build the flash interface.
Perhaps have the DB spit out XML/ or another format to build PDF forms
etc....
Too complex? Bad Idea - Any products already allowing this (NOT Hosted
servies)
Thanks!
Jason
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

