Not strictly a perl question, but trust me, it'll be implemented in perl.

I've got this project which is kind of One Form To Rule Them All.

We have all kinds of forms around the corporation which people are obliged to use for all kinds of things, get access, change access, request new directory and so on.

The people who deal with these forms don't know HTML/CGI at all and I'm constantly being asked to add someone to the distribution list, add a field, make a field compulsory, rename or delete etc.

So I thought the sensible thing to do was create an interface to manage and edit other forms. That way I can just have "form.cgi?id=1" and "form.cgi?id=2", and maintain them via "editform.cgi?id=1" and "editform.cgi?id=2" rather than fifty different html documents all needing to be kept up to date.

I'm assuming I'll do this via DBI and SQL, but what do monks think the setup should be?

What I'll need is to maintain an arbitrary number of forms, each with arbitrary numbers of fields of any form type (except upload), with arbitrary text to go both before and after them; fields need to be flagged as required or optional; the fields which are of type radio and select and checkbox will of course need to hold arrays which can be added to or deleted from.

I suppose users might also want to change the order of fields from time to time as well as insert a new field between existing fields. That's something I haven't coded before, a "move this item up one", "move to bottom", "move to top" etc. kind of thing.

Any initial thoughts to get me started would be appreciated.
--

“Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”
M-J D

In reply to Meta-form: database setup suggestions please by Cody Pendant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.