Welcome to the LimeSurvey Community Forum

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

Subquestion HTML code is shown in title as tooltip

  • jelo
  • jelo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
8 years 10 months ago #121081 by jelo
When adding HTML code to subquestion the same text is added as title="...." to the fields where to enter the answer.
When moving the mouse pointer over these fields the html code is displayed as tooltip.
In question type array numbers it seems to be that way. Is there a best practice to prevent showing the html code inside the title property?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago - 8 years 10 months ago #121088 by tpartner
Well, that appears to be a bug. In my opinion, the HTML tags should be stripped from title attributes. Please file a bug report.

In the meantime, to remove the titles from an array-numbers question, place this in template.js:
Code:
  $(document).ready(function() { 
 
    $('.array-multi-flexi td.question-item select').removeAttr('title');
  });

To strip HTML tags from the titles in an array-numbers question, place this in template.js:
Code:
  $(document).ready(function() { 
 
    $('body').append('<div class="new-placeholder" style="display:none;" />');
    $('.array-multi-flexi td.question-item select').each(function(i) {
      $('.new-placeholder').html($(this).attr('title'));
      $(this).attr('title', $('.new-placeholder').text())
    });
  });

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 10 months ago by tpartner.
The topic has been locked.
More
8 years 9 months ago #121941 by LSdev
Hi jelo, I am not able to reproduce this bug in LS Version 2.06+ Build 150612. Can you please share a screenshot showing this bug so that I also be aware of it and use tpartner work around when I face it.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago #121949 by DenisChenu
Yes, it's fixed in last version.

bugs.limesurvey.org/view.php?id=9660

It's fixed before (but without the js), then unfixed by another dev.

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