- Posts: 65
- Thank you received: 3
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
-
Topic Author
- Offline
- Senior Member
-
Less
More
3 weeks 1 day ago #252354
by baxterdmutt
Prevent a question from printing a response in QueXML was created 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
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 13535
- Thank you received: 2473
3 weeks 1 day ago #252364
by 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 , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Prevent a question from printing a response in QueXML
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
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 65
- Thank you received: 3
3 weeks 16 hours ago #252369
by baxterdmutt
Replied by baxterdmutt on topic Prevent a question from printing a response in QueXML
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 “ “
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
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 10453
- Thank you received: 3624
2 weeks 6 days ago #252397
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 Prevent a question from printing a response in QueXML
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?
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
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 65
- Thank you received: 3
2 weeks 5 days ago #252418
by baxterdmutt
Replied by baxterdmutt on topic Prevent a question from printing a response in QueXML
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
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 12131
- Thank you received: 3736
2 weeks 5 days ago #252419
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Prevent a question from printing a response in QueXML
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.
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
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 65
- Thank you received: 3
2 weeks 5 days ago #252420
by baxterdmutt
Replied by baxterdmutt on topic Prevent a question from printing a response in QueXML
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
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
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 65
- Thank you received: 3
2 weeks 5 days ago - 2 weeks 5 days ago #252421
by baxterdmutt
Replied by baxterdmutt on topic Prevent a question from printing a response in QueXML
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');
});
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: 2 weeks 5 days ago by baxterdmutt.
Please Log in to join the conversation.
- baxterdmutt
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 65
- Thank you received: 3
2 weeks 5 days ago - 2 weeks 5 days ago #252427
by baxterdmutt
Replied by baxterdmutt on topic Prevent a question from printing a response in QueXML
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.
$('#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: 2 weeks 5 days ago by baxterdmutt.
Please Log in to join the conversation.
- baxterdmutt
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 65
- Thank you received: 3
2 weeks 5 days ago #252428
by baxterdmutt
Replied by baxterdmutt on topic Prevent a question from printing a response in QueXML
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.
You can consider this closed.
Please Log in to join the conversation.
- holch
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 11481
- Thank you received: 2660
2 weeks 3 days ago #252507
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Prevent a question from printing a response in QueXML
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".
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
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 13535
- Thank you received: 2473
2 weeks 3 days ago - 2 weeks 3 days ago #252561
by 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 , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Prevent a question from printing a response in QueXML
You don't need to learn SGQA since
{QCODE.sgqa} give it to you …
Then replace :
by
for example
{QCODE.sgqa} give it to you …
Then replace :
Code:
$("#answer{SGQ}G02Q04").trigger('keyup');
Code:
$("#answer{G02Q04.sgqa}").trigger('keyup');
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: 2 weeks 3 days ago by DenisChenu.
Please Log in to join the conversation.