无法在 Surveyjs 的 Markdown Radiogroup 中的 "other(describe)" 复选框中添加 svg 图标
Can not add svg icon in "other(describe)" check box in Markdown Radiogroup in Surveyjs
questions: [
{
"type": "radiogroup",
"hasOther": true,
"isRequired": true,
"name": "favoritePet",
"title": "What is your favorite pet  ?",
"choices": [
{
"value": "dog",
"text": "Dog: "
}, {
"value": "cat",
"text": "Cat: "
}, {
"value": "parrot",
"text": "Parrot "
}
]
}
]
can not add the icon in the hasOther, In documentation it has shown the icon displayed in choices but not show how to add icon in other(describe) choice.
https://www.surveyjs.io/Examples/Library/?id=survey-markdown-radiogroup
您需要设置 otherText
属性:
{
"type": "radiogroup",
"hasOther": true,
"isRequired": true,
"name": "favoritePet",
"otherText": "Custom other text with an image ",
"title": "What is your favorite pet  ?",
"choices": [
{
"value": "dog",
"text": "Dog: "
}, {
"value": "cat",
"text": "Cat: "
}, {
"value": "parrot",
"text": "Parrot "
}
]
}
这是工作的 plunker 示例 - https://plnkr.co/edit/9LgRCEpWr2b8LGU1
questions: [
{
"type": "radiogroup",
"hasOther": true,
"isRequired": true,
"name": "favoritePet",
"title": "What is your favorite pet  ?",
"choices": [
{
"value": "dog",
"text": "Dog: "
}, {
"value": "cat",
"text": "Cat: "
}, {
"value": "parrot",
"text": "Parrot "
}
]
}
]
can not add the icon in the hasOther, In documentation it has shown the icon displayed in choices but not show how to add icon in other(describe) choice. https://www.surveyjs.io/Examples/Library/?id=survey-markdown-radiogroup
您需要设置 otherText
属性:
{
"type": "radiogroup",
"hasOther": true,
"isRequired": true,
"name": "favoritePet",
"otherText": "Custom other text with an image ",
"title": "What is your favorite pet  ?",
"choices": [
{
"value": "dog",
"text": "Dog: "
}, {
"value": "cat",
"text": "Cat: "
}, {
"value": "parrot",
"text": "Parrot "
}
]
}
这是工作的 plunker 示例 - https://plnkr.co/edit/9LgRCEpWr2b8LGU1