Welcome to the LimeSurvey Community Forum

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

Hidden comments on questions (todos, etc.) that do not show up in page source

  • socius
  • socius's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 3 months ago #162828 by socius
Dear all,

I'd like to take some hidden notes on questions, like todos, ideas, references and put these directly into the question text. These notes should not appear when the respondents take the survey (ok, thats easy by defining a css class for hidden comments), but they also should not appear in the source code since they might contain confidential information. I think that these "completely" hidden comments would be really useful for working with LS (I use 2.6.4 LTS), especially for working in teams.

Is there a way to create comments that are hidden in the page source? Maybe by putting it into something the server has to deliver via <php>?

I naively tried by
Code:
<?php 
/* This is some comment */
?>

but sure there is nothing the server has to process - so this comment is invisible in the html output, but shows up as-is in the page source.



Is there a way to achive such completely hidden comments, only visible in the question source in the LS admin interface? This would be really helpful.Thanks for your time!

Best
G
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 3 months ago #162831 by LouisGac
HTML comments should work:

<!-- My comment -->
The topic has been locked.
  • socius
  • socius's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 3 months ago #162834 by socius
Thanks @LouisGac for your response.

The problem with comments like <!-- My comment --> is, that they show up in the page source, i.e. they are delivered to the respondents with the questions. I'd like to write confidential comments on questions, like todos or other notes, that the respondents neither see on the page and the page source. Would be really helpful to have everything in one place.

Thanks and best, G
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 3 months ago #162837 by tpartner
Use Expression Manager to hide the comments:

Code:
{if(1 == 2, 'My comment goes here...', '')}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: socius, LouisGac
The topic has been locked.
More
6 years 3 months ago #162843 by jelo
The following user(s) said Thank You: holch, socius, LouisGac
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 3 months ago #162845 by LouisGac
yes, it's on our TODO list.
For info: it will consist in using twig instead of LS Fields in question text.

Then it will be possible to do something like:
{# My comment here #}

And to add some "review" inputs in addition to the text ones.
The topic has been locked.
  • socius
  • socius's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 3 months ago #162867 by socius
Thanks @tpartner! That's perfect - once again!

Also looking forward to the built in solution! @LouisGac

Thanks!
Best, G
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose