Welcome to the LimeSurvey Community Forum

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

Prevent a question from printing a response in QueXML

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 months 1 week ago #252354 by baxterdmutt
Is it possible to show a question and response in the survey, but prevent it from printing the responsat the end of the survey in QueXML PDF ?

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago #252364 by DenisChenu
No

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.

Please Log in to join the conversation.

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 months 1 week ago #252369 by baxterdmutt
Thank you Denis!
This is probable also a “no” but can an answer be changed by javascript, later in another answer. 
Like this:
Q1 = “an answer”
Q3 change Q1 to be “ “ 
 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 6 days ago #252397 by tpartner
You cannot set a question from a previous page with JavaScript, it can only manipulate elements that exist in the current page.

What is the use-case?

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.

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 months 6 days ago #252418 by baxterdmutt
It’s on the same page. Here is what I want to do. I am using signature pad and it saves the signature as datauri. On the reports that prints the datauri text. So what I’ve done is saved the datauri to a png file and call it up to display in a future question. I want to simply clear the signature pad field right after I’ve saved the datauri to a png file. I’ve looked at how to clear the signature pad but I can’t figure out the JavaScript to do that. It’s on the same page. All I want is to clear that answer and lock the field. There are quite a few examples but some use INTERANS and the question code, others I’ve tried just don’t work and I’m pretty sure it’s because I’m not understanding the question answer codes.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 6 days ago #252419 by Joffm
Why don't you show these "quite a few examples" and the others you tried?

You seem to be the only one who uses this question theme at the moment.

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 months 6 days ago #252420 by baxterdmutt
Ok Well even if I'm the only one. I'd still like to know how to do this. I tried these examples:
forums.limesurvey.org/forum/can-i-do-thi...a-javascript?start=0
and there are some thoughts here:
manual.limesurvey.org/Workarounds:_Manip...ime_using_Javascript

Please Log in to join the conversation.

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 months 6 days ago - 5 months 6 days ago #252421 by baxterdmutt
But regardless, how do I change a question using Javascript. I don't understand how the question codes work because it's different in different places.
I have tried this just to test changing the text of a short text answer. I  have tried it to change the question directly above. So I'm on G02Q05 trying to change G02Q04 on the same page:
$(document).ready(function(){
  $("#text").keyup(function() {
    var whatiwant = document.getElementById("text");
    document.getElementById("#answer{SGQ}G02Q04").value = whatiwant.value;
  });
  $("#answer{SGQ}G02Q04").trigger('keyup');
});
Last edit: 5 months 6 days ago by baxterdmutt.

Please Log in to join the conversation.

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 months 6 days ago - 5 months 6 days ago #252427 by baxterdmutt
Sorry for the back to back stuff. So I've realized that if I use:
$('#answer{SGQ}').val(' ');
I get the SGQ of the answer the script is in "answer347941X69X1406".
But if I use
$('#answer{SGQ}G02Q01').val(' '); (as I've seen suggested elsewhere I don't get the proper code. instead I get the code that I'm running the script at with G02Q01 behind it. I've tried$('#answer{G01Q02}') but that gives me something strange.
So even if you don't think I should use this theme, it would sure be nice to understand how these SQA codes work. There is a wiki page here:
manual.limesurvey.org/SGQA_identifier#Id...gle_Choice_Questions and it mentions accessing previous questions, but I can't find anything in there to understand how it works. I fell like people are thinking I am asking for an answer without doing research, but that is not true. I've spent hours following wiki's that go in circles and end up talking more about deprecated ways of doing things, that explaining the way that should work now. This should be such a simple question and it shouldn't matter if I'm the only one using this theme, because the problem isn't about the theme at all. The them works fine.
Last edit: 5 months 6 days ago by baxterdmutt.

Please Log in to join the conversation.

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 months 6 days ago #252428 by baxterdmutt
Nevermind. I finally found this after searching a bunch. manual.limesurvey.org/SGQA_identifier . I’m still not sure where to find the SGQA number other than in the Java console.
You can consider this closed.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 4 days ago #252507 by holch
SGQA stands for "Survey/Group/Question/Answer" and you can build it yourself with the code of the survey, the question group, the question and the answer.

You didn't tell us your LS-Version, but the easiest way to find these codes is in the survey logic file or question logic file. There you'll have the code for the survey, the number for the question group, the number for the question.

How to create the SGQA code for different question types is thoroughly described in the link you posted. You need to separate the different numbers with "X".

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 3 days ago - 5 months 3 days ago #252561 by DenisChenu
You don't need to learn SGQA since

{QCODE.sgqa} give it to you …

Then replace :  
Code:
$("#answer{SGQ}G02Q04").trigger('keyup');
by
Code:
$("#answer{G02Q04.sgqa}").trigger('keyup');
​​​​​​​for example
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 months 3 days ago by DenisChenu.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose