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.18k stars 808 forks source link

Rating Scale (Smileys) - Add a meaningful tooltip for idivdual emoji item #6138

Closed JaneSjs closed 1 year ago

JaneSjs commented 1 year ago

T3350 - Custom widget: Emotions Ratings https://surveyjs.answerdesk.io/internal/ticket/details/T3350 A tooltip displays the numeric value which corresponds to an item: image

Suggestion: allow users define text for smiley items.

{
 "focusFirstQuestionAutomatic": false,
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "rating",
     "name": "satisfaction-smileys-monochrome",
     "title": "How satisfied are you with our product?",
     "description": "Smiley rating with monochrome scale",
     "rateType": "smileys",
     "rateCount": 10,
     "rateMax": 10
    }
   ]
  }
 ],
 "showQuestionNumbers": "off"
}
JaneSjs commented 1 year ago

To define tooltip text for Rate items, create custom items and define their text property:

{
 "logoPosition": "right",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "rating",
     "name": "question1",
     "rateType": "smileys",
     "autoGenerate": false,
     "rateValues": [
      {
       "value": 1,
       "text": "Very dissatisfied"
      },
      {
       "value": 2,
       "text": "Somewhat dissatisfied"
      },
      {
       "value": 3,
       "text": "Neutral"
      },
      {
       "value": 4,
       "text": "Somewhat satisfied"
      },
      {
       "value": 5,
       "text": "Satisfied"
      }
     ]
    }
   ]
  }
 ]
}

image