Last active
November 5, 2018 17:21
-
-
Save redgeoff/ad1a0907ccc494fb874c3a6c4f3cbe15 to your computer and use it in GitHub Desktop.
Autogenerating Forms Old - Definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const form = compiler.newComponent({ | |
component: "Form", | |
fields: [ | |
{ | |
name: "heading", | |
component: "Text", | |
text: "# Form using [MSON](https://github.com/redgeoff/mson)" | |
}, | |
{ | |
name: "fullName", | |
component: "PersonFullNameField", | |
required: true | |
}, | |
{ | |
name: "birthday", | |
component: "DateField", | |
label: "Birthday", | |
required: true | |
}, | |
{ | |
name: "phone", | |
component: "PhoneField", | |
label: "Phone" | |
}, | |
{ | |
name: "submit", | |
component: "ButtonField", | |
label: "Submit", | |
type: "submit", | |
icon: "Send" | |
} | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment