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.01k stars 780 forks source link

Aligning radio button answer choices #8347

Open ilaplain15115 opened 1 month ago

ilaplain15115 commented 1 month ago

Are you requesting a feature, reporting a bug or asking a question?

Asking a question.

What is the current behavior?

When question titles of different lengths are listed, the radio button answers do not align when the Title Location is 'Left' .

What is the expected behavior?

Ideally the question titles could be on the left and the answer responses line up like in a matrix. For reporting purposes I do not want to format the questions in a matrix. GIthub

How would you reproduce the current behavior (if this is a bug)?

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code

{
 "title": "Github 4",
 "logoPosition": "right",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "radiogroup",
     "name": "question1",
     "titleLocation": "left",
     "questionCategory": "surveyquestion",
     "choices": [
      "Item 1",
      "Item 2",
      "Item 3"
     ],
     "colCount": 3
    },
    {
     "type": "radiogroup",
     "name": "question2",
     "title": "Longer question1",
     "titleLocation": "left",
     "questionCategory": "surveyquestion",
     "choices": [
      "Item 1",
      "Item 2",
      "Item 3"
     ],
     "colCount": 3
    },
    {
     "type": "radiogroup",
     "name": "question3",
     "title": "Longer Longer Longer question1",
     "titleLocation": "left",
     "questionCategory": "surveyquestion",
     "choices": [
      "Item 1",
      "Item 2",
      "Item 3"
     ],
     "colCount": 3
    }
   ]
  }
 ]
}

Specify your

GIT Hub- EAudit Specs

browser: Chrome

browser version: 119.0.6045.160

surveyjs platform (angular or react or jquery or knockout or vue): Angular

surveyjs version: 1.9.112

andrewtelnov commented 4 weeks ago

@ilaplain15115 You can use the dropdown matrix. Here is the example or single marix.

Thank you, Andrew

ilaplain15115 commented 4 weeks ago

Is there any way to get the radio buttons to align without it being in a matrix? Our team prefers to analyze data from single questions rather than matrix rows. Thank you!

andrewtelnov commented 3 weeks ago

@ilaplain15115 We don't have an easy way to implement it right now. However, we are working on improving our layout and you will have this functionaltiy out of the box in several weeks from now.

Thank you, Andrew