Hide HELP by default

Plus d'informations
il y a 1 semaine 2 jours #183257 par BITCNI
COM_KUNENA_MESSAGE_CREATED_NEW
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

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 1 semaine 2 jours #183260 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Les utilisateur(s) suivant ont remercié: cdorin

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 semaine 1 jour #183279 par BITCNI
COM_KUNENA_MESSAGE_REPLIED_NEW
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)!

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 semaine 1 jour #183284 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Les utilisateur(s) suivant ont remercié: cdorin

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 jours 5 heures - il y a 6 jours 5 heures #183325 par cdorin
COM_KUNENA_MESSAGE_REPLIED_NEW
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!
Last edit: il y a 6 jours 5 heures by cdorin. Raison: small correction
Les utilisateur(s) suivant ont remercié: DenisChenu

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 jours 4 heures - il y a 6 jours 4 heures #183330 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW

cdorin écrit: …
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: il y a 6 jours 4 heures by DenisChenu. Raison: \o/ partial url encoding link

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 jours 4 heures - il y a 6 jours 3 heures #183332 par BITCNI
COM_KUNENA_MESSAGE_REPLIED_NEW
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
Last edit: il y a 6 jours 3 heures by BITCNI.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 jours 3 heures #183337 par tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
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.
Les utilisateur(s) suivant ont remercié: DenisChenu, cdorin

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 jours 1 heure #183342 par BITCNI
COM_KUNENA_MESSAGE_REPLIED_NEW
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!

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 jours 1 heure #183343 par DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW

BITCNI écrit: …
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!