Question T9420
Visible to All Users

Panel Dynamic Question - Radio button logic

created 3 years ago

I have few questions in the sample:

  1. I have total of 12 radio group questions in the JSON but by default the first 3 radio group should be displayed and after hitting show more slot button it should display another 3 more slots.
    currently it's returning only one slot and in the time landing it's showing all the slots.

  2. Entire page should have only one radio button selection option.

current logic is in every question i have the option to select. But instead of selecting options form all the question i should have only one radio option.

expected output
Clipboard-File-1.png

above screen same page two options are selected. But expected result is like if i'm selecting saturday then above option should remove automatically. Is there any way to implement the logic like this.
Could any one help me on this.

I tried enable and disable options but its not working as expected.

https://plnkr.co/edit/dOxZi1H40v0OywpA?preview

Comments (1)
SS SS
Salai soundarya 3 years ago

    Any one please help me on this

    Answers approved by surveyjs Support

    created 3 years ago

    Hello,
    I would suggest something like in this example.

    JavaScript
    {     pages: [         {             name'page1',             elements: [                 {                     name'monday',                     type'radiogroup',                     title'Monday',                     choices: [                         '9:00 AM - 11:00  AM',                         '13:00 PM - 15:00 PM',                         '15:00 PM - 17:00  PM',                     ],                 },                 {                     name'tuesday',                     type'radiogroup',                     title'Tuesday',                     visibleIf'{monday} notempty',                     choicesFromQuestion'monday'                 },                 {                     name'wednesday',                     type'radiogroup',                     title'Wednesday',                     visibleIf'{tuesday} notempty',                     choicesFromQuestion'monday'                 },             ],         },     ], }

    Thank you,
    Andrew
    SurveyJS Team

      Comments (2)
      SS SS
      Salai soundarya 3 years ago

        Hi, Thanks for the response. 
        Here my scenario is a dynamic update. They are sending the JSON in API and based on the API response I need to write logic. The Above scenario which you shared is a static one right.

          However,
          How will be able to create a logic if you don't know the content?
          You can create a panel with questions inside or you can create a composite component and create questions via the property/properties.

          Thank you,
          Andrew
          SurveyJS Team