I need to create a text describing an online survey that can be easily edited by non-techies. I'd like to autogenerate the text into an HTML survey form but the process is applicable to all forms. I've attached my first ideas below. Is there something else out there like it? Perhaps part of some wiki markup? If not, please comment on the markup I've sketched out below.

update thanks to Fletch and Scooterm I've clarified my goals a bit, please see my reply below that has some goal clarifications

Name : ??? CGI::FormBuilder::Text2Form ???

Purpose : Allow a lightly marked up text file to be autogenerated into an HTML survey form. Markup will be parsed and fed into (probably) CGI::FormBuilder

Sample Input file:

 %%start     action="/somepath/foobar-survey.cgi"
 %%text      Name %% 30
 %%radio     Gender %% Male %% Female
 %%checkbox  Location %% Heaven %% Hell %% Purgatory
 %%popup     Occupation %% Student %% Flunky %% Other
 %%textarea  Complaints(Please list your complaints here.) %% 60 %% 4
 %%end
These could be intersperced with pod lines - lines that start with %% would be interpreted as form markup, other lines would be interpreted as pod (i.e. flush left would be wrapped and interpolated and indented would be verbatim)

Quick Guide to markup

     %%start     $start_form_attributs
     %%text      $name %% $width
     %%textarea  $name %% $width %% height
     %%radio     $name %% $value1 %% $value2 ... %% $valueN
     %%checkbox  same as radio
     %%popup     same as radio
     %%submit    $name
     %%end

     $name    - the name of the field
     $value   - value of a radio, checkbox or popup item
     $width   - width of a text field or area
     $height  - height of a text field or area

     Labels and prompts will be created from $name and $value unless
     you put a label/prompt in parentheses after $name or $value.
     For example:

	 %%text City

     Will create a textfield with "City" as both the field name
     and the label/prompt.

	 %%text fname (Please enter your First Name)

     Will create a textfield with the name "fname" and the prompt as
     shown in the parentheses.

In reply to Generating an HTML survey form from simple markup by jZed

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.