Closed RahulKhandelwal17 closed 4 months ago
I am able to reproduce this and have created an internal ticket for review. In the meantime, if anyone would like to attempt to tackle this, we always welcome any contributions to our open source!
For internal reference: FIO-8345
@RahulKhandelwal17 After review it was determined the documentation is inaccurate. This particular option/override is not valid and will be removed from the docs.
Describe the bug When I'm creating a form with input option parameter "components" form doesn't render.
Below code run on perfectly fine https://jsfiddle.net/travistidwell/6uge153s/
Formio.createForm(document.getElementById('formio'), 'https://exampleapp.form.io/renderertest', { readOnly: false, hide: {"firstName": true}, ////components: { "textfield": { "prefix": "hello" }}, disabled: {"lastName": true}, buttonSettings: { "showSubmit": false } });
But when uncomment below code components: { "textfield": { "prefix": "hello" }},
form doesn't get render and I'm getting below error in console. "TypeError: this.getComponents(...).slice is not a function" error in console.
As per the documentation (screen-shot attached) I'm passing the right data in components.
Version/Branch https://github.com/formio/formio.js/tree/v5.0.0-rc.2
To Reproduce Steps to reproduce the behavior:
Expected behavior Form should be rendered.