Skip to content

formdown is a markdown inspired markup language for html forms.

License

Notifications You must be signed in to change notification settings

NoRaincheck/formdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme

formdown is a markdown inspired markup language for html forms. It is based on the proposed markup on stackoverflow.

Testing

The tests (incomplete) can be run by typing:

nosetests

Installation

To install it in your Python installation run:

python setup.py install

Format Specification

Using the specification as defined below, we can generate the forms.

  • text = _____
  • gender = (X) Male () Female
  • checklist = [x] item 1 [] item 2 [] item 3
  • textbox = [[]]
  • selection = {item 1, (item 2), item 3}
  • date:datepicker = ________
print formdown.parse_form("name=____\ndate:datepicker=_____")

Output:

<p><label>Name</label><input type="text" name="name" id="name" /></p>
<p><label>Date</label><input type="text" name="date" id="date" class="datepicker"/></p>
<p><input type="submit" value="Submit"></p>

Usage with Datepicker

To use this with datepicker, simply follow the information contained on the homepage. Remember to change the script since "datepicker" is not an id but a class in formdown.

i.e.

$(function() {
  $( ".datepicker" ).datepicker();
});

Copyright and license

Code and documentation copyright 2014 Chapman Siu. Code released under the MIT license.

About

formdown is a markdown inspired markup language for html forms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages