I'm trying to create a field with several radio input options and an optional fill in the blank. The following schema doesn't seem to work in displaying output:
{
"oneOf": [
{
"enum": [
"Option 1",
"Option 2",
"Option 3"
]
}, {
"type":"string"
}
]
}
What should I be doing? Thanks!
Clarification: I'd like to output:
( ) option 1
( ) option 2
( ) option 3
(X) custom [__fill in the blank here__]
I'm sorry it was my mistake I accidently overrided that fiddle. Thank you for your clarification. If you want to have that layout in your page you must use two different components, a radio group buttons and a simple text field that automatically will be appended after the radio group (but you could do better using jquery and append it in a different place in the postRender function of Alpaca. So your
schema
must be like this :I added more options for the fields like disabling default sorting, disabling the input text for custom response because it must be enabled only when the user choose the 4th option.
Here's a more complete fiddle.