Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/synrc/form
๐งพ FORM: Business X-Forms
https://github.com/synrc/form
meta x-forms
Last synced: about 1 month ago
JSON representation
๐งพ FORM: Business X-Forms
- Host: GitHub
- URL: https://github.com/synrc/form
- Owner: synrc
- License: other
- Created: 2014-02-15T07:17:40.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-03-24T02:29:31.000Z (over 1 year ago)
- Last Synced: 2024-08-01T02:11:44.467Z (4 months ago)
- Topics: meta, x-forms
- Language: Erlang
- Homepage: https://form.n2o.dev
- Size: 576 KB
- Stars: 39
- Watchers: 14
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-elixir - form - Document forms and validation library. (Validations)
- awesome-elixir - form - Document forms and validation library. (Validations)
- awesome-starred - synrc/form - ๐งพ FORM: Business X-Forms (others)
README
FORM: Declarative Documents
============================[![Actions Status](https://github.com/synrc/form/workflows/mix/badge.svg)](https://github.com/synrc/form/actions)
[![Build Status](https://travis-ci.com/synrc/form.svg?branch=master)](https://travis-ci.com/synrc/form)
[![Hex pm](http://img.shields.io/hexpm/v/form.svg?style=flat)](https://hex.pm/packages/form)Intro
-----```erlang
#document { name = Name, sections = [
#sec { name=[<<"Input the password "
"you have received by SMS"/utf8>>,
nitro:to_list(Phone#phone.number)] } ],buttons = [ #but { name='decline',
title=<<"Cancel"/utf8>>,
class=cancel,
postback={'CloseOpenedForm',Name} },#but { name='proceed',
title = <<"Proceed"/utf8>>,
class = [button,sgreen],
sources = [otp],
postback = {'Spinner',{'OpenForm',Name}}}],fields = [ #field { name='otp',
type=otp,
title= <<"Password:"/utf8>>,
labelClass=label,
fieldClass=column3}]}.```
Spec
----Documents or Forms consist of set of fields grouped
in sections and a row of control buttons.
It mey also contain fields of customizable types.```erlang
-record(document, { ?ITERATOR(feed),
name,
base,
sections,
fields,
buttons,
access }).
``````erlang
-record(field, { id, sec=1, name, pos, title,
layout, visible=true,
disabled=false, format="~w",
curr=[], postfun=[], desc,
wide=normal, type=binary,
etc, labelClass=label,
fieldClass=field,
boxClass=box,
access, tooltips=[],
options=[], min=0, max=1000000,
length=10, postback }).
``````erlang
-record(sec, { id,
name,
desc="" }).
```
```erlang
-record(but, { id,
postback,
name,
title,
sources=[],
class }).
```
```erlang
-record(sel, { id,
postback,
name,
title }).
```
```erlang
-record(opt, { id,
postback,
name,
title,
checked=false,
disabled=false,
noRadioButton=false }).
```
```erlang
-record(validation, { name, type, msg,
extract = fun(X) -> X end,
options=[], function,
field={record,pos} }).
```KVX Data Model
--------------The Metainformation is used to generate KVS Data Model.
The [KVS](http://github.com/synrc/kvs) layer provides persistence.NITRO Applications
-----------------JavaScript Web Application is generated using Metainformation and Data Model.
[N2O](http://github.com/synrc/n2o) is used as a domain specific language to generate forms.
JavaScript/OTP is used to generate form. Average rendering speed is 25 forms per second.
Erlang and JavaScript/OTP are used to define validation
rules applied to documents during workflow.BPE Processes
-------------Workflows are complimentary to business rules and could be specified separately.
[BPE](http://github.com/synrc/bpe) defenitions provide front API to end-user applications.Credits
-------* Maxim Sokhatsky
OM A HUM