Hide HELP by default

Mehr
2 Monate 6 Tage her #183257 von BITCNI
Hide HELP by default wurde erstellt von BITCNI
We use the 'Help' feature in each question extensively, as the Survey we're carrying out relates to Environmental Best Practice, so we need to ensure there is sufficient guidance.
However, this is always visible by default, and it makes the Survey very long on the screen, and it will not be required by every participant.
Can we change the behavior so that a user can hover over a Question mark or can click to expand the Help section to see the Guidance instead of it always being on the screen by default?

Many thanks

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
2 Monate 6 Tage her #183260 von DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Folgende Benutzer bedankten sich: cdorin

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Monate 6 Tage her #183279 von BITCNI
BITCNI antwortete auf Hide HELP by default
Thanks for your reply.
When I go into theme options, all I see is "inherit" in every box.
Which one contains the Survey Question Help code you put on GitHub?
Do you have to go into the code of every question to add this, eg,
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
Collapsible Group Item #3
</a>
And where does the JavaScript code go?
<button type="button" id="myStateButton" data-complete-text="finished!" class="btn btn-primary" autocomplete="off">
...
</button>

<script>
$('#myStateButton').on('click', function () {
$(this).button('complete') // button text will be "finished!"
})
</script>
Sorry, but I'm a bit out of my depth here (as I'm sure you can tell)!

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Monate 6 Tage her #183284 von DenisChenu
Not option : editor manual.limesurvey.org/Theme_editor

In Question part : you can hack survey_question_help.twig

But : i don't hack it for you , it can be done, but need done experimentation and (maybe) knowledge

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Folgende Benutzer bedankten sich: cdorin

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Monate 4 Tage her - 2 Monate 4 Tage her #183325 von cdorin
cdorin antwortete auf Hide HELP by default
Not sure if you have done it already. So, a really simple/basic solution is this:


<div class="{{ aSurveyInfo.class.helpcontainer }} text-info col-xs-12 " {{ aSurveyInfo.attr.helpcontainer }}>
{% if aQuestion.help.show %}
<div class="{{ aSurveyInfo.class.lsquestionhelp }}">
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
Help
</button>
<div class="collapse" id="collapseExample">
<div class="well">
{{ aQuestion.help.text | raw }}
</div>
</div>
</div>
{% else %}
{{ aQuestion.help.text | raw }}
{% endif %}
</div>


Please note that I haven't spent time customizing it. I just followed the links provided by Denis :).

To access the area Denis is talking about: Themes -> extend Fruity -> Access the new extended theme (click on Theme editor) -> Screen -> Question -> Survey_question_help.twig -> save the old text/comment it out and add the one from above.

Hope it helps!
Letzte Änderung: 2 Monate 4 Tage her von cdorin. Begründung: small correction
Folgende Benutzer bedankten sich: DenisChenu

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Monate 4 Tage her - 2 Monate 4 Tage her #183330 von DenisChenu

cdorin schrieb: …
Please note that I haven't spent time customizing it. I just followed the links provided by Denis :).

Great :)

Just an idea about Help translation, maybe replace the Hard Coded Help by
{{ gT("Question help") }}
in translate.limesurvey.org

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Letzte Änderung: 2 Monate 4 Tage her von DenisChenu. Begründung: \o/ partial url encoding link

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Monate 4 Tage her - 2 Monate 4 Tage her #183332 von BITCNI
BITCNI antwortete auf Hide HELP by default
Hi. Thanks for your reply.
I went into the code and replaced it with the one you specified. I now have a 'Help' button, which looks good. However, when I click any Help button, the only help that expands is the first question at the top of the page. :(
Is it because I'm in the Survey Preview, or does this have to be applied to each question somehow?
Cheers
Letzte Änderung: 2 Monate 4 Tage her von BITCNI.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Monate 3 Tage her #183337 von tpartner
Try this in survey_question_help.twig:

<div class="{{ aSurveyInfo.class.helpcontainer }} text-info col-xs-12 " {{ aSurveyInfo.attr.helpcontainer }}>
    {% if aQuestion.help.show %}
    <div class="{{ aSurveyInfo.class.lsquestionhelp }}">
        <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#help{{ aQuestion.qid }}" aria-expanded="false" aria-controls="help{{ aQuestion.qid }}">
            {{ gT("Question help") }}
        </button>
        <div class="collapse" id="help{{ aQuestion.qid }}">
            <div class="well">
    			{{ aQuestion.help.text | raw }}
    		</div>
    	</div>
    </div>
    {% else %}
    {{ aQuestion.help.text | raw }}
    {% endif %}
</div>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Folgende Benutzer bedankten sich: DenisChenu, cdorin

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Monate 3 Tage her #183342 von BITCNI
BITCNI antwortete auf Hide HELP by default
Yep: that seems to be it!
Thank you SO much :)
Hope to see this in a future version of LimeSurvey (ie, the ability to toggle Help so it's collapsed by default) :)
Thank again
You're a star!

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Monate 3 Tage her #183343 von DenisChenu

BITCNI schrieb: …
Hope to see this in a future version of LimeSurvey (ie, the ability to toggle Help so it's collapsed by default) :)

My posityion on such system that : It must not be done for all instalation and not deactivatable, and surely not in question settings …

Because limesurvey have already a lot of Question settings : simple user didn't know 20% of this settings … adding more make more hard to understand what settings are usuable.

But more :
1. Here it's Survey Theme related : it muts be a Survey theme option
2. If need different option by question : Survey theme must be allowed to extend Question seetings.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha