- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Help in design printanswers
- djarnold
- Topic Author
- Offline
- New Member
Less
More
7 years 5 months ago - 7 years 5 months ago #144401
by djarnold
Help in design printanswers was created by djarnold
Hello!
I'm generating my own printanswers code but I need to hide the div of multiple choice on the options that aren't selected
here is the code I use to do this
is there any way to hide the empty row?
I'm generating my own printanswers code but I need to hide the div of multiple choice on the options that aren't selected
here is the code I use to do this
Code:
<div class="pGroup"> <h3>II. Group Title</h3> <div class="pPreg"> <div class="pRow"> <div class="pName">Select Option</div> </div> <div class="pRow"> <div class="pAns">{if(p3_SQ001 == "Y", p3_SQ001.shown, "")}</div> </div> <div class="pRow"> <div class="pAns">{if(p3_SQ002 == "Y", p3_SQ002.shown, "")}</div> </div> <div class="pRow"> <div class="pAns">{if(p3_SQ003 == "Y", p3_SQ003.shown, "")}</div> </div> <div class="pRow"> <div class="pAns">{if(p3_SQ004 == "Y", p3_SQ004.shown, "")}></div> </div> </div>
is there any way to hide the empty row?
Last edit: 7 years 5 months ago by djarnold.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
7 years 5 months ago #144404
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 Help in design printanswers
Hi,
manual.limesurvey.org/Expression_Manager#XSS_security
If you are super admin, you can use
manual.limesurvey.org/Expression_Manager#XSS_security
If you are super admin, you can use
Code:
{if(p3_SQ004 == "Y",'<div class="pRow"><div class="pAns">'+p3_SQ004.shown+'</div></div>', "")}
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.
The topic has been locked.
- djarnold
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
7 years 5 months ago - 7 years 5 months ago #144412
by djarnold
Replied by djarnold on topic Help in design printanswers
Thak you! I will try these method
I solved myself using this method
Add an ID to every row you want to hide
and a following js script for every id
fortunately my survey is very small
I solved myself using this method
Add an ID to every row you want to hide
Code:
<div id="r1" class="pRow">
Code:
<script type="text/javascript"> if("{p3_SQ001}" != "Y") { document.getElementById('r1').style.display = 'none'; } </script>
fortunately my survey is very small
Last edit: 7 years 5 months ago by djarnold.
The topic has been locked.