Autofill Multiple Question

More
7 months 4 weeks ago #152542 by SurveyDennis
SurveyDennis created the topic: Autofill Multiple Question
I would like to fill the answers given from one multiple choice question into another multiple choice question.
The first multi response question is called Q1
The second is called Q1DUM

I am trying to do this as following:

{ Q1DUM = if (Q1.NAOK == "SQ001", "SQ001")}

But this is not working, any idea?

Be SurveyFriendly too
dennis [at] SurveyFriendly [dot] com

Please Log in to join the conversation.

More
7 months 4 weeks ago #152550 by holch
holch replied the topic: Autofill Multiple Question
I think there are few things wrong with your equation.

Where do you post this? In one of the answer options of the second questions, I assume?

Multiple choice questions work a little different than other questions. You need to check if Q1_SQ001 was marked Y I think.

I think this should work (not tested):
{if(Q1_SQ001 == "Y", "SQ001.shown",""}
"shown" is necessary to show the answer option, otherwise I think it will only show "Y", which is the answer to that subquestion. And you need the empty "" at the end, because you need something for the "else".

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
7 months 4 weeks ago #152557 by SurveyDennis
SurveyDennis replied the topic: Autofill Multiple Question
Many thanks for your reply!

I have tried it but it didn't worked.
However I found a solution with JS.

Question 818 is my original Q1
Question 841 is the dummy question where I autopunch the answer.

<script type="text/javascript" charset="utf-8">
$(document).ready(function() {

$('#answer417528X205X818SQ001').click(function () {
$( '#answer417528X205X841SQ001' ).prop('checked', true);
});

});
</script>

Be SurveyFriendly too
dennis [at] SurveyFriendly [dot] com

Please Log in to join the conversation.

More
7 months 3 weeks ago #152576 by holch
holch replied the topic: Autofill Multiple Question
Oh, are you trying to tick the answer in the second question, is that what you tried to do? I thought you wanted to show the text of the item in the second one.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
7 months 3 weeks ago #152621 by SurveyDennis
SurveyDennis replied the topic: Autofill Multiple Question
Yes sorry, I tried two things.
For one follow up question to only show the answers selected.
And one dummy question to also tick the selected answers.

All working! I am make sure to document these examples and share them to the community.

Be SurveyFriendly too
dennis [at] SurveyFriendly [dot] com

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!