Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Adding hint for subquestion

  • Jmantysalo
  • Jmantysalo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 years 1 month ago #212818 by Jmantysalo
Adding hint for subquestion was created by Jmantysalo
I was asked to help in a situation where words in some subquestions might be unfamiliar to someone taking the survey. It is possible to have something like

Want to go to <a onclick="alert('Very relaxing hot and humid room.'); return false;">sauna</a>?

in a subquestion text. Do others have better idea? Maybe something like Show policy -link in the survey data policy.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago - 3 years 1 month ago #212820 by DenisChenu
Replied by DenisChenu on topic Adding hint for subquestion
Yes,

really better
Code:
sauna <a class="fa fa-question-circle text-info" data-content="Very relaxing hot and humid room" data-placement="top" data-toggle="popover" data-trigger="focus" role="button" tabindex="0" title=" "> </a>
OR
Code:
<a data-content="Very relaxing hot and humid room" data-placement="top" data-toggle="popover" data-trigger="focus" role="button" tabindex="0" title=" ">sauna</a>

And in custom.js
Code:
$('[data-bs-toggle="popover"]').popover();

I must create a a11y cleaner solution before implement in skelvanilla

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 3 years 1 month ago by DenisChenu. Reason: PS
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #212824 by Joffm
Replied by Joffm on topic Adding hint for subquestion
You find more about tooltips and popovers here
[url] getbootstrap.com/docs/3.4/javascript/#tooltips [/url]

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, Jmantysalo
The topic has been locked.
  • Jmantysalo
  • Jmantysalo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 years 1 month ago #212826 by Jmantysalo
Replied by Jmantysalo on topic Adding hint for subquestion
Thanks! Both of them seems good, I'll let the user to choise. And it also works if I just put the js-code to the question, so no need to modify the theme.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #212828 by DenisChenu
Replied by DenisChenu on topic Adding hint for subquestion
I use popover : getbootstrap.com/docs/3.4/javascript/#popovers

Really more powerfull than tooltip ...

And using focus triggered : allow open and don't close (keyboard compatible)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose