Allow marking complete form as disabled / read only
See original GitHub issuePrerequisites
- I have read the documentation;
Description
I would like to be able to render a complete form readonly or disabled. This is to show it to users later as a validation step. As far as I can tell this is not possible right now and I would have to add the respective property (ui:disabled/ui:readonly) for each input in the UISchema.
Would you agree that it might be useful to just set this globally on the form? If so I’d start preparing a pull request for it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How can I make an entire HTML form "readonly"?
Rather than doing this field by field is there any way to mark the whole form as readonly/disabled/static such that the user can't...
Read more >HTML attribute: readonly - HTML: HyperText Markup Language
The Boolean readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
Read more >Web Form Conundrum: `disabled` or `readonly`?
Fields marked as readonly are collected along with all of the normal field values in a form submission (“successful controls” in the spec)....
Read more >How to Disable Read-Only in Excel
Under General, find the Read-only Recommended check box and uncheck it. Click OK and finish saving the document. Now, when you go to...
Read more >Make a document read only - Microsoft Support
Under Editing restrictions, check Allow only this type of editing in the document, and make sure the list says No changes (Read only)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

For anyone looking into this in the future, the originally desired behavior (that of making the entire form readonly) can easily be accomplished, as follows:
uiSchema = { "ui:readonly": true }No need to parse each property name of a JSON doc.@eberkund @YingXue If you need to remove the submit button, you can just pass an empty div to the
<Form>component: https://github.com/mozilla-services/react-jsonschema-form#form-action-buttons