How to set the field as radio? #1279
Answered
by
Monteth
isaacdarcilla
asked this question in
Q&A
-
I am using JSON Schema, how to achieve radio field using it? Can't find any related topics in the documentation. const schema = {
title: 'Guest',
type: 'object',
properties: {
fullName: { type: 'string', placeholder: 'first name' },
profession: {
type: 'string',
options: [
{
label: 'Developer',
value: 'developer',
},
{
label: 'Tester',
value: 'tester',
},
{
label: 'Product owner',
value: 'product-owner',
},
{
label: 'Project manager',
value: 'project-manager',
},
{
label: 'Businessman',
value: 'businessman',
},
],
},
age: {
format: 'date-time',
},
},
required: [
'fullName',
'profession',
'age',
],
}; |
Beta Was this translation helpful? Give feedback.
Answered by
Monteth
Aug 11, 2023
Replies: 1 comment
-
Hello @isaacdarcilla, {
profession: {
type: 'string',
uniforms: {
checkboxes: true,
options: [...]
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Monteth
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @isaacdarcilla,
You can use the
checkboxes
prop so that theAutoField
will change the component fromSelectField
toRadioField
.