Skip to content

Instantly share code, notes, and snippets.

@redgeoff
Last active November 5, 2018 17:21
Show Gist options
  • Save redgeoff/ad1a0907ccc494fb874c3a6c4f3cbe15 to your computer and use it in GitHub Desktop.
Save redgeoff/ad1a0907ccc494fb874c3a6c4f3cbe15 to your computer and use it in GitHub Desktop.
Autogenerating Forms Old - Definition
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