- Posts: 11
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Change text of warning-message (mandatory questions)
- boemsel
- Topic Author
- Offline
- New Member
Less
More
1 year 9 months ago #230479
by boemsel
Change text of warning-message (mandatory questions) was created by boemsel
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 5.2.2+211115
Own server or LimeSurvey hosting: own
Survey theme/template: bootswatch
==================
Hi all,
can I somehow change the text that is shown to the user when a (soft-)mandatory question was not answered?
I do not have access to any folders/files concerning limesurvey (thus I cannot change the translation file), can the text be changed by using css or javascript?
Thanks for your help!
Your LimeSurvey version: Version 5.2.2+211115
Own server or LimeSurvey hosting: own
Survey theme/template: bootswatch
==================
Hi all,
can I somehow change the text that is shown to the user when a (soft-)mandatory question was not answered?
I do not have access to any folders/files concerning limesurvey (thus I cannot change the translation file), can the text be changed by using css or javascript?
Thanks for your help!
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12941
- Thank you received: 3979
1 year 9 months ago #230485
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Change text of warning-message (mandatory questions)
So it is not really your "own server"?
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- boemsel
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
1 year 9 months ago #230487
by boemsel
Replied by boemsel on topic Change text of warning-message (mandatory questions)
No you're right. Its the server of my university. Sorry!
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
1 year 9 months ago #230489
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change text of warning-message (mandatory questions)
The text in the modal pop-up or the red text in the question? Or both?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Please Log in to join the conversation.
- boemsel
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
1 year 9 months ago #230490
by boemsel
Replied by boemsel on topic Change text of warning-message (mandatory questions)
The text in the pop up. I only have soft-mandatory questions and it seems a bit contra-productive that it shows "please answer all questions" and then it says "continue". it would be better if it said something along "please consider to answer all questions".
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
1 year 9 months ago #230491
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change text of warning-message (mandatory questions)
I don't see "please answer all questions". I see a modal with "One or more mandatory questions have not been answered. If possible, please complete them before continuing to the next page.". Is this the one you want to modify?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Please Log in to join the conversation.
- boemsel
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
1 year 9 months ago #230492
by boemsel
Replied by boemsel on topic Change text of warning-message (mandatory questions)
Yes this is the one I want to modify. My warning-message does look different (see attachement), I do not know why.
Attachments:
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
1 year 9 months ago #230494
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change text of warning-message (mandatory questions)
Your message looks like there are hard mandatory question(s).
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
1 year 9 months ago #230495
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change text of warning-message (mandatory questions)
This script in the source of a question will modify the text of the soft-mandatory modal pop-up. You will have the modify the originalModalText variable for other languages or modals.
Sample survey attached:
Code:
<script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ // Define some text strings var originalModalText = "One or more mandatory questions have not been answered. If possible, please complete them before continuing to the next page."; var newModalText = "Answer the questions dummy!"; // Modify the modal text var modalBody = $('.modal-body p').filter(function() { return $.trim($(this).text()) == originalModalText; }); if(modalBody.length > 0) { modalBody.text(newModalText); } }); </script>
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Please Log in to join the conversation.
- boemsel
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
1 year 9 months ago #230532
by boemsel
Replied by boemsel on topic Change text of warning-message (mandatory questions)
Thank you! Seems to work perfectly!
I only have one mandatory question in the first question-group, asking for consent. all other questions are either soft- or non-mandatory. they are also on different pages, so I do not know why it shows this "mixed" warning.
I only have one mandatory question in the first question-group, asking for consent. all other questions are either soft- or non-mandatory. they are also on different pages, so I do not know why it shows this "mixed" warning.
Please Log in to join the conversation.
- tammo
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 967
- Thank you received: 220
5 months 3 days ago - 5 months 3 days ago #252550
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Change text of warning-message (mandatory questions)
This worked perfectly. But changing the text of the tip turns out to be more difficult. Probably because of the <span> for creating the small icon.
Can you (tpartner) please shine a light on that one? In combination with the modal one?
Can you (tpartner) please shine a light on that one? In combination with the modal one?
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Last edit: 5 months 3 days ago by tammo.
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
5 months 3 days ago #252559
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change text of warning-message (mandatory questions)
Tammo, can you provide a screenshot and a small .lss sample survey.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Please Log in to join the conversation.