Questions tagged [react-jsonschema-forms]

For questions related to the react-jsonschema-form framework.

react-jsonschema-form is a simple React component capable of building HTML forms out of a JSON schema.

120 questions
8
votes
1 answer

How can I us a theme to style all material-ui inputs as if they had a variant='outlined'?

I use theming to control the overall styling of my app, and a large number of TextField components throughout. I'd like them all to appear by default as having variant='outlined' (because despite MUI's explanations for it, the greyed out box is poor…
6
votes
2 answers

How to disable labels for additional properties with react-jsonschema-form?

I am trying to use this playground to find a schema which will allow me to show an object addable custom properties (basically I want the user to enter an associative array). When I do this: { "title": "My object", "type": "object", …
Matt
  • 2,232
  • 8
  • 35
  • 64
6
votes
1 answer

Prop change not triggering useEffect

I have a react component with a useEffect that is not being fired when the props change. I would like this component to update what it is displaying based on the prop. However, when the prop changes nothing happens. For debugging I added a button…
5
votes
1 answer

How to dynamically update react-json-schema form for checkboxes

I have code something like this const Jschema = { "type": "object", "title": "Create Form", "required": [ "level1", "level2" ], "properties": { "level1": { "type": "string", …
Kyoo
  • 91
  • 1
  • 2
  • 3
4
votes
2 answers

How to use react-jsonschema-form in react?

i have an issue with building forms in react with json. I've installed react-jsonschema-form but I just can't get it to work. I have the package installed locally, I am using TypeScript and I'm using nx/nrwl. This is what I've tried. import React…
Tomas Krcal
  • 63
  • 1
  • 6
4
votes
1 answer

Using JsonSchemaForm on change to update field's content

I am trying to use JsonSchema-Form component but i ran into a problem while trying to create a form that, after choosing one of the options in the first dropdown a secondary dropdown should appear and give him the user a different set o options to…
3
votes
2 answers

How can i override default error messages text in JSON forms

TLDR: I need to customize the default error messages provided by JSON form. Eg if field is required then JSON form give error like is a required property, I want it to return error message text like Invalid input.... I've created a JSON form with…
Jawad
  • 103
  • 1
  • 8
2
votes
0 answers

Render custom radio button group with react-jsonschema-form?

I'm using react-jsonschema-form to render a form. I can't figure out how to render a group of custom radio button elements. all I get is a single element this is my schema: overwrite: { type: "number", title: "Overwrite", default:…
Reuven
  • 145
  • 1
  • 12
2
votes
0 answers

Hide show widget conditionally in form using react-jsonschema-form library

I have created a form using below json configuration for react-jsonschema-form { "schema": { "title": "Employee Detail", "type": "object", "required": ["name", "email", "country"], "properties": { "name": { "type":…
2
votes
0 answers

react-jsonschema-form conditional field

I've got this form with react-jsonschema-form { "type": "object", "required": ["startDate", "endDate"], "properties": { "endDate": { "type": "string", "title": "Do", "format": "date" }, "startDate": { …
2
votes
1 answer

How to correctly preselect relevant rjsf `anyOf` item on
mount, based on `formData`?

I'm working with rjsf forms that save formData to the server. Users can re-open any form and it should re-populate with the previously saved formData. But, I'm having trouble getting the right oneOf/anyOf option selected when repopulating the Form…
Michal Kurz
  • 1,592
  • 13
  • 41
2
votes
2 answers

JSON Schema nested dependencies

I want to conditionally render an input field depending on a checkbox checked. This checkbox is nested and I dont know how to access it. I got this to work: { "type": "object", "properties": { "firstName": { "type": "boolean" } …
InsOp
  • 2,425
  • 3
  • 27
  • 42
2
votes
1 answer

How to create a typical country/province (or state) dependency dropdowns with react-jsonschema-forms?

I'm trying to code an example that shows two dropdowns: one for countries, and one for related states/provinces. When you choose a country on the first dropdown, the values of the second dropdown should be updated to display only the…
Maikel Nait
  • 251
  • 3
  • 18
2
votes
1 answer

Validation in Custom Field for a Boolen Field in react-jsonschema-form

I am using react-jsonschema-form to build a multi step form in React. One of the requirements is to use material-ui Toggle Buttons for boolean field. I was able to create a custom field but not sure how the validations work in this case. Even after…
user1868744
  • 963
  • 1
  • 13
  • 27
2
votes
2 answers

react-jsonschema-form generate with data

I m using react-jsonschema-form generator with NJsonSchema. After submit form i record json output and i want to use form for edit with submitted data any time. But i cannot find a way create the form with submitted data before. After try some json…
erkan demir
  • 1,386
  • 4
  • 20
  • 38
1
2 3 4 5 6 7 8