title | layout | fluid | section | weight | lib |
---|---|---|---|---|---|
Form Builder |
default |
true |
builder |
30 |
builder |
The Form Builder allows you to build a FormWizardPDF
which Renders as a Form in your Application
Find us on GitHub @ https://github.com/formio/formio
var onForm = function(form) { form.on('change', function() { subJSON.innerHTML = ''; subJSON.appendChild(document.createTextNode(JSON.stringify(form.submission, null, 4))); }); };
var setDisplay = function(display) {
builder.setDisplay(display).then(function(instance) {
instance.on('change', function(form) {
if (form.components) {
formElement.innerHTML = '';
jsonElement.innerHTML = '';
jsonElement.appendChild(document.createTextNode(JSON.stringify(form, null, 4)));
Formio.createForm(formElement, form).then(onForm);
}
});
});
};
// Handle the form selection. var formSelect = document.getElementById('form-select'); formSelect.addEventListener("change", function() { setDisplay(this.value); });
setDisplay('form'); </script>