TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is there a markup language for forms?

33 点作者 benkarst超过 5 年前
I've been coding web and mobile apps for 12 years and I've worked on countless forms. It seems like there should exist a formal way to define them (field names, data types, validation, endpoints, etc.), compatible with backend and frontend languages. Then a library, in each given language to render the form. Anyway, I'd like to define a form once and render it or process it without any extra work. Do any hackers know of such a thing?

7 条评论

sheeeep86超过 5 年前
I&#x27;ve seen several decent implementations based on <a href="https:&#x2F;&#x2F;json-schema.org&#x2F;implementations.html#web-ui-generation" rel="nofollow">https:&#x2F;&#x2F;json-schema.org&#x2F;implementations.html#web-ui-generati...</a><p>Json schema also has many tools for validation, which is nice if you&#x27;re passing the form data around.
评论 #21963751 未加载
评论 #21964686 未加载
andrei_says_超过 5 年前
I ended up creating my own, in yaml, with rails backend.<p>Includes multiple nested field sets, fields shown&#x2F;activated by other fields etc.<p>The gist is: structure in yaml&#x2F;json, then field code templates in partials, and validations on the back end. Included Salesforce list validations which was pretty neat.<p>The code is nowhere near reusable unfortunately.
ughitsaaron超过 5 年前
This might not be exactly what you’re looking for — it’s meant more for interactive editorial features than simple forms — but Idyll looks really cool and is worth a look.<p><a href="https:&#x2F;&#x2F;idyll-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;idyll-lang.org&#x2F;</a>
kkreuning超过 5 年前
XForms <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;XForms" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;XForms</a>
评论 #21963400 未加载
zzo38computer超过 5 年前
I once started inventing such a thing called FORMCARD, which supports paper forms as well as computer, and also includes transport protocol to submit the forms, as well as the file format to describe the form, but not much has been done with that since then.
tyzerdak超过 5 年前
Use html5 and make code snippets in editor. So when typing form it will create form with all input elements and you del not needed.
benkarst超过 5 年前
Dream Features - one to many