An open form format, v0.1 draft

Forms, written like Markdown.

Askdown is a plain-text language for forms. Write questions the way you'd write a list, get a form with pages, branching and validation, and host it or render it anywhere.

Free while in draft. No account needed to try it.

Source
---
title: Workshop sign-up
submit: Save my seat
---

? Full name *
___

? Email * {#email}
> We only use this to send the calendar invite.
[email]

? Which session? *
- ( ) Morning
- ( ) Afternoon
- ( ) I can't make it -> #sorry

? Dietary needs
- [ ] Vegetarian
- [ ] Gluten free
- [ ] Other: ___

? How much do you know about the topic?
[scale 1..5 "Beginner" "Expert"]

-> submit

--- {#sorry}

# Sorry to miss you

? Should we let you know about the next one?
- ( ) Yes please
- ( ) No thanks
Rendered form

Workshop sign-up

Which session?
Dietary needs
How much do you know about the topic?
Beginner
Expert

Sorry to miss you

Should we let you know about the next one?

Everything a form needs, in text

Parity with the usual form builders, without the drag and drop, unless you want it.

An open spec

Askdown is a documented, versioned format under CC BY 4.0. Anyone can implement it, and .ask.md files still read fine on GitHub.

JSON and a JSON Schema

Every document maps to a canonical JSON model, described by a published JSON Schema. Parse text, or generate forms from your own tools.

The question types you expect

Short and long text, email, URL, number, date, time, single and multiple choice, dropdowns, scales, ratings, grids and file uploads, with validation attributes.

Pages and branching

Split a form into pages and jump between them from an answer, so respondents only see what applies to them.

Hosted forms and responses

Sign in with an email link, publish a form at its own URL, and collect responses with summaries and a CSV export. No password, no plan to pick.

Reference libraries

askdown parses, serializes and validates with zero dependencies. @askdown/html renders accessible HTML and adds paging with a small vanilla runtime.

The whole syntax fits on a napkin

These four snippets cover most forms. The spec has the rest.

Questions
? Full name *
___

? Tell us more
___
___

? Email {#email}
> Help text under the label
[email]

? starts a question, * makes it required, {#id} pins the id. ___ is short text, two of them a paragraph.

Choices
? Attending?
- ( ) Yes
- (x) Not sure
- ( ) No -> #bye

? Toppings
- [ ] Cheese
- [ ] Other: ___

? Country
[select]
- Netherlands
- Canada

( ) is single choice, [ ] multiple, (x) a default, -> #page a jump, and "Other: ___" a free-text option.

Types and attributes
? Age
[number min=0 max=130]

? Score
[scale 0..10 "Low" "High"]

? Rate it
[rating 5]

? Resume
[file accept=".pdf" maxsize=10MB]

text, paragraph, email, url, number, date, time, radio, checkbox, select, scale, rating, grid, checkbox-grid, file.

Pages, grids and settings
---
title: Survey
confirmation: Thanks!
---

? Rate each session
[grid]
|          | Poor | Great |
| Keynote  |
| Workshop |

--- {#page-2}

# Second page

-> submit

Front matter sets the title and settings. --- starts a page, # titles it, and -> jumps somewhere else.

Start with an example

The builder shows a live preview, a visual editor and the JSON side by side.