A Form, a Submit Button, a Processing Backend
I came across the need to do a Form Submital, in the fashion of those
CGI-powered forums ubiquitous on the Web. In effect, the idea is to have fields for requesting user, type of request, perhaps a run-at field, etc. Then, on clicking the submit button, the machinery is set in movement and the form information is either emailed, or written to a database, or written somewhere in the filesystem.
TWikiForms look great, are easy to build and use - but are not meant for the type of work at hand. The user should
submit the information, rather than
save the topic. And the output shouldn't be a neatly formated form table, but a confirmation/error message of some kind. In the background, some perl script will be writing the stuff into a database (or, in my case, to a
cron table).
Or let's say we would like to have a front-end to a database: the user picks the fields, performs the search, gets a table.
BugzillaQueryPlugin already does the hard work, but we're using syntax rules rather than a graphic interface. In an ancient post to Codev (
DatabaseFormsSubmission),
DavidMurray states what appears to be this type of requirement.
Well, one can indeed create the form in
HTML and have the plugin deal with the background work - which will be significant, given the security constraints. But then we'll be losing the modularity we would have by splitting form construction/submital and background processing.
So, right now I'm trying to implement the thing with an
HTML form in TWiki, which on pressing the submit button calls the backend (packaged as a Plugin). Would anyone care to comment on the idea?
--
RenatoSerodio - 06 Sep 2006
--
Contributors: RenatoSerodio - 06 Sep 2006
Discussion
The
CommentPlugin might offer what you need. You can create templates that define custom input forms and output format. That way you can capture content in a structured way. See twiki.org templates at
UserCommentsTemplate, and sample forms at
ActionTrackerPluginAppraisal and
EditActionItems.
I think a generic way to define the backend would be useful, such as sending output by e-mail in structured form, feeding it into an external database or another web application using
REST or the like.
--
PeterThoeny - 06 Sep 2006