question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue on choosing question type as 'rating'

See original GitHub issue

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

Reporting a bug

What is the current behavior?

  • The styling for the rating type “radio field” is taking the styling class
 .sv_main .sv-visuallyhidden {
      position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px !important;
    width: 1px !important;
    overflow: hidden;

Due to this the radio buttons are not visible.

  • On trying to add custom styling it is observed that before the minRateDescription a radio button is being displayed.
<div>
   <label>
      <span>minRateDescription</span>
      <input type='radio' />
      <span>1</span>
   </label>
</div>

But the html structure that is currently being rendered is

<div>
   <label>
      <input type='radio' />
      <span>minRateDescription</span>
      <span>1</span>
   </label>
</div>

What is the expected behavior?

<div>
   <label>
      <span>minRateDescription</span>
      <input type='radio' />
      <span>1</span>
   </label>
</div>

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

The bug is reproducible by adding a question of typing rating.

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

Tested page URL:

Test code

const q6: Questions = {
    type: "rating",
    name: "satisfaction",
    title: "Below you will find word pairs that you can use to rate the survey. They each represent extreme opposites, between which a gradation is possible.",
    isRequired: true,
    minRateDescription: "Unsympathetic",
    maxRateDescription: "Sympathetic"
}

Specify your

  • browser: chrome
  • browser version: 83.0
  • surveyjs platform (angular or react or jquery or knockout or vue): survey-react
  • surveyjs version: 1.7.15

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tsv2013commented, Jun 29, 2020

These markup changes can affect other users and other themes.

You can use the https://surveyjs.io/Documentation/Library?id=surveymodel#onAfterRenderQuestion event to patch the markup according your needs.

0reactions
Matwogcommented, Jun 29, 2020

Thank you 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rating vs. ranking: which question type is best for your data?
A ranking question asks the respondent to put items in order, usually order of preference. Only one item can occupy each rank, so...
Read more >
Rating Scale: Survey Questions, Types & Examples
This type of rating scale question allows respondents to compare between options and then select the one that best meets the criteria of...
Read more >
Question Types - SurveyMonkey Help
Question Types ; Star Rating, Ask respondents to evaluate a statement on a visual scale of stars, hearts, thumbs, or smilies. ; Matrix/Rating...
Read more >
Rating Scale: Definition, Survey Question Types and Examples
Rating scale is defined as a closed-ended survey question used to represent respondent feedback in a comparative form for specific particular ...
Read more >
New question type: Rating - Stiltsoft Customer Case
A rating question asks a user to make a single choice from a range of options. Answer Design (What quiz designers see in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found