Welcome to the LimeSurvey Community Forum

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

Dual array "no answer" exclusive response without "no answer" for all questions

  • keithgoldstein
  • keithgoldstein's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202343 by keithgoldstein
I would like to change the "no answer" text. It does not sound right translated in certain languages. I understand all of the steps for changing the traslation in the po editor and how this would be done if Lime was self-installed. However, I don't find any option to do this operation in the hosted limeservice, other than a very time consuming process of creating three distinct answer scales in an array, and then make the 3rd answer exclusive. Can someone offer a simple solution for this very simple and essential fix? There are numerous additional translation fixes needed, but they are not always universal. It would be great if I could create a distinct translation for each survey. We translate based on gender for example. Thanks in advance.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202344 by Joffm

other than a very time consuming process of creating three distinct answer scales in an array, and then make the 3rd answer exclusive

????

I am confused.
In an array, answer options are always exclusive.

And "no answer" is an answer option like any other. You are free to translate as you like.
And "based on gender"? ypu may use EM "micro-tayloring".

Or do you use the built-in "no answer" option in on mandatory questions?
You shouldn't display this but use your own code and wording.

Joffm





Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • keithgoldstein
  • keithgoldstein's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago - 3 years 9 months ago #202345 by keithgoldstein
My question refers to the built in "no answer". I realize that I need to change the translation file to change this text. However, it seems that with the Limesurvey Professional hosting this is not possible. I have changed the translation file before with self-hosted installations. I also do not want to change the translation for all of the surveys, only certain ones. There is another work around for this. See the attached dual array for example. The no answer option has a dotted line. If I could just add text to the yellow highlighted area in the table, then I could at least clarify the text that should be written below rather than the vague "no answer" automatic translation. Does that make sense now? I realize that with regular multiple choice, I could just add a custom additional answer choice. The other solution is that I create 3-answer array, and then make a multiple single answer for the 3rd answer scale, but that is quite a complicated work around and will not exclude the other answers. The last part of excluding the other answers seems a bit tricky. There should be a very simple solution for this with the question theme editor. Simple solutions are greatly appreciated.

Regarding gender, I also indeed do utilize EM to branch the questions. One problem with that method is that it creates 2 distinct columns of data that then need to be merged into the same column. Piping in text solves that problem, but it gets confusing. Developing a unique translation file for each survey would solve a lot of problems. In some languages we also formality issues, where a different level of language needs to be used depending on who is being addressed. In the meantime, it would be great to get some advice on a simple fix to the question theme of the dual array below as an example. If someone has a better solution that solves this issue more globally though, that's also great.

Last edit: 3 years 9 months ago by keithgoldstein. Reason: fixing the image
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202346 by Joffm
So you should not ask about an "array"

of creating three distinct answer scales in an array

if you use an "array dual scale"

But that's easy.
Split the question into two arrays.
Either you insert the "no answer" option into both or only in the first and display the second array using subquestion relevance.

And the very last option because your installation is hosted at LimeSurvey GmbH.
Host it yourself; no problem to translate.


And this

Regarding gender, I also indeed do utilize EM to branch the questions. One problem with that method is that it creates 2 distinct columns of data

Why?
If your answer text is "{if(gender==1,"answer for males",if(gender==2,"answer for females","answer for others"))}
you get only one column.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • keithgoldstein
  • keithgoldstein's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago - 3 years 9 months ago #202348 by keithgoldstein
I do appreciate the attempt at assistance. You are right, I should have been specific to a dual array, but this issue affects other question types as well. The solution you provided, especially the use of a relevance category (unless I do something complex) does not solve my problem in a way that seems presentable. It seems to me that you are saying that I need to set up three separate questions and list all of the subquestions three times? That would be very redundant. I would create a first question of whether it is relevant, and then if the question is relevant then include the following questions as relevant. I would then have 3 lists rather than 1. With 10 subquestions, what was one nice table turns into three awkward arrays. Perhaps I misunderstand your implication of using the relevance category. This should be a very simple operation. We are just trying to add text above the built in "no answer" fields, because the Limeservice seems to have issues with custom translation capabilities. This is an issue with other question types as well. My institution insists that we must have the installation on the external server, so I am stuck asking for a technical solution to this that involves external hosting. I get your point about using EM to recode the gender languages. Can someone provide a simple solution to creating a dual array table as I have shown in the image that either changes the "no answer" text or allows me to type in text in the yellow area? I am playing around with the question theme editor, and I hope to figure out a fix on my own, but this should not be so complicated.


And the issue with gender is that also the questions, tips, everything needs to be translated to female and male, so it becomes easier to just set up duplicates of question groups and make them relevant based on the gender question. My solution works, but again I get two columns for every question, which I can also work around. For now my question is simply how can I create a dual array table as I showed in the picture that either adds text to the section in yellow or changes the text in the dashed border?
Last edit: 3 years 9 months ago by keithgoldstein.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago - 3 years 9 months ago #202350 by tpartner

Can someone provide a simple solution to creating a dual array table as I have shown in the image that either changes the "no answer" text or allows me to type in text in the yellow area?


You should be able to insert the text via JavaScript.

Something like this in the question source for the cell indicated with yellow (untested as I am responding via phone).

Code:
<script type="text/javascript" charset="utf-8">
    $(document).on('ready', function(){
 
        var text1 = "My inserted text";    
 
        $('#question{QID} table.subquestions-list thead:first tr:first > *:last-child').text(text1);
    });
</script>

Something like this in the question source for the cell indicated with a dotted border.

Code:
<script type="text/javascript" charset="utf-8">
    $(document).on('ready', function(){
 
        var text1 = "My inserted text";    
 
        $('#question{QID} table.subquestions-list thead:first tr:last > *:last-child').text(text1);
    });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 9 months ago by tpartner.
The topic has been locked.
  • keithgoldstein
  • keithgoldstein's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202356 by keithgoldstein
Thank you for the proposed solutions. I think we are getting close, but the proposed solutions do not yet work. I am working in RTL, so the outline and highlighted text are the "no answer" option column. This would be the far right column in English, LTR. Javascript is enabled and other source manipulations do work. I think the issue is that last-child is not the correct reference to the no answer column, but I am not sure.

The following forum post comes close to accomplishing the solution in a normal array, but not in the dual array, and it does not add text above the "no answer" option, but rather above the question column and not the no answer column, as a row is missing. I am trying to add text to clarify that text that states "no answer":
forums.limesurvey.org/forum/can-i-do-thi...in-array-subquestion

I paste two pictures, a copy of the picture with the above manipulation in RTL, but showing where I want the explanatory text to be. The second picture shows my earlier example, as if this was LTF.
The topic has been locked.
  • keithgoldstein
  • keithgoldstein's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago - 3 years 9 months ago #202362 by keithgoldstein
I have worked on the issue for a while. I am still unsuccessful, but I believe I have complicated things. I apologize for any lack of clarity. I really think there is a very simple solution and @Joffm was on the right track when he recommended to display the second array using subquestion relevance. The following picture identifies better the issue. In the past when I had control over the translation, I would just change the translation for the "no answer" option. However, I do not have that capability with the current account. So, I think the easiest solution would be to create the following question with the second array including the category did not participate/attend option and making that option mutually exclusive. I located articles about creating a third scale, but that seems unnecessary. Excuse the rtl, but that should not make a difference. Your assistance is greatly appreciated.

Last edit: 3 years 9 months ago by keithgoldstein. Reason: fixing the image
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202363 by tpartner

I am working in RTL, so the outline and highlighted text are the "no answer" option column. This would be the far right column in English, LTR. Javascript is enabled and other source manipulations do work. I think the issue is that last-child is not the correct reference to the no answer column, but I am not sure.

Can you attach a small sample survey (.lss file) containing only the relevant question?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • keithgoldstein
  • keithgoldstein's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202364 by keithgoldstein
Thank you so much for looking into this. I realize there should be a simpler solution, and I have been used to setting the question up with a "no answer" from the system an then changing the translation .po. Attached is the lss file that includes did not participate within the second array. I include two examples for both languages, although they will both display as RTL. You can flip them though, and it shouldn't make a difference.

File Attachment:

File Name: limesurvey...7515.lss
File Size:36 KB
The topic has been locked.
  • keithgoldstein
  • keithgoldstein's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202368 by keithgoldstein
I have since tried to use workarounds to create 3 separate arrays and make the third array for not attending, not relevant exclusive. The solutions that I find either are no longer working or I am not doing something right.

This is complex work for something that seems quite basic. I am really hoping that someone has a very simple solution.


This solution no longer works in Limesurvey 3: manual.limesurvey.org/Workarounds:_Quest...stion_types_in_array

This solution seems to indicate an outdated solution, as it would require massive rewriting of the template:
forums.limesurvey.org/forum/can-i-do-thi...e-triple-scale-array


This solution is basically the same, but again it is working with only dropdown, and it is not really replicating the function like the no answer button:
forums.limesurvey.org/forum/can-i-do-thi...more-than-two-scales

This solution seems to be the concise resolution to the above, but I have not figured out how to convert it to radio buttons, and even if I do it does not entirely solve the issue.

forums.limesurvey.org/forum/can-i-do-thi...lti-array-dual-scale


This post indirectly seems to show how I could make the replacement for "no answer" an exclusive answer checkbox that will remove the answers from tthe other arrays: forums.limesurvey.org/forum/can-i-do-thi...heckbox-style#138890

This post shows directly how to make a checkbox answer exclusive in a single array.
forums.limesurvey.org/forum/can-i-do-thi...eckbox-type-question


Combining the above workarounds with the following suggestions, might do the trick?
forums.limesurvey.org/forum/can-i-do-thi...dual-scale-questions
forums.limesurvey.org/forum/design-issue...-dual-scale?start=15
forums.limesurvey.org/forum/can-i-do-thi...ray-question-problem

All of these confusing solutions though seem to be going way overboard for what should be a simple solution. It seems that I should be able to add a header above the "no answer". This way I could just clarify that did not participate above "no answer", and the problem is solved. dualscale_headerC (no answer).
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago - 3 years 9 months ago #202388 by tpartner
Here is a small script that will insert custom text into both the cell above the "No Answer" label and into that label. Comment out the parts you don't need.

(tested in version 3.22.19)

Code:
<script type="text/javascript" charset="utf-8">
    $(document).on('ready', function(){
 
    var text1 = "My inserted text 1";    
    var text2 = "My inserted text 2";  
 
    if($('#question{QID} table.subquestion-list th.header_no_answer').length > 0) {
 
      // Cell above "No Answer" label
      $('#question{QID} table.subquestion-list th.header_no_answer').text(text1);
 
      // "No Answer" label at top of table
      $('#question{QID} table.subquestion-list th.noanswer-text').text(text2);
 
      // "No Answer" label in block view (smaller devices)
      $('#question{QID} table.subquestion-list td.noanswer-item label').text(text2);
    }  
    });
</script>





Sample survey attached:

File Attachment:

File Name: limesurvey...5(1).lss
File Size:34 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 9 months ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose