{"id":15394204,"url":"https://github.com/xyproto/simpleform","last_synced_at":"2025-06-15T20:32:48.572Z","repository":{"id":136551494,"uuid":"314604246","full_name":"xyproto/simpleform","owner":"xyproto","description":":large_blue_diamond: Simple language for creating HTML forms","archived":false,"fork":false,"pushed_at":"2020-11-23T16:20:51.000Z","size":68,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T23:56:30.873Z","etag":null,"topics":["classless","dsl","form","generator","html"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyproto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-20T16:09:53.000Z","updated_at":"2024-09-13T06:10:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"797283a1-6afb-4e1b-954c-037dcfe2bf03","html_url":"https://github.com/xyproto/simpleform","commit_stats":{"total_commits":39,"total_committers":2,"mean_commits":19.5,"dds":"0.28205128205128205","last_synced_commit":"50b76251e6b3dc979221c71ee078287c066f974c"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/xyproto/simpleform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fsimpleform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fsimpleform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fsimpleform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fsimpleform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyproto","download_url":"https://codeload.github.com/xyproto/simpleform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fsimpleform/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260046048,"owners_count":22950797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classless","dsl","form","generator","html"],"created_at":"2024-10-01T15:22:20.915Z","updated_at":"2025-06-15T20:32:48.533Z","avatar_url":"https://github.com/xyproto.png","language":"CSS","readme":"# :large_blue_diamond: SimpleForm description language\n\n[![Build Status](https://travis-ci.com/xyproto/simpleform.svg?branch=main)](https://travis-ci.com/xyproto/simpleform) [![GoDoc](https://godoc.org/github.com/xyproto/simpleform?status.svg)](http://godoc.org/github.com/xyproto/simpleform) [![Go Report Card](https://goreportcard.com/badge/github.com/xyproto/simpleform)](https://goreportcard.com/report/github.com/xyproto/simpleform)\n\nSimpleForm is a language for constructing HTML forms out of very little text.\n\nHere is an example of a form definition:\n\n\n```ruby\nLogin\n\nWelcome dear user!\n\nUsername: {{ username }}\nPassword: {{ password }}\n\n[Login](/login)\n```\n\n* The first line is recognized as the title, and is used both for the title (like this: `\u003ctitle\u003eLogin\u003c/title\u003e` and as a title in the body, like this: `\u003ch2\u003eLogin\u003c/h2\u003e`.\n* The lines with `{{` and `}}` are recognized as single line input fields, where the label is the word before `:`.\n* The `[Login](/login)` is recognized as a button that can submit the contents of the form as a POST request to `/login`.\n* The syntax is inspired by `Jinja2` and `Markdown`.\n\nHere's the generated HTML from the login form above:\n\n```html\n\u003c!doctype html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eLogin\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch2\u003eLogin\u003c/h2\u003e\n    \u003cp\u003eWelcome dear user!\u003c/p\u003e\n    \u003cform method=\"POST\"\u003e\n      \u003clabel for=\"username\"\u003eUsername:\u003c/label\u003e\u003cinput type=\"text\" id=\"username\" name=\"username\"\u003e\u003cbr\u003e\u003cbr\u003e\n      \u003clabel for=\"password\"\u003ePassword:\u003c/label\u003e\u003cinput type=\"password\" id=\"password\" name=\"password\"\u003e\u003cbr\u003e\u003cbr\u003e\n      \u003cinput type=\"submit\" formaction=\"/login\" value=\"Login\"\u003e\u003cbr\u003e\u003cbr\u003e\n    \u003c/form\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nUnstyled, it looks like this:\n\n![loginform](img/loginform.png)\n\nWhen styled with [MVP.CSS](https://andybrewer.github.io/mvp/), this is how it looks:\n\n![loginform_styled](img/loginform_styled.png)\n\n## Features and limitations\n\n* If the input ID starts with `password` or `pwd`, then the input type `\"password\"` is used.\n* Multiple buttons can be provided on a single line.\n* All text that is not recognized as either the title or as form elements is combined and returned in a `\u003cp\u003e` tag.\n* If `[[` and `]]` are used instead of `{{` and `}}`, then a multi-line text input box is created instead.\n\n# TODO\n\n* Formal spec (or at least a PDF describing the language).\n* Radio button support, with options separated by `|`.\n* Support for required fields, by using the exclamation mark.\n* Spport all available form elements, while keeping complexity low.\n\n## General Info\n\n* Version: 0.2.0\n* License: MIT\n* Author: Alexander F. Rødseth \u0026lt;xyproto@archlinux.org\u0026gt;\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fsimpleform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyproto%2Fsimpleform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fsimpleform/lists"}