Formdown

Formdown is a way to create documents that need form elements like contracts, tax filings, sign-up pages, order forms, etc. Based on Markdown, it puts an emphasis on readability and ease of authoring in a plain text format that can be saved as a file and tracked by a version control system or easily shared. The content-focused nature of Formdown forces a separation of presentation that makes the resulting HTML web forms more accessible and responsive to a wider number of people with different disabilities or devices.

Getting started

You’re throwing a fancy pants summer soiree party and you want to create an invitation so you break out your trusty text editor and type:

# Summer Soiree Répondez s'il vous Plaît

_________(First name) _________(Last name)

Will you make it to the party? () Yes () Maybe () No

What items will you bring to the party?

[] Chicken
[] Helium baloons
[] Bug spray
[] Dracula costume

What's your email address? __________@(Email)

Anything else you'd like to say?:

_____________________________
_____________________________
_____________________________
_____________________________(Comments)

[ Send R.S.V.P. ]

You save the file as soiree.fmd and want to convert it to HTML for your website. What do you do now?

First, install Formdown on your computer (make sure Ruby is installed):

$ gem install formdown

Then run your invitation through the Formdown compiler to convert it into HTML:

$ cat soiree.fmd | formdown -a > soiree.html

Now open the HTML file and you’ll see your Summer Soiree Répondez s'il vous Plaît in its full HTML form beauty.

That was a lot easier than writing all that HTML by hand, right?

If you’re intrigued by this idea, you can hack on the source code on Github.