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 %%endThese 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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |