It's pretty easy to create a simple question in LimeSurvey, you create a new survey, create a group to store your questions in, click on "Create Question", choose the question type, type in the question text, and away you go. But what about if you want your question to be a bit more interesting? How do you insert images into it, or embed music, or videos?
It's not so hard to do this either. In the next few articles on aptigence, I'll be exploring how.
Today we're going to insert a video into our question text.
The first thing to remember when creating survey questions is that LimeSurvey presents your survey question text as HTML text in an HTML page. This means that anything you can do ni a web page can be done in your question text.
You've probably already worked that out anyway. It's very easy to make text bold, or underlined, or to use ordered or unordered lists, change text alignment and so forth - all thanks to the WYSIWYG button bar.
Many people also know about the extra features available on the full featured button bar. You can access this by clicking on the LimeFitWin button.
This enhanced button bar gives you extra options to choose a css style, change heading levels, fonts, font size, font colour and much more. There are a couple of important options available from this enhanced button bar menu that you should be aware of, and which are used in the following methods to insert images or other objects into your questions.
The first of these is the "Insert/Edit Image" button - whose purpose is self-explanatory.
The second is the "Source" button - which is a bit less self-explanatory. It's purpose is to let you edit the HTML source code. And using this button you're able to get down and dirty and really do anything you like with your question text.
Now that you know the basic tools and settings needed, here are the various procedures for adding images, sounds or videos to your question text in LimeSurvey.
2) Embedding a video into your survey question.
Embedding a video into your survey question can be handled in a number of different ways. In this instance I will be detailing how to embed a video that is stored on youtube. There are a number of advantages to using youtube to handle serving your video, not least which is bandwidth management.
To start, you need an account on youtube, and you need to upload your video to youtube. The youtube site has plenty of documentation and information to help you achieve this. Once the video is on youtube, visit the video on the youtube site.
At the youtube site, copy the html code for embedding a video on your site. This will usually look something like this.
<object width="560" height="340"> <param name="movie" value="http://www.youtube.com/v/Cqz9ZXUoUcE&hl=en&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Cqz9ZXUoUcE&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>
You will be using this HTML code in your question.
Once you have selected and copied this code, return to your LimeSurvey question page, and edit the question you want to insert the video into. Choose the 'LimeFitWin' button (

) to view the advanced edit button bar, and then select the 'Source' button (

) so you can edit the source html.
Then you can simply paste your code snippet from YouTube into the html source at the location you want. When you click the source button to return to WYSIWYG mode you'll see the area where your video will display outlined.
Return to standard view (by clicking "LimeFitWin") and save your image. Then you can preview the question and see it in action.
There are some extra things you might find useful with embedding videos. One of the most likely is to have the video automatically start playing, rather than waiting for the user to click the play button. To do this, add &autoplay=1 to the end of the URL inside the html code snippet. Here is the example used above with the extra autoplay in it. Note that you need to add it to BOTH times that the URL occurs.
<object width="560" height="340"> <param name="movie" value="http://www.youtube.com/v/Cqz9ZXUoUcE&hl=en&fs=1&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Cqz9ZXUoUcE&hl=en&fs=1&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>