>Has anyone written a tool that lets an HTML programmer
>produce a list of fields, and it generates a form to be inserted into
>the HTML and a corresponding bit of server code to turn the thing into
>a plausible email?
It would work like this:
You compose a form description document using an ordinary text editor.
It might look something like this:
INVISIBLE SECTION
to: tickets@bccla.org
subject: Steven Lewis event tickets
VISIBLE SECTION
name: mandatory text;
address: mandatory text;
address2: optional text;
home-phone: optional phone;
city: mandatory text;
postal-code: optional postal;
preferred-date: optional yyyy-mm-dd;
ticket-type: optional choice( balcony, orchestra, gods );
email: mandatory email;
You submit this to a Java program that runs on your machine. It
produces two things:
some HTML you can include inside your webpage and a JSP program.
You have to upload the JSP program to the webserver.
You web page would look like a two column table.
The server would issue error messages for invalid or missing fields in
a third column.
showing just the erroneous form on a page by itself.
When the user got it all correct. He would se a page that just said
"form sent, Click Back to resume"
The server would then take the form apart and produce an email.
The arriving email would look like this:
name: Roedy Green
address: #327-964 Heywood Avenue
...
At the bottom of the email it would be reencoded in CSV format or
possibly XML, whatever it turns out your database likes to eat.
e.g. Roedy Green,#327-964 Heywood Avenue,,Victoria,
Alternatively that could be a separate email sent to a different email
address. If you want to get very fancy, I could even cook up
something to periodically check the mail and import the results into
your database. We will have to see just how amenable the database is
to automated importing.
This does not handle credit cards. That is yet another kettle of
fish.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.