My custom fields #4531
-
Hello everyone! I am new to react-jsonschema-form and don’t understand the library customization. I want to use my own input fields, checkboxes and other components. I got my input field in the form, BUT with a default label and I can’t find a way to delete it. Will someone explain when I should use templates, fields and widgets? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
RJSF is super customizable, so there are a lot of way to tackle your issue. It's hard to say exactly which one is best for your specific case without looking at your source code. First, if you just want to hide labels, you can use the If you want to change the layout (or maybe you have duplicate labels appearing, etc.), then you should take a look at the BaseInputTemplate, ObjectFieldTemplate, and potentially check the list of all of the other available templates. I recommend looking at how the different theme packages implement these templates to get an idea of how they can be used. This doc also explains when to use fields vs templates vs widgets. |
Beta Was this translation helpful? Give feedback.
RJSF is super customizable, so there are a lot of way to tackle your issue. It's hard to say exactly which one is best for your specific case without looking at your source code.
First, if you just want to hide labels, you can use the
label
property in the UI Schema to hide them. If you want to hide them for all fields, you can put it in theui:globalOptions
.If you want to change the layout (or maybe you have duplicate labels appearing, etc.), then you should take a look at the BaseInputTemplate, ObjectFieldTemplate, and potentially check the list of all of the other available templates. I recommend looking at how the different theme packages implement these templates to get an idea of h…