- Posts: 10109
- Thank you received: 3593
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Multiple question types in array modifiy
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
12 years 11 months ago #60167
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 Aw: Multiple question types in array modifiy
All "inline" questions are wrapped in divisions with a class "inlineRow" so prepending all selectors for the question styles with that class will restrict those styles to the manipulated questions.
The "Question manipulation" section would then look like:
The "Question manipulation" section would then look like:
Code:
//////// Question manipulation //////// // Hide the answer element in boilerplate questions $( 'div.inlineRow div.boilerplate .answers' ).hide(); // Hide the question text elements in non-boilerplate questions $('div.inlineRow div.questionCell .questiontext').hide(); // Push the question tables to 100% $( 'div.inlineRow table' ).css({ 'width': '100%' }); // Get everything to line up nicely vertically $( 'div.inlineRow .inlineQuestion .questiontext, div.inlineRow .inlineQuestion .answers p' ).css({ 'text-align': 'center' }); // Adjust cell heights so everything lines up nicely horizontally $( 'div.inlineRow .inlineQuestion .answers, div.inlineRow .inlineQuestion .questiontext' ).css({ 'height':'35px', 'overflow':'hidden', 'padding':'0.5em' }); //$( '#inlineWrapper0 .inlineQuestion' ).css({'height':'50px'}); $( '#inlineWrapper0 .questiontext' ).css({ 'height':'50px' }); // Yes-no question styles $( 'div.inlineRow div.yes-no ul' ).css({ 'text-align': 'center', 'font-size': '90%', 'margin': '0', 'padding-bottom': '5px' }); $( 'div.inlineRow div.yes-no li' ).css({ 'padding-right': '1.5em' }); $( 'div.inlineRow div.yes-no .answers' ).css({ 'padding-bottom': '0' }); // Short-text question styles $( 'div.inlineRow div.text-short input' ).css({ 'width': '125px', 'margin-left': '0' }); // Numeric question styles $( 'div.inlineRow div.numeric input' ).css({ 'width': '125px', 'margin-left': '0' }); $( 'div.inlineRow div.numeric p.tip' ).css({ 'display': 'none' }); // Get rid of the margins around select boxes $( 'div.inlineRow p.question' ).css({'margin':'0'}); }
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Joey_T
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
12 years 11 months ago #60649
by Joey_T
Replied by Joey_T on topic Aw: Multiple question types in array modifiy
Thanks guys, everything works just fine right now.
If you want, i can post an image of the code and outcome of this particular question type so others could easily take the code and only have to change the question id's.
greez
If you want, i can post an image of the code and outcome of this particular question type so others could easily take the code and only have to change the question id's.
greez
The topic has been locked.
- Eddie_V
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
12 years 6 months ago #67790
by Eddie_V
Replied by Eddie_V on topic Aw: Multiple question types in array modifiy
shameless bump.
Should this still work in the latest LimeSurvey (1.91+) cause I cannot get it to work here
Should this still work in the latest LimeSurvey (1.91+) cause I cannot get it to work here
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
12 years 6 months ago #67791
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic Aw: Multiple question types in array modifiy
Yes, theoretically it should work. Problem might be if you use a different or modified template.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- Eddie_V
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
12 years 6 months ago #67796
by Eddie_V
Replied by Eddie_V on topic Aw: Multiple question types in array modifiy
I tried it for my test with several of the default templates that come with LimeSurvey, all failed
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
12 years 6 months ago #67803
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic Aw: Multiple question types in array modifiy
I think all those workarounds are based in the "default" template and it "should" work at 1.91. Maybe user tpartner can help you out if you post a link to a sample survey.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
12 years 6 months ago #67804
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 Aw: Multiple question types in array modifiy
The workaround will work in 1.91 and is designed for the default template. The most common mistake is incorrect question ID's.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Eddie_V
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
12 years 6 months ago #67805
by Eddie_V
Replied by Eddie_V on topic Aw: Multiple question types in array modifiy
I cannot post a link unfortunatly, its on our intranet. I used the default template with the code that is present on the wiki.
If tpartner says it should work I will believe him tho and find the problem myself but I would like him to test it aswell if he hasn't already done that.
If tpartner says it should work I will believe him tho and find the problem myself but I would like him to test it aswell if he hasn't already done that.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
12 years 6 months ago #67808
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 Multiple question types in array modifiy
Eddie, please post your script.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Eddie_V
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
12 years 6 months ago #67809
by Eddie_V
Replied by Eddie_V on topic Multiple question types in array modifiy
it is the exact same script as posted in the workarround section.
Only I changed this: sideBySide(4, 5) to my own rows/collums.
I cannot find anything else in the script I should edit
Only I changed this: sideBySide(4, 5) to my own rows/collums.
I cannot find anything else in the script I should edit
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
12 years 6 months ago #67811
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 Multiple question types in array modifiy
I'm afraid I can't help without seeing the survey. Can you attach a sample survey with your code?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Eddie_V
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
12 years 6 months ago #67922
by Eddie_V
Replied by Eddie_V on topic Multiple question types in array modifiy
if you say that the code on the wiki is correct I will take your word for it. I will try myself to get it working some more, if I cannot get it to work I will take up your offer and supply you with a sample.
thnx in advance
thnx in advance
The topic has been locked.