Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all 17529 articles
Browse latest View live

Cannot tick the Checkbox of "Other" in multiple choice? - by: tpartner

$
0
0
Use two questions.

- Insert your own "Other" sub-question in the multiple-choice instead of using the LimeSurvey setting.
- Follow the multiple-choice with a short-text type asking to specify "Other".
- Place relevance on the short-text to only show it if "Other" is checked.

Saving GPS coordinates - by: tpervaiz

$
0
0
GPS coordinates are not even showing in survey itself by using the script provided by you

Do I need more workaround?

Saving GPS coordinates - by: tpartner

$
0
0
Assign a CSS class "hidden". But, note that the browser will likely still ask whether the respondent wants to allow location tracking.

Pipe reponse from one question to the next? - by: tpartner

Can LimeSurvey and Talend have Relationship - by: holch

$
0
0
Please do not spam this forum. First warning. Next time I'll exclude you.

Combining upload with Arrays - by: tpartner

$
0
0
Wow, this is getting pretty complex.

<script type="text/javascript" charset="utf-8">
 
	$(document).on('ready pjax:scriptcomplete',function(){
 
		// Identify the questions
		var qArrayID = {QID};
		var qArray = $('#question'+qArrayID);
		var arrayLength = $('tr.answers-list', qArray).length;
		var qUploads = qArray.nextAll('.upload-files:lt('+arrayLength+')');
		var qMultiText = qArray.nextAll('.multiple-short-txt:eq(0)');
   		var qMultiText2 = qArray.nextAll('.multiple-short-txt:eq(1)');
 
		// Add some classes
		qArray.addClass('array-with-uploads-question');
		$(qUploads).each(function(i) {
			$(this).addClass('uploads-question index-'+i).css({
				'position': 'absolute',
				'left': '-9999em'
			});
		});
 
		// Hide the multi-short-text questions
		$(qMultiText).hide();
      	$(qMultiText2).hide();
 
 
		// Re-define some table widths
		$('table.questions-list colgroup', qArray).append('<col />');
		var tableWidth = $('table.questions-list:eq(0)', qArray).width();
		var answerWidth = $('col.ls-col-odd:eq(0)', qArray).width();
		var answerWidthPercent = (answerWidth/tableWidth)*100;
		var answersLength = $('col.ls-col-odd, col.ls-col-even', qArray).length;
		var answerWidthPercent2 = (answerWidthPercent*answersLength)/(answersLength+2)
		$('table.questions-list col', qArray).removeAttr('width');
		$('table.questions-list col:not(.col-answers)', qArray).css('width', answerWidthPercent2+'%');
		$('table.questions-list col:not(.col-answers)', qArray).css('width', 'auto');
 
		// Insert the "Upload" buttons and a column for the "Weblink" inputs
		$('table.questions-list thead th.answer-text:eq(1)', qArray).after('<th class="answer-text inserted-column-label" /><th class="answer-text inserted-column-label" />');
		$('tr.answers-list', qArray).each(function(i) {
			$('.answer-item:eq(1)', this).after('<td class="answer-item text-item">\
							</td>\
							<td class="answer-item">\
								<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#upload-'+qArrayID+'-'+(i+1)+'" data-backdrop="static" data-keyboard="false">Upload</button>\
							</td>');
		});
 
		// Load the column labels
		$('.inserted-column-label:eq(0)', qArray).text($('.ls-label-question', qMultiText).text());
		$('.text-item:nth-child(4)', qArray).prepend('<label class="ls-label-xs-visibility">'+$('.ls-label-question', qMultiText).text()+'</label>');
		$('.inserted-column-label:eq(1)', qArray).text('Upload');
 
		// Loop through the first multi-short-text sub-questions
		$('li.answer-item', qMultiText).each(function(i) {
			// Move the text inputs into the array
			$('input[type="text"]', this).appendTo($('tr.answers-list:eq('+i+') .text-item', qArray));
		});
 
		// Loop through the second multi-short-text sub-questions
		$('li.answer-item', qMultiText2).each(function(i) {
			// Move the text inputs into the array (leaving the radios in that column in place)
			$('input[type="text"]', this).appendTo($('tr.answers-list:eq('+i+') .radio-item:nth-child(7)', qArray));
		});
 
		// Hide the radios in the "other" column
		$('tr.answers-list .answer-item:nth-child(7)', qArray).removeClass('radio-item').addClass('text-item other-item');
		$('tr.answers-list .answer-item:nth-child(7) input[type="radio"]', qArray).css({
			'position': 'absolute',
			'left': '-9999em'
		});
 
		// Loop through the upload questions
		$(qUploads).each(function(i) {
			// Create a modal
			$('body').append('<div class="modal upload-modal" id="upload-'+qArrayID+'-'+(i+1)+'" tabindex="-1" role="dialog">\
								<div class="modal-dialog" role="document">\
									<div class="modal-content">\
										<div class="modal-header">\
											<h5 class="modal-title">'+$('.ls-label-question', this).html()+'</h5>\
										</div>\
										<div class="modal-body">\
										</div>\
										<div class="modal-footer">\
											<button type="button" class="btn btn-primary" data-dismiss="modal">Okay</button>\
										</div>\
									</div>\
								</div>\
							</div>');
 
			// Move this question into the modal
			$('#upload-'+qArrayID+'-'+(i+1)+' .modal-body').append($(this));
			$(this).css({
				'position': 'relative',
				'left': 'auto'
			});
		});
 
		// Listeners on the "Other" text inputs
		$('.other-item input[type="text"]', qArray).on('keyup change', function(e) {
			var thisRadio = $(this).closest('.answer-item').find('input[type="radio"]');
			var radioValue = '';
			if($.trim($(this).val()) != '') {
				$(thisRadio).trigger('click');
				radioValue = $(thisRadio).val();
			}
			else {
				$(thisRadio).prop('checked', false);
			}
			checkconditions(radioValue, $(thisRadio).attr('name'), $(thisRadio).attr('type'));
		});
 
		// Listeners on the "Do not know" radios
		$('.answer-item:nth-child(8) input[type="radio"]', qArray).on('click', function(e) {
			var thisRow = $(this).closest('.answers-list');
			// Clear the text inputs in this row
			$('input[type="text"]', thisRow).val('');
		});
 
		// Interrupt the Next/Submit function (to put upload questions back in the form)
		$('#ls-button-submit').on('click', function(e) {		
			$('.upload-modal').each(function(i) {
				$('.upload-files', this).css({
					'position': 'absolute',
					'left': '-9999em'
				});
				$('.group-container').append($('.upload-files', this));
			});
		});	
	});
</script>

Sample survey attached:

File Attachment:

File Name: limesurvey_survey_4452792.lss
File Size: 53 KB

Retain previous answers on update? - by: brettd

$
0
0
Are there any existing solutions to retain a previous answer on user update of the answer? For example, after the question has been submitted and the user used the Back button.

Or a possible approach?

I realize the existing database won't be able to store this or the UI display prior answers.

I'm just looking for a way to see IF answers were revised after subsequent questions, and what the changes are. I don't know IF there will even be any changes. So I'll be quite happy to look at what I expect would be few records in phpMyadmin ;-)

If nothing exists I think adding a MySQL TRIGGER would suffice. Does this make sense?

Individualized URL for 1 time use with script activation upon submission - by: bulgin

$
0
0
Hello. I've used Lime Survey minimally in the past and was very impressed. I'm wondering if Lime Survey can do the following.

We need to send individualized URL's or have some feature whereby a user - and only that user - can access the survey.

Upon completion, the URL will no longer work so they can't re-access the form or pass it on to someone else. As well, upon survey completion, receive a personalized message.

Or, in the alternate, we would like to send the participant a unique code that they use to access the survey and upon completion that code will no longer be usable, as well as in the former case, send a personalized message to the participant.

Thank you.

Individualized URL for 1 time use with script activation upon submission - by: Joffm

$
0
0
Hi,
this all is the default behaviour of a token based survey in Limesurvey.

Joffm

Retain previous answers on update? - by: jelo

$
0
0
I cannot rember a discussion or workaround capturing revision of answers during filling out a survey.

Using trigger to track changes is a approach (e.g github.com/jasny/mysql-revisioning ). But LimeSurvey creates a new table when a survey is activated. That makes it more difficult.

Card Sort Question - by: PaulBroon

Combining upload with Arrays - by: krosser

$
0
0

tpartner wrote: To move the columns, change this:

		$('table.questions-list thead tr', qArray).append('<th class="answer-text inserted-column-label" /><td />');
		$('tr.answers-list', qArray).each(function(i) {
			$(this).append('<td class="answer-item text-item">\
							</td>\
							<td class="answer-item">\
								<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#upload-'+qArrayID+'-'+(i+1)+'" data-backdrop="static" data-keyboard="false">Upload</button>\
							</td>');
		});

To this:

		$('table.questions-list thead th.answer-text:eq(0)', qArray).after('<th class="answer-text inserted-column-label" /><td />');
		$('tr.answers-list', qArray).each(function(i) {
			$('.answer-item:eq(0)', this).after('<td class="answer-item text-item">\
							</td>\
							<td class="answer-item">\
								<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#upload-'+qArrayID+'-'+(i+1)+'" data-backdrop="static" data-keyboard="false">Upload</button>\
							</td>');
		});



Sample survey attached:

File Attachment:

File Name: limesurvey_survey_552637.lss
File Size: 35 KB


I'm trying to adjust this version as well by adding the upload label and listeners on "Do not know".
The listeners worked nicely. Just needed to change the number to 6 here
// Listeners on the "Do not know" radios
		$('.answer-item:nth-child(6) input[type="radio"]', qArray).on('click', function(e) {
			var thisRow = $(this).closest('.answers-list');
			// Clear the text inputs in this row
			$('input[type="text"]', thisRow).val('');
		});

But the Upload label doesn't show up when I add the line (and/or adjust the eq(1) number)
$('.inserted-column-label:eq(1)', qArray).text('Upload');
I've looked through other lines of the code and can't see anything related.
What am I missing here?

File Attachment:

File Name: limesurvey_survey_262328.lss
File Size: 28 KB

Individualized URL for 1 time use with script activation upon submission - by: tpartner

Pipe reponse from one question to the next? - by: sewalsh

$
0
0
Cheers tpartner for all your advice.

Count number of items a is response editted - by: blocka

$
0
0
I'd like a way to track how many times a response has been editted by a participant.

I thought this would work, where I have an Equation type question, and the equation would be:

{Count = Count +1}

But after my first submission, the value saved was 12 (funky math there!).

Can you suggest an approach to let me track number of edits?

Retain previous answers on update? - by: brettd

$
0
0
Wonderful - thanks for the excellent link, and reminder about the new table being created. I was aware of that because I've restored an old table many times, but wasn't thinking about it in this context.

cheers,

Brett

Need take photo only in upload file - by: holch

$
0
0
Why not using the offlinesurveys app on your tablet? It has a specific question type for taking photos.

Ignore this. Just saw that you are talking about an iPad. Offlinesurveys seems to be available for Android only.

Count number of items a is response editted - by: jelo

$
0
0
Depending on the position of the equation question and the structure of the survey the value can be anything ;-) I don't see a solution inside LimeSurvey.
It would be great, if token attributes or a global variable storage could be modified via EM userwise. I don't see this at the moment.

Is LimeSurvey for me? - by: omniscitoad

$
0
0
Hello!

I am investigating different survey tool options for a non-profit project that I am working on. The project is a tracker that users fill out. Users are given a "score" calculated from certain metrics in the tracker. Users can update their scores by filling out the survey again. The agregate data is then being graphed and used to show trends in a given region. All of this is pretty standard, think, but the difficulty I'm running into is in the details

- *users need to be able to take the survey multiple times, but the old entries should remain so we can look at their change over time
- *a new survey should pre-fill with the last survey's data so that people can just go in and make minor tweaks (the survey is quite long)
- user score should be listed in the landing page for that user so they can always see it when they log in.
- user should be able to share their score on social media (primarily Facebook)
- * need advanced survey tools like conditionals, skipping, form validation, etc.
-[edit:added] in-survey calculation would be nice too, although not a deal-breaker as long as I can pull data afterwards to calculate and display to the user (for their score)

The ability to track user's surveys over time, and have previous results carry forward the next time the user takes the survey are the big two.

I'm currently using Drupal Webform, and I know there is a Drupal integration module for Limesurvey, so I'm guessing dealing with displaying the scores might be able to be done through that integration (not sure how deep it goes, and how much calculation I can do on specific data points within Drupal and Views). Webform is actually working pretty well for a lot of the project, but I've been running into some roadblocks (esp. where form validation, conditionals, and skipping are concerned, aggregating only latest results per users, and performing calculations on the data)

So I guess my question is if Limesurvey can help me tackle some of the areas that have been limited by using Drupal Webform (advanced conditionals, skipping, robust reports, etc.), while still keeping the flexibility that I currently enjoy (tracking progress over time, pre-filling surveys, and displaying current score on a landing page)

[edit: project details]
Thought I would just add a little info about what we are actually doing to put it in perspective. We are tracking biodiversity through native plant and wildlife gardens. The tracker lets users update us on their progress towards a "greener" garden over time, which helps us monitor the effectiveness of programs targeting gardeners in different regions. The survey helps users by giving them a goal to work towards (high scores) and an idea of how to get there through the questions asked (ex. I know my score will go up if I enlarge the area of my wildlife garden). There are of coarse other resources available as well, but the tracker/survey is the center piece.

Is LimeSurvey for me? - by: jelo

$
0
0
What Drupal version is used? Webform seems to be more suitable than LimeSurvey for your purpose.
www.drupal.org/node/2837024
What things are not working/missing when it comes to form validation or skip logic?
Viewing all 17529 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>