surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.12k stars 802 forks source link

Boolean question appears incorrectly when it shares the value with a Radio Button Group question #8333

Closed JaneSjs closed 4 months ago

JaneSjs commented 4 months ago

View Demo

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "boolean",
     "name": "question1"
    },
    {
     "type": "radiogroup",
     "name": "question1",
     "choices": [
      {
       "value": "Item 1",
       "text": "Yes"
      },
      {
       "value": "Item 2",
       "text": "No"
      }
   ]
    }
   ]
  }
 ]
}

Steps to reproduce:


Another usage scenario: valueTrue and valueFalse are specified. https://plnkr.co/edit/zRqq7omJ5MdG6PF9

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "boolean",
     "name": "question1",
     "valueTrue": "yes",
     "valueFalse": "no"
    },
    {
     "type": "radiogroup",
     "name": "question1",
     "choices": [
      {
       "value": "yes",
       "text": "Yes"
      },
      {
       "value": "no",
       "text": "No"
      }
   ]
    }
   ]
  }
 ]
}