Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Formio.builder(document.getElementById('builder'), {}, {
- builder: {
- basic: false,
- advanced: false,
- data: false,
- customBasic: {
- title: 'Basic Components',
- default: true,
- weight: 0,
- components: {
- textfield: true,
- textarea: true,
- email: true,
- phoneNumber: true
- }
- },
- custom: {
- title: 'User Fields',
- weight: 10,
- components: {
- firstName: {
- title: 'First Name',
- key: 'firstName',
- icon: 'terminal',
- schema: {
- label: 'First Name',
- type: 'textfield',
- key: 'firstName',
- input: true
- }
- },
- lastName: {
- title: 'Last Name',
- key: 'lastName',
- icon: 'terminal',
- schema: {
- label: 'Last Name',
- type: 'textfield',
- key: 'lastName',
- input: true
- }
- },
- email: {
- title: 'Email',
- key: 'email',
- icon: 'at',
- schema: {
- label: 'Email',
- type: 'email',
- key: 'email',
- input: true
- }
- },
- phoneNumber: {
- title: 'Mobile Phone',
- key: 'mobilePhone',
- icon: 'phone-square',
- schema: {
- label: 'Mobile Phone',
- type: 'phoneNumber',
- key: 'mobilePhone',
- input: true
- }
- }
- }
- },
- layout: {
- components: {
- table: false
- }
- }
- },
- editForm: {
- textfield: [
- {
- key: 'display',
- components: [
- {key: "placeholder", ignore: true},
- {key: "tooltip", ignore: true},
- {key: "description", ignore: true},
- {key: "prefix", ignore: true},
- {key: "suffix", ignore: true},
- {key: "inputMask", ignore: true},
- {key: "customClass", ignore: true},
- {key: "widget.type", ignore: true},
- {key: "allowMultipleMasks", ignore: true},
- {key: "hidden", ignore: true},
- {key: "hideLabel", ignore: true},
- {key: "showWordCount", ignore: true},
- {key: "showCharCount", ignore: true},
- {key: "hideInput", ignore: true},
- {key: "autofocus", ignore: true},
- {key: "spellcheck", ignore: true},
- {key: "disabled", ignore: true},
- {key: "tableView", ignore: true},
- {key: "mask", ignore: true},
- {key: "tabindex", ignore: true},
- ]
- } ,
- {key: 'data', ignore: true},
- {key: 'api', ignore: true},
- {key: 'conditional', ignore: true},
- {key: 'layout', ignore: true},
- ]
- }
- }).then(function(builder) {
- builder.on('saveComponent', function() {
- console.log(builder.schema);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement