<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.limesurvey.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nery</id>
	<title>LimeSurvey Manual - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.limesurvey.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nery"/>
	<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/Special:Contributions/Nery"/>
	<updated>2026-08-10T12:37:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Central_participants_database_(User_panel)_Development&amp;diff=57668</id>
		<title>Central participants database (User panel) Development</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Central_participants_database_(User_panel)_Development&amp;diff=57668"/>
		<updated>2013-10-13T15:22:50Z</updated>

		<summary type="html">&lt;p&gt;Nery: /* lime_participants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
=Database Schema=&lt;br /&gt;
&lt;br /&gt;
==Central Storage==&lt;br /&gt;
&lt;br /&gt;
===lime_participants===&lt;br /&gt;
&lt;br /&gt;
The first table is the actual central table where all the participants&amp;amp;rsquo; entries are stored. The table is as follows&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!participant_id!!first_name!!last_name!!e_mail!!blacklisted_global&lt;br /&gt;
|-&lt;br /&gt;
|4b3403665fea6||Carsten||Schmitz||carsten.schmitz@example.com||N&lt;br /&gt;
|-&lt;br /&gt;
|4b1357665fea6||Jason||Cleeland||js@example.org||N&lt;br /&gt;
|-&lt;br /&gt;
|4dc14fa0db7f4||Thilabult||Lemer||thilabault.lemer@example.net||N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!language!!owner_uid!!date_created!!date_modified!!max_surveys&lt;br /&gt;
|-&lt;br /&gt;
|en||   1||2007-11-04 01:00:01||2007-11-04 01:00:01||0&lt;br /&gt;
|-&lt;br /&gt;
|en||   2||2007-11-04 01:00:01||2007-11-04 01:00:01||2&lt;br /&gt;
|-&lt;br /&gt;
|en||   1||2007-11-04 01:00:01||2007-11-04 01:00:01||1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The fields in the table are explained below:&lt;br /&gt;
*participant_id : It is the primary key for the table and will be auto-generated.&lt;br /&gt;
*first_name : It contains the first name of the participant.&lt;br /&gt;
*last_name : It contains the last name of the participant.&lt;br /&gt;
*e_mail : It contains the email id of the participant.&lt;br /&gt;
*language : It contains the language preference of the participant.&lt;br /&gt;
*blacklisted_global : It is a field that will be updated if a participant hits a particular URL mentioned in the email sent to him. There will be two URL mentioned in the mail. One will allow the participant to blacklist himself globally from any survey from that server; the other, from a particular survey. When the user blacklists himself from the server as a whole, he will be marked against the e-mail address in the above table; when it&#039;s survey specific, he will marked with the help of email and the survey_id in the tokens table. If for a particular participant, this field is set, the administrator will not be allowed to add that user to any of the surveys. If a new survey is set, then the administrator will also not be allowed to add that particular participant. If the global setting for blacklisting is updated, then all the local tables will be updated accordingly. Once blocked, the participant will not be allowed to answer any survey. The participant will have another set of URL&#039;s in case he/she wishes to unblock himself/herself.&lt;br /&gt;
*owner_uid: It will contain the user id of the person who is adding the participant, this will be extracted based on who is logged in. In case the owner field is set to be editable, then it can be changed.&lt;br /&gt;
*date_created and date_modified are self-explanatory fields.&lt;br /&gt;
*max_surveys:The max_surveys field will contain a number that indicates the maximum number of surveys to which a participant can be locked. For example: if it contains 0, the participant can be added to any other survey: However, if it contains the value 2, the participant can only be locked to two surveys: so after adding him to two surveys, he can not be added to any third survey.&lt;br /&gt;
&lt;br /&gt;
The combination of email and owner_uid will be the composite key for this table.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Locking Feature==&lt;br /&gt;
&lt;br /&gt;
In the lock feature there is one tables,lime_survey_info.The lime_participant_info table will contain the information regarding to which survey the participant is added.&lt;br /&gt;
&lt;br /&gt;
===lime_participant_links===&lt;br /&gt;
&lt;br /&gt;
The schema of the table is&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|participant_id||survey_id||token_id||date_created&lt;br /&gt;
|-&lt;br /&gt;
|4b3403665fea6||63273||1||2011-03-08 12:32&lt;br /&gt;
|-&lt;br /&gt;
|4b1357665fea6||76581||1||2011-03-08 12:32&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This table will be used for two purposes as far as I can see for now,&lt;br /&gt;
&lt;br /&gt;
1) It will give the clear cut info as to which survey a particular participant is added to.&lt;br /&gt;
&lt;br /&gt;
2) When a user will try to share a participant, but in the settings it is set that he can&#039;t be added to more than two surveys, then a SQL COUNT query will be run for that participant and if that number is equal to the max_locks field an error message will sprung up saying, these participants can&#039;t be added to the survey.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Token Table==&lt;br /&gt;
&lt;br /&gt;
===lime_tokens_xxxxxx===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|participant_id||token||token_id||e_mail_status   ||sent||reminder_sent&lt;br /&gt;
|-&lt;br /&gt;
|4b3403665fea6||afir2ski6wrcyny||1||OK||2011-03-08 12:32||N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|reminder_count||completed||uses_left||valid_from||valid_until||blacklisted   ||att_id&lt;br /&gt;
|-&lt;br /&gt;
|0||   2011-03-08 12:32||0||23.03.2011 00:00     ||26.03.2011 00:00||   N||2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Some minor changes have been done to this table to make it work with the other Central Database System.One of then is that the user information will not be stored in this table, but in the Central Table and will be linked using the participant_id.Also, a blacklisted field is also added that will contain the survey and participant specific blacklist settings.&lt;br /&gt;
&lt;br /&gt;
The Fields in table are explained below:&lt;br /&gt;
*participant_id : This is the key for linking participants in this system.&lt;br /&gt;
*token,token_id,e_mail_status,sent,reminder_sent,reminder_count,completed,uses_left,valid_from,valid_until: Same as in the previous system.&lt;br /&gt;
*blacklisted: This is the survey specific blacklist field which will contain as to whether the participant has chosen to blacklist himself from this survey or not.&lt;br /&gt;
*att_id : This field will contain a id of the attribute that is added into the system. A combination of att_id and participant_id will extract information from lime_participant_attributes table&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Attribute Control==&lt;br /&gt;
&lt;br /&gt;
This feature will be using three tables namely :&lt;br /&gt;
&lt;br /&gt;
1) lime_participant_attributes - Store the actual attribute information&lt;br /&gt;
&lt;br /&gt;
2) lime_participant_attribute_info - Store the UI information related to the attribute&lt;br /&gt;
&lt;br /&gt;
3) lime_participant_attribute_values - Store the possible values of the attribute&lt;br /&gt;
&lt;br /&gt;
===lime_participant_attributes===&lt;br /&gt;
&lt;br /&gt;
This is the table that will hold the actual values&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|   participant_id||   attribute_id||   value||   id&lt;br /&gt;
|-&lt;br /&gt;
|4b3403665fea6||   1||   Male||   1&lt;br /&gt;
|-&lt;br /&gt;
|4b1357665fea6||   1||   Male||   2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The fields of the table are explained below&lt;br /&gt;
* participant_id : Again this is the unique id for the participants.&lt;br /&gt;
* attribute_id : Each attribute in the attribute control will have a unique id similar to participant_id and a combination of participant_id and attribute_id will tell give the value of the attribute.&lt;br /&gt;
* value : This field contain the actual value of the attribute, in case of textbox, It will contain the value contained in the text box.&lt;br /&gt;
&lt;br /&gt;
===lime_participant_attribute_info===&lt;br /&gt;
&lt;br /&gt;
This is the table that will hold the UI related information for attribute control&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|   attrbute_id||   attribute_name||   attribute_type||   visible&lt;br /&gt;
|-&lt;br /&gt;
|1||   sex||   DD||   1&lt;br /&gt;
|}&lt;br /&gt;
*attribute_id : The unique id give to each additional attribute.&lt;br /&gt;
*attribute_name : This is the label that will be shown in the UI created for additional attribute.&lt;br /&gt;
*attribute_type : This field contains the type of UI that needs to be created for this particular attribute&lt;br /&gt;
*visible : This field will tell whether that attribute is to be used for the current set of participants or not&lt;br /&gt;
&lt;br /&gt;
===lime_participant_attribute_values===&lt;br /&gt;
&lt;br /&gt;
This is the table that will hold all the possible values for the particular attribute. The scehma of this table is&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|   attribute_id||   value_id||   p_value&lt;br /&gt;
|-&lt;br /&gt;
|   1||   1||   male&lt;br /&gt;
|-&lt;br /&gt;
|   1||   2||   male&lt;br /&gt;
|-&lt;br /&gt;
|2||   1||   &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above example will make it more clear, but keep in mind that in case of a text box and date-picker, this field will be empty because any value can be entered in the system. For multi-line text input we will use a different value_id for each text box, for example address.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Relationship==&lt;br /&gt;
&lt;br /&gt;
The relationship between the tables explained above is shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:Relationsv4.png]]}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=User Interface=&lt;br /&gt;
&lt;br /&gt;
In the user interface aspect, the entire participant control that we used to have` in the token menu will now be available globally, but the token will be generated in the survey specific table only. The link for adding participants to the limesurvey installation will be on the front screen.&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_shot_1.png]]&lt;br /&gt;
&lt;br /&gt;
When clicked on the Add Participants the following screen will come up&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Add Participant==&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_shot_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Explanation of the above screenshot is given below:&lt;br /&gt;
*ID : This is the autogenerated ID for each participant.&lt;br /&gt;
*First Name, Last Name, Email, Language : These fields are self-explanatory.&lt;br /&gt;
*Blacklisted: This is the local blacklisted field I explained earlier.&lt;br /&gt;
*Locked_with_survey : This is the field that will not allow the participant to be added to any other survey. The &amp;quot;add&amp;quot; link will allow the user to add more than one survey to be locked to. It will open a modal-dialog box. The unlocking will be possible only at the survey level, i.e. the participant could only be unlocked if the user has the access to that particular survey to which the participant is locked.&lt;br /&gt;
*Owner: This will be a fixed field by default that will contain the owner&amp;amp;rsquo;s id of the owner who is adding that particular participant to the central database. However this field will only be editable if set in the user control options&lt;br /&gt;
*Max Surveys: This field will tell set the number of surveys a particular participant can be added to, for example is the user set it to 0, then the participant can be added to as many as surveys the user wants.If it it set 2 it can be added to the maximum two surveys.&lt;br /&gt;
*Sex: This is the additional attribute we set under attribute_control.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Import from CSV/LDAP==&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_shot_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
The CSV file upload feature is similar to what we used to do under tokens, however with some differences, the differences are mentioned below:&lt;br /&gt;
*The language is no longer an optional field, but under the mandatory fields.&lt;br /&gt;
*Owner is the fields have the id of the user that is currently logged in and the participants will be added under this field. This field will only be editable if the corresponding option is set in user control.&lt;br /&gt;
*Optional attributes are the survey specific fields, and will be added to the survey specified in the above field, along with the participants, this option will be enabled only if the participants are added to the survey table automatically based on the id they are adding.&lt;br /&gt;
*locked_with_survey field will have another option, besides the survey. It will be &amp;quot;free&amp;quot; that will allow the participant to be added to any survey. This will be the default value.&lt;br /&gt;
*Max Surveys: This field will tell set the number of surveys a particular participant can be added to, for example is the user set it to 0, then the participant can be added to as many as surveys the user wants.If it it set 2 it can be added to the maximum two surveys.&lt;br /&gt;
*The LDAP import will work in the same way, and with the same options, I mean the locked to survey, group_id and optional fields.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Display Participants==&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_shot_4.png]]&lt;br /&gt;
&lt;br /&gt;
Again this screen is only for editing/deleting the participant entries. It is global, and hence nothing survey specific will be found here. If the user clicks on the edit button, then the screen similar to add participant screen will show up, showing the details of the participant, which can be edited there.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Blacklist Control==&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_shot_5.png]]&lt;br /&gt;
&lt;br /&gt;
All the settings under this page will be stored under the settings_global table. Each of setting is&lt;br /&gt;
&lt;br /&gt;
explained below&lt;br /&gt;
*The first option if set, will mark participant blacklist for all the survey&#039;s that are present in the system currently.&lt;br /&gt;
*The second option will mark the participant as blacklist for any new survey that is added to the system, if the global field is set.&lt;br /&gt;
*The third option will not allow the participant to be even added to the survey if the global blacklist field is set.&lt;br /&gt;
*The fourth option will not show the blacklisted participant in the display participant.&lt;br /&gt;
*In the fifth option, if the participant blacklist himself/herself globally , he will be deleted from the database .&lt;br /&gt;
*The sixth option will decide that whether the URL to blacklist the user will be sent in the invitation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==User Control==&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_shot_6.png]]&lt;br /&gt;
&lt;br /&gt;
This is the user control, by user I mean the administrator. The three options under this field will be stored in the global table. The options are explained below.&lt;br /&gt;
*The first field if enabled or disable this feature completely.&lt;br /&gt;
*The second option if set to yes, when the user uploads a csv file or adding a new participant indivisually. *The new participant will be added to the survey of which the user is the owner.&lt;br /&gt;
*The third option will set if the owner field is editable or not.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Attribute Control==&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_shot_7.png]]&lt;br /&gt;
&lt;br /&gt;
This is a new feature I am planning to implement, in this feature I will be allowing the administrator to add a new attribute with a proper UI, rather than just a textbox. The value related to this feature will be stored in attribute_info_table. These are the UI components that I am planning to add for additional attribute&lt;br /&gt;
*Drop Down&lt;br /&gt;
*Check Box&lt;br /&gt;
*Radio&lt;br /&gt;
*jQuery DatePicker&lt;br /&gt;
*Text Box&lt;br /&gt;
&lt;br /&gt;
In case of Drop Down,Check Box, Radio the &amp;quot;Add More&amp;quot; will allow the administrator to add more possible values. More advanced UI&#039;s can be added once the basic feature is ready.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Add to survey==&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_shot_8.png]]&lt;br /&gt;
&lt;br /&gt;
The UI is explained below:&lt;br /&gt;
*The add group is basically the user id whose participants are to be added to the survey after going through three checks, locked or not, blacklisted or not,has permission or not.&lt;br /&gt;
*Lock this group to the survey will lock this particular group to the survey, and will not allow any other&lt;br /&gt;
*This field will give all the global attributes that are present with the participants and only relevant attributes are added to the survey&lt;br /&gt;
*Allow blacklisted enteries to be added to the survey, if set, otherwise will not allow the blacklist enteries to be added. The main reason for this option is that in case the participant un-blacklist himself from the server, then he/she can participate in that survey. A automatic module can be made that will check for any participant that unblocked himself/herself and can be send invitation after that. I know this feature is not in the top of the list, but with many participants, will be worth it.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Sign Up Control==&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_shot_10.png]]&lt;br /&gt;
&lt;br /&gt;
This feature will allow the participant to just go on to the home screen, and sign him up. He will be verified against his e-mail. On the front screen there will be a sign up button, that when clicked will open a pop-up asking for the e-mail id. When entered an invitation mail will be sent to him asking for the rest of details. This way we will be sure that we have a valid participant. Once those details are entered, automatically a token will be generated for that user, and he will be redirected to the survey. Alternatively, if the administrator wants, he/she can disable this feature completey, or allow the participating to only participate only when he/she sends the invitation.&lt;br /&gt;
&lt;br /&gt;
The mock - up of the sign up control is as shown :&lt;br /&gt;
&lt;br /&gt;
[[File:Screen_shot_9.png]]&lt;br /&gt;
&lt;br /&gt;
This feature again will have a survey specific settings, which will be stored in the survey&#039;s table. The local settings if set ,will override the global settings.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=CodeIgniter Specific Details=&lt;br /&gt;
&lt;br /&gt;
Since we are porting LimeSurvey to codeIgniter and any new projects have to be developed according to the CodeIgniter framework. I will try and give the basic outline of the approach I will be following.&lt;br /&gt;
&lt;br /&gt;
==Controller==&lt;br /&gt;
&lt;br /&gt;
I as of now, will be adding a single controller for the whole project, and it will be named &#039;centralDB&#039;. The functions under this controller will be of the form&lt;br /&gt;
*addParticipant //Add Participant&lt;br /&gt;
*import //Import CSV/LDAP&lt;br /&gt;
*displayparticipant //Display the jqgrid&lt;br /&gt;
*blcontrol //Blacklist Control&lt;br /&gt;
*usercontrol //User Control&lt;br /&gt;
*signupcontrol //signupcontrol&lt;br /&gt;
&lt;br /&gt;
All the controller&#039;s listed above will be used for only showing of the view, retrieving previous settings and storing new settings, and for import and displayparticipant functions, it will have major functionality as display participant will also be used for adding the participants to the database, and import will also be providing functionality and not just storing data.&lt;br /&gt;
&lt;br /&gt;
For Storing data we have functions such as&lt;br /&gt;
*storeParticipant&lt;br /&gt;
*storeBL&lt;br /&gt;
*storeUser&lt;br /&gt;
*storeSignup&lt;br /&gt;
&lt;br /&gt;
These methods will get the post variables from the view and storing it in the database using appropriate model. For displayParticipant and all, there will other functions such as addtosurvey.&lt;br /&gt;
&lt;br /&gt;
==Models==&lt;br /&gt;
&lt;br /&gt;
For the models we have&lt;br /&gt;
*participants_model&lt;br /&gt;
*attribute_model&lt;br /&gt;
*token_model(older token table)&lt;br /&gt;
*survey_links_model&lt;br /&gt;
&lt;br /&gt;
I think it&#039;s best to compress the three attributes table to one model. Rest of the models are pretty much simple, get and store records.This is the basic structure, what we need to concentrate on is what to do when we are joining tables and getting data from multiple tables.&lt;br /&gt;
&lt;br /&gt;
==View==&lt;br /&gt;
&lt;br /&gt;
For the view, I have decided to use the following views. These are&lt;br /&gt;
*headercpdb&lt;br /&gt;
*addparticipant_view&lt;br /&gt;
*displayparticipant_view&lt;br /&gt;
*importparticipant_view&lt;br /&gt;
*blcontrol_view&lt;br /&gt;
*usercontrol_view&lt;br /&gt;
*signupcontrol_view&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Scenario Testing=&lt;br /&gt;
&lt;br /&gt;
The main purpose of making this proposal on the wiki page is to get the review of the community and suggest us some scenario&#039;s where you can see the system failing, so that we can make the changes before it&#039;s too late. If you see any shortcomings or any other feedback, please leave a comment and please try and answer these questions&lt;br /&gt;
&lt;br /&gt;
1) What do you want to do?&lt;br /&gt;
&lt;br /&gt;
2) Where will the system fail?&lt;br /&gt;
&lt;br /&gt;
3) Feature Suggestion?&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Action Plan :)=&lt;br /&gt;
&lt;br /&gt;
I received my date-sheet and I have exams from 24th of May to 11th of June, So I will be tweaking the action plan a bit in order to get things right :).&lt;br /&gt;
&lt;br /&gt;
Plan for June&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|   Date||What to do ?&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;span style=&#039;color:#999&#039;&amp;gt;4-7th ||Talk to Shubham and Diogo during this period, as I think by that time they will be officially clear as to how they will be doing the porting, also, I will decide as to how I should go about it.If everything goes as planned I should be able to complete the add participant UI and the addition of data to the central database(without any features) along with the required validations.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|12-15th ||Will add the user_id info(based on the logged in user), along with the datestamp in the central database. Also will be creating the owner control as mentioned in the original proposal along with the required functionality with it. Like automatically adding participants to the token table or not, or editable owner&#039;s field or not .&lt;br /&gt;
|-&lt;br /&gt;
|16-22th June ||Addition and attribute control&lt;br /&gt;
|-&lt;br /&gt;
|23-28th June ||CSV and LDAP upload with attribute support&lt;br /&gt;
|-&lt;br /&gt;
|29-10th July ||Add to token table and vice versa with editing logic and max surveys feature&lt;br /&gt;
|-&lt;br /&gt;
|11-15th July ||Sending email with blacklist control and the required logic&lt;br /&gt;
|-&lt;br /&gt;
|(12 July - 16 July) || (Midterm Break)&lt;br /&gt;
|-&lt;br /&gt;
|16-31th July ||sign up addition for participants along with the multiligual attribute support for token system&lt;br /&gt;
|-&lt;br /&gt;
|1-15th August ||features from if we have time list&lt;br /&gt;
|-&lt;br /&gt;
|16-22th August ||cleaning up code, video tutorials, testing and bug fixing&lt;br /&gt;
|-&lt;br /&gt;
|23-31th August ||worst case scenario or else party time ;) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is the action plan for the first milestone according to my original proposal, I will create the further action plan once I am done with this target. I will also be updating a weekly progress report here as well as a mail to the administration team of LimeSurvey, about the discussions we have during the week. The actual coding and progress report will start from 12th of June.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Weekly Meetings=&lt;br /&gt;
&lt;br /&gt;
This will contain the logs of the weekly meetings we have:&lt;br /&gt;
&lt;br /&gt;
12th May 2011 -&amp;gt; http://docs.limesurvey.org/CPDB+Meeting+Log+12-05-2011&lt;br /&gt;
&lt;br /&gt;
Logs of meeting from the 19th of May will be available at the link below&lt;br /&gt;
&lt;br /&gt;
http://docs.limesurvey.org/CPDB+Meeting+Logs&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Scenarios=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Use the following section to describe (as succinctly and clearly as possible) various different scenarios in which the Central Participants Database may be used. These scenarios can assist in clarifying User Interface issues and in initial database design&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Privacy Scenarios==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Single Company Installation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this scenario, LimeSurvey is installed by a single company for use by that company&#039;s staff. The right to view and access data relating to participants is shared by all staff and there is no need to fence data off between users.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Multi User Installation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
LimeSurvey is installed at a University and different students or academics are using it to run surveys. Their ethics rules require that they keep their participant data to themselves, so other users cannot see it.&lt;br /&gt;
&lt;br /&gt;
==Survey Invitation Scenarios==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pre-existing List, Add it to Participants Database&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A user has a list of 500 people in their personal spreadsheet/database that they want to invite to participate in their survey. They create a survey, create a tokens table for it and then import the list (as per existing system). They want to make sure that their list is on the participants database for future use, and that they will be able to select these 500 people easily later on for future surveys.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Pre-existing List, Don&#039;t add it to the participants database&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A user has a list of 300 people in their personal spreadsheet/database that they want to invite to participate in a survey. They create a survey, create a tokens table table for it and then import the list (as per exising system). They &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want their list to be added to the central participants database.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generate attributes for the participants database from answers to a survey&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A user has run a survey which asked whether participants live in a capitol city, a major regional centre or a minor regional centre. He wants to transfer the answers from that survey to the participants attributes in the central participants table. He also wants to transfer the annual income results from a question. He already has this information for some of the participants, but wants to update it with the information collected in this survey.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generate tokens from participants list based on earlier survey&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A user creates a new survey and wants to invite all the participants from an earlier survey to this new survey. He needs to be able to select all those who participated in the earlier survey, preferably just those who actually completed it. He might want to add those who didn&#039;t complete the earlier survey later on.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generate tokens from participants list based on their survey history&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A user creates a new survey and wants to invite only participants that have not taken part in a survey for the last 2 months. He might also want to exclude all that have participated in a survey with a similar topic in the last 6 months. User will need to view a search form where he can:&lt;br /&gt;
&lt;br /&gt;
1) Select search criteria from values such as &amp;quot;survey name&amp;quot;, &amp;quot;survey completed date&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Fill out matching values (ie: text string for survey name, dates for completion dates)&lt;br /&gt;
&lt;br /&gt;
3) Make the system search through all participants for matches to the search criteria&lt;br /&gt;
&lt;br /&gt;
4) See a list of all the matching participants (and the relevant information)&lt;br /&gt;
&lt;br /&gt;
5) Be able to do something with the resulting list (most likely copy them to a token table)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Generate tokens from participants list based on other attribute&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A user creates a new survey and wants to invite all the participants he owns who have an income greater than $50,000 per annum and live in a capital city. User will need to be able to fill out a search form where he is able to:&lt;br /&gt;
&lt;br /&gt;
1) Select the attribute or attributes to use in his search&lt;br /&gt;
&lt;br /&gt;
2) Enter a search value/criteria for the search&lt;br /&gt;
&lt;br /&gt;
3) Make the system search through all the participants he has rights to view, for matches to his search criteria&lt;br /&gt;
&lt;br /&gt;
4) See a list of all the matching participants (and probably the relevant attribute data)&lt;br /&gt;
&lt;br /&gt;
5) Do stuff with the list (most likely, copy those participants to a token table for a survey)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Taking care of the panel health&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The manager of the central participant list wants to check on the panel health. He wants to know if all participants have been invited to surveys in a certain period of time, how often they have been invited, the ration between invitation and participation, etc. Ideally there would be a system to attribute &amp;quot;points&amp;quot; to each survey and those points would be added to each participant (something like the total km count for a car). Ideally there would also be another field with points that can be reset (e.g. like the day km in a car). This would help to remunerate participants for their participations, without having to &amp;quot;pay&amp;quot; them for every single survey.&lt;br /&gt;
&lt;br /&gt;
After running the survey for 5 days he realises he needs more, so he then wants to add people who live in major regional centres.&lt;br /&gt;
&lt;br /&gt;
==Other scenario types?==&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Theme_editor/pt&amp;diff=57623</id>
		<title>Theme editor/pt</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Theme_editor/pt&amp;diff=57623"/>
		<updated>2013-10-12T11:10:16Z</updated>

		<summary type="html">&lt;p&gt;Nery: Created page with &amp;quot;=Introdução=&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &lt;br /&gt;
=Introdução=&lt;br /&gt;
&lt;br /&gt;
LimeSurvey has a basic template and style system providing a theme-like capability found in many browser-based applications.  They are simply termed &#039;&#039;&#039;Templates&#039;&#039;&#039; here.  The Templates allow control over the look and feel of pages during a survey.  A survey administrator can select the template to use for each survey to thus personalize that survey&#039;s look and feel.  Changes to a Template can be as simple as adding a unique logo on the welcome page, changing background colors, or maybe new text colors for specific types of questions.&lt;br /&gt;
&lt;br /&gt;
LimeSurvey comes with a set of templates right out of the box. These initial templates are defined by directories within the LimeSurvey installation &amp;quot;templates&amp;quot; directory.  Each template has it&#039;s own directory.  Within the main directory of a template are numerous files: &#039;&#039;&#039;templates (.pstpl)&#039;&#039;&#039;, &#039;&#039;&#039;cascading style sheets (.css)&#039;&#039;&#039;, &#039;&#039;&#039;images&#039;&#039;&#039; (&#039;&#039;&#039;.jpg&#039;&#039;&#039; or &#039;&#039;&#039;.png&#039;&#039;&#039;) and maybe others.&lt;br /&gt;
&lt;br /&gt;
Like in other theme-based systems, fragments of HTML code are stored in the .pstpl template files.  These fragments are read in and used to construct the page to display to the end user during the operation of a survey. Often &#039;&#039;&#039;keywords&#039;&#039;&#039; surrounded by curly braces are included in the files that are then replaced with the relevant text.  The following gives an example of a template file content and its result when used in a survey page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&amp;lt;font face=&#039;verdana&#039; color=&#039;red&#039;&amp;gt;{SURVEYNAME}&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;verdana&#039; color=&#039;blue&#039;&amp;gt;&amp;lt;u&amp;gt;{SURVEYDESCRIPTION}&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One gets a result that looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&#039;&#039;&#039;&amp;lt;span style=&#039;color:red&#039;&amp;gt;My New Survey&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;u&amp;gt;&amp;lt;span style=&#039;color:#0000ff&#039;&amp;gt;This is a survey written by me to find out what sort of chocolate people like.&amp;lt;/span&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Templates, being HTML code, tend to define the positioning and type of text to be displayed and similar structural features of the page.  They often reference or include other files.  Most reference a common cascading style sheets (CSS) file that defines the font style, color, size, background and similar parameters common to all pages in the survey. Style sheets reference HTML &#039;&#039;&#039;class&#039;&#039;&#039; parameters that are associated with the various types of objects in the HTML code.  This allows the style sheet to describe once how to display each of the many types of text or other objects that may appear in multiple places.  There are unique classes for each question type in LimeSurvey and thus giving detailed control over the appearance of each.  Image files, like logos or special progress-bar constructors, may be referenced as well in the Template file.  Finally, special Keywords in curly braces are replaced with text defined in the Survey for each of its corresponding language translations (for example, the Survey Title or Question Text for each language defined).&lt;br /&gt;
&lt;br /&gt;
If you create a new custom template, please consider contributing it back to the LimeSurvey community, and make it available to others. With your help, we can grow our repository of templates, surveys, and other ad-ons, to make LimeSurvey even better! See the shared [http://www.limesurvey.org/en/download-limesurvey-design-templates/com_josetta_menu_control_panel/viewcategory/9-survey-design-templates Template Repository]&lt;br /&gt;
&lt;br /&gt;
=Creating a new Template=&lt;br /&gt;
&lt;br /&gt;
To be able to create a new template (or edit an existing template), you need Template Editing user permission in LimeSurvey as well as permission to manipulate the files in the underlying operating system hosting your LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note of Warning:&#039;&#039;&#039; As template changes can affect all surveys in an installation, changes should be limited to those skilled in understanding general concepts in the code base. Templates are an advanced feature that can take some experimentation to get correct if you are not familiar with HTML code methods.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The preferred way to create a new template is through the Template Editor (see below) via the web Admin interface. Some people may like to work directly with template files so that they can use their favorite text editor instead of the web interface. In this case, still use the Template Editor to first create your new template. This will create a new base template with all the files you need in the LimeSurvey_web_root/upload/templates/your_new_template directory. From there you can use your text editor to manually adjust the template files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Permissions Note:&#039;&#039;&#039; on unix/linux systems, these template files will be owned by the group and user who the web server is running as (may be &amp;quot;www&amp;quot; for some systems). So make sure you have access to edit these files, and when you save them make sure they don&#039;t change ownership, so you can still use the web Template Editing interface if needed&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Template files may seem complex to understand at first. You have to likely understand HTML code, possibly Styles and Style Sheets, and have access to the underlying LimeSurvey installation files if the template files and directories are not editable. Copy an existing template to a new directory to play around with the content. This may help make the concept clearer.&lt;br /&gt;
&lt;br /&gt;
A number of the &#039;public&#039; elements of LimeSurvey can be adjusted by a series of templates. This section provides a very brief explanation of these templates.&lt;br /&gt;
&lt;br /&gt;
=The LimeSurvey Template Editor=&lt;br /&gt;
&lt;br /&gt;
To ease the understanding and quick update of a Template, LimeSurvey provides a &#039;&#039;&#039;Template Editor&#039;&#039;&#039; in the main &#039;&#039;&#039;administrative&#039;&#039;&#039; toolbar of the application.  This Template Editor is only available to users given the privilege in the User Security settings.  A template effects all surveys and can render a survey inoperable if not constructed properly.  So Template editing is thought best restricted to a very limited, knowledgeable set of users.  Having permission to enter the Template Editor is not enough though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The LimeSurvey Template Editor allows you to edit the contents of your templates online. Start the Template Editor by clicking on the &amp;quot;Template Editor&amp;quot; icon [[File:templates.png]] in the LimeSurvey Administration toolbar (Templates). The main screen is similar to the LimeSurvey Survey Administration screen. It allows you to select the template to edit/view. Once this has been selected you can then select from one of the different public survey pages. You are then presented with a list of the template files that make up that particular page.&lt;br /&gt;
&lt;br /&gt;
[[File:Template-editor-2013-7-10_11_38_16.png|center]]&lt;br /&gt;
&lt;br /&gt;
==The Template Menu==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Edit Icon:&#039;&#039;&#039; The &amp;quot;edit&amp;quot; icon indicates whether or not the template is editable. A blurred out icon indicates that the template is read only; a clickable icon indicates you may make modifications. To change the icon from blurred to clear, you have to modify the template&#039;s permissions.&lt;br /&gt;
*&#039;&#039;&#039;Import Template:&#039;&#039;&#039; Allows you to import a template.&lt;br /&gt;
*&#039;&#039;&#039;Export Template:&#039;&#039;&#039; Allows you to export the current template to a .zip-File.&lt;br /&gt;
*&#039;&#039;&#039;Copy Template:&#039;&#039;&#039; Allows you to make a new template by copying the current one.&lt;br /&gt;
*&#039;&#039;&#039;Rename this template:&#039;&#039;&#039; Allows you to change the name of the template.  Generally used after copying an existing template or importing a template by manipulating the underlying directories.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Screen&amp;quot; drop-down list on the right allows you to choose which particular survey page you are currently looking at.&lt;br /&gt;
&lt;br /&gt;
==Import/Export/Copy a Template==&lt;br /&gt;
&lt;br /&gt;
When you &#039;&#039;&#039;export &#039;&#039;&#039;a template, this will create a zip-file archive with all the files your template consists of (.pstpl files, images, css files, ...). You can simply &#039;&#039;&#039;import &#039;&#039;&#039;the exported zip-file at other LimeSurvey systems by using the import feature or you can manually copy the archive to another installation and extract it into the corresponding template directory there. If you copy the template in the same installation, you will need to rename the folder to create another named copy of that template.&lt;br /&gt;
&lt;br /&gt;
If the file and directory permissions are open for the LimeSurvey application to write, then you can use the programs &#039;&#039;&#039;copy &#039;&#039;&#039;and rename features to make a local copy of a template.&lt;br /&gt;
&lt;br /&gt;
==Page Structure / Template Use==&lt;br /&gt;
*&#039;&#039;&#039;The Welcome Page:&#039;&#039;&#039; startpage.pstpl, welcome.pstpl, privacy.pstpl,  navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Questions Pages:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, startgroup.pstpl, groupdescription.pstpl, question.pstpl, endgroup.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Submit Page:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, submit.pstpl, (privacy.pstpl), navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Final Page:&#039;&#039;&#039; startpage.pstpl, assessment.pstpl, completed.pstpl, endpage.pstpl&lt;br /&gt;
&lt;br /&gt;
==Template Files==&lt;br /&gt;
&lt;br /&gt;
The following template files are used to produce your public survey and must exist in any new template folder you create:&lt;br /&gt;
*&#039;&#039;&#039;startpage.pstpl:&#039;&#039;&#039; Produces the start of each html page. It starts at the &amp;quot;&amp;lt;head&amp;gt;&amp;quot; tag, and should not contain the &amp;quot;&amp;lt;html&amp;gt;&amp;quot; tag. This &#039;very beginning&#039; of a standard html page is written by the scripts. Please ensure that your startpage.pstpl files contains a &amp;lt;body&amp;gt; tag, even though many browsers do not require strict adherence to the W3 HTML stanards, the LimeSurvey script needs to find a &amp;lt;body&amp;gt; tag, to run certain javascript elements. It is not expected that many &#039;keywords&#039; will be used in the startpage.pstpl file, however you may wish to put the {SURVEYNAME} into the title. The startpage.pstpl file can contain code that ends in the corresponding endpage.pstpl file, so you can start a table in this file and close the table in the endpage.pstpl file. The startpage.pstpl and endpage.pstpl files wrap around every possible page used by LimeSurvey.&lt;br /&gt;
*&#039;&#039;&#039;survey.pstpl:&#039;&#039;&#039; This template is the second used on most pages, and provides a space to put the survey name and description. This template does not have a corresponding &#039;closing&#039; template, and subsequently you should close all tags opened in this template file (ie: don&#039;t leave a table open here because there is nowhere else to close it)&lt;br /&gt;
*&#039;&#039;&#039;welcome.pstpl:&#039;&#039;&#039; This template is only used in the welcome screen (which is also on the main page for &#039;all in one&#039; surveys). You can use this to print out the welcome text, and other information that should be provided in the introduction. Like the &#039;survey.pstpl&#039; file, there is no corresponding &#039;closing&#039; template, so all tags opened in this template file should be closed as well.&lt;br /&gt;
*&#039;&#039;&#039;startgroup.pstpl:&#039;&#039;&#039; This template can provide a &#039;summary&#039; wrap around for questions within a group. It has a matching &#039;endgroup.pstpl&#039; template that can be used to close any opened tags in this file, so you can open a table within this.&lt;br /&gt;
*&#039;&#039;&#039;groupdescription.pstpl:&#039;&#039;&#039; This template file is used to display a description of a group. It is separate to the startgroup.pstpl file because in a &amp;quot;question by question&amp;quot; survey it will be displayed on its own unique page in between groups, whereas in a &amp;quot;group by group&amp;quot; or &amp;quot;all in one&amp;quot; survey it provides a header to the subsequent questions. groupdescription.pstpl does not have a corresponding &#039;closing&#039; template file, so all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question.pstpl:&#039;&#039;&#039; This file contains the question, answer and help text sections of your survey, and in the &amp;quot;group by group&amp;quot; and &amp;quot;all in one&amp;quot; surveys this template is cycled repeatedly with each question. There is no corresponding closing file for this and all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question_start.pstpl:&#039;&#039;&#039; This file contains the individual elements found at the start of a question. It is included within &#039;question.pstpl&#039; via the {QUESTION} keyword. It is intended to allow template designers more control over the layout of a question. This template sits outside the normal templating system and &#039;&#039;&#039;was superseeded (as of LS1.87)&#039;&#039;&#039;. All keywords from this template are now available directly in question.pstpl. NOTE: templates using question_start.pstpl will still work at least for a couple more versions of LS 1.x&lt;br /&gt;
*&#039;&#039;&#039;submit.pstpl (and privacy.pstpl):&#039;&#039;&#039; This page is the penultimate page for all types of survey (except the &amp;quot;all in one&amp;quot; type) where the participant is given an option to review questions before submitting their responses. It provides privacy information where a survey is anonymous, which it extracts from the &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039; file.&lt;br /&gt;
*&#039;&#039;&#039;completed.pstpl:&#039;&#039;&#039; This page is displayed as the final page when the survey responses have been saved and the survey is over. It can be used to display a &amp;quot;forwarding link&amp;quot; as set in the survey setup.&lt;br /&gt;
*&#039;&#039;&#039;endgroup.pstpl:&#039;&#039;&#039; This file closes the group, and can be used to close off any tags opened in the startgroup.pstpl file&lt;br /&gt;
*&#039;&#039;&#039;navigator.pstpl:&#039;&#039;&#039; This file contains the buttons that navigate through the survey, &amp;quot;next&amp;quot;, &amp;quot;prev&amp;quot;, &amp;quot;last&amp;quot;, &amp;quot;submit&amp;quot;, &amp;quot;save so far&amp;quot;  and the &amp;quot;clear all&amp;quot; link. It is used in all pages except the completed page.&lt;br /&gt;
*&#039;&#039;&#039;printanswers.pstpl:&#039;&#039;&#039; This file has the HTML wrapper for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_group.pstpl:&#039;&#039;&#039; This file is the same as startgroup.pstpl endgroup.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_question.pstpl:&#039;&#039;&#039; This file is the same as question.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_survey.pstpl:&#039;&#039;&#039; This file is the same as survey.pstpl but for the print version of the survey.&lt;br /&gt;
&lt;br /&gt;
== CSS and Javascript==&lt;br /&gt;
&lt;br /&gt;
Two files are allways used for template : template.css for css and template.js for javascript.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATECSS}:&#039;&#039;&#039; Add lines for default css, template.css and template-rtl.css for rtl language.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATEJS}:&#039;&#039;&#039; Add lines for default javascript files, template.js and all js files needed for LimeSurvey.&lt;br /&gt;
&lt;br /&gt;
=== Replacing default css or javascript===&lt;br /&gt;
&lt;br /&gt;
Some question use specific files for javascript or css. You can use your own files. All files used in your survey included in ./scripts or in .//styles-public can be replaced, just put a file with the same name in your template.&lt;br /&gt;
&lt;br /&gt;
==Other Template Files==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;invitationemail.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;reminderemail.pstpl&#039;&#039;&#039; and &#039;&#039;&#039;confirmationemail.pstpl&#039;&#039;&#039; are no longer used by LimeSurvey and defaults are instead set in the applicable language files. The email messages can now be edited on a survey by survey basis.&lt;br /&gt;
&lt;br /&gt;
==Standard Pages==&lt;br /&gt;
&lt;br /&gt;
There are ten standard pages that a survey participant may see in the course of taking or accessing the LimeSurvey application.  Each is constructed from a number of common &#039;&#039;&#039;Template&#039;&#039;&#039; files from the &#039;&#039;&#039;Template&#039;&#039;&#039; specified in the survey&#039;s settings.  The table below indicates which template files are used in constructing each of these pages.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!  &#039;&#039;&#039;Survey Pages:&#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039;Template Files&#039;&#039;&#039;!!Survey&amp;lt;br /&amp;gt;List!!Welcome!!Question!!Completed!!Clear All!!Register!!Load!!Save!!Print&amp;lt;br /&amp;gt;Answers!!Print&amp;lt;br /&amp;gt;Survey&lt;br /&gt;
|-&lt;br /&gt;
|SurveyList||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Welcome|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Privacy|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Navigator|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Survey|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|StartGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|GroupDescription|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Question&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|EndGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Assessment|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Completed|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|ClearAll|| || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Register|| || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Load|| || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||&lt;br /&gt;
|-&lt;br /&gt;
|Save|| || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| ||&lt;br /&gt;
|-&lt;br /&gt;
|PrintAnswers|| || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||&lt;br /&gt;
|-&lt;br /&gt;
|Print Survey || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Group || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Question || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|StartPage&amp;lt;br /&amp;gt;EndPage&amp;lt;br /&amp;gt;Template.css||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In versions 1.90 and up this replaces question.pstpl AND question_start.pstpl. If you are using an old custom template, you need to add the following line to the beginning of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div {QUESTION_ESSENTIALS} class=&amp;quot;{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;And then add the corresponding closing tag to the end of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In version 1.91 and earlier, LimeSurvey js files are not included by the template. In version 2, &#039;&#039;&#039;you have to use {TEMPLATEJS} in your one of your template file&#039;&#039;&#039; to add the link to the js file. You can add it in startpage.pstpl or in endpage.pstpl. You can remove the {TEMPLATEURL}/template.js line and you have to replace with {TEMPLATEJS} to update a personal template.&lt;br /&gt;
&lt;br /&gt;
==The File Control Section==&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;file control&amp;quot; window on the left, you can click on one of the template files that is used to compile the page. The HTML code for that file will then appear in the &amp;quot;Now editing&amp;quot; window in the center. If the template is editable (determined by directory permissions) you can then make any changes and save them.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Other Files&amp;quot; window shows a list of all other files in the template directory. You can use the right side to &#039;&#039;&#039;upload and select image files (your pics, logos,...) or other files needed to create your template&#039;&#039;&#039;. Note: Instead of a link directly to each picture in your template you can use the field string {TEMPLATEURL}.  So instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;/limesurvey/templates/yourtemplate/mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
You can use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;{TEMPLATEURL}mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;sample&amp;quot; of the template page you are editing will be visible at the bottom of the screen. There is no way to to delete a template from the template editor. This must be done by accessing the underlying directory and deleting the file there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; The shipped templates cannot be edited using the Template Editor and should never be changed. If you want to modify them, create a copy first and modify the copy.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Location of template files==&lt;br /&gt;
&lt;br /&gt;
LimeSurvey stores each of the &#039;standard&#039; templates in their own distinct sub-directory within the /templates directory that is kept in the public directory with the other LimeSurvey public files. Customized user templates are stored in the /upload/templates directory.&lt;br /&gt;
&lt;br /&gt;
To create a new template, use the according icon in the template editor.&lt;br /&gt;
&lt;br /&gt;
There should ALWAYS be a &amp;quot;default&amp;quot; directory in the templates directory. This template is used by default and as a fall-back if a template folder doesn&#039;t exist, or can&#039;t be found. The &amp;quot;default&amp;quot; directory comes with the package.&lt;br /&gt;
&lt;br /&gt;
You can use any image files that you upload into the template management area with syntax like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;{TEMPLATEURL}filename.xyz&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Styling questions with CSS=&lt;br /&gt;
&lt;br /&gt;
Styling of questions in CSS has become much easier. Each question type now has a unique class. Mandatory question&#039;s also have an additional mandatory class. For example, for a non-mandatory question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and if the question is mandatory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and if the question is mandatory but the user didn&#039;t answer it or if there is validation on a question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and if the question has validation applied but the user hasn&#039;t answered correctly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question6&amp;quot; class=&amp;quot;text-short input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Global classes for question part==&lt;br /&gt;
&lt;br /&gt;
These classes are used for each question type. Some question types use only one or two class, but others can use much more.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable alternance&amp;quot;&lt;br /&gt;
|+ Global classes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Class name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Part&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Question type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Examples&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Note&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question&lt;br /&gt;
| All question block&lt;br /&gt;
| All question type&lt;br /&gt;
|&amp;amp;lt;p class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;ul class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;question&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .subquestions-list&lt;br /&gt;
| List of subquestion&lt;br /&gt;
| Multi choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;subquestions-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;subquestions-list&amp;quot;&amp;gt;&lt;br /&gt;
| .questions-list is used too&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answers-list&lt;br /&gt;
| List of answers&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;answers-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;answers-list&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answer-item&lt;br /&gt;
| The answer part: one answer&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;answer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;answer-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .noanswer-item&lt;br /&gt;
| The answer part for no answer&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;noanswer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
| No answer is an answer too, then have double class noanswer-item and answer-item&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question-item&lt;br /&gt;
| The question part: one question&lt;br /&gt;
| Multi text question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;question-item&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;question-item&amp;quot;&amp;gt;&lt;br /&gt;
| Some answer are question too, then we have a lot of class=&amp;quot;question-item answer-item&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-list&lt;br /&gt;
| A list of checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;checkbox-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;checkbox-list&amp;quot;&amp;gt;&lt;br /&gt;
| Some question type have multi list class: like checkbox with comment : class=&amp;quot;checkbox-list text-list&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-item&lt;br /&gt;
| The answer part with a checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;checkbox-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;checkbox-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-list&lt;br /&gt;
| A list of radio item&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;radio-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;radio-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-item&lt;br /&gt;
| The answer part with a radio&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;radio-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;radio-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-list&lt;br /&gt;
| A list of text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-item&lt;br /&gt;
| The answer part of a text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;text-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;text-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-list&lt;br /&gt;
| A list of text input with numeric only answer&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-item&lt;br /&gt;
| The answer part of a numeric input&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;numeric-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;numeric-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-list&lt;br /&gt;
| A list of select&lt;br /&gt;
| Array numbers, Dual scale array (select)&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;select-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-item&lt;br /&gt;
| The answer part of a select&lt;br /&gt;
| Array numbers, Dual scale array (select), single choice with select&lt;br /&gt;
| &amp;amp;lt;p class=&amp;quot;select-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;select-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .hide&lt;br /&gt;
| Used for accessibility: hidden with css but read by screenreader&lt;br /&gt;
| Short text question&lt;br /&gt;
| &amp;amp;lt;label class=&amp;quot;hide&amp;quot;&amp;gt;&lt;br /&gt;
| Can be used for other purpose&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .dontread&lt;br /&gt;
| Used for accessibility: not be read by screenreader&lt;br /&gt;
| Array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;dontread&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox&lt;br /&gt;
| input[type=checkbox]&lt;br /&gt;
| Question with checkbox&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;checkbox&amp;quot; class=&amp;quot;checkbox&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio&lt;br /&gt;
| input[type=radio]&lt;br /&gt;
| Question with radio&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;radio&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text&lt;br /&gt;
| input[type=text]&lt;br /&gt;
| Question with input text, or textarea&lt;br /&gt;
| &amp;amp;lt;textarea class=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answertext&lt;br /&gt;
| Array question type&lt;br /&gt;
| Answer part of array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;answertext&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .col-answers&lt;br /&gt;
| Array question type&lt;br /&gt;
| Column of answers&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .array1 .array2&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for line&lt;br /&gt;
| &amp;amp;lt;tr class=&amp;quot;array1&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Some example of question part with classes===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;text-short question type:&#039;&#039;&#039;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;question answer-item text-item &amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label class=&amp;quot;hide label&amp;quot; for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Answer&amp;lt;/label&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;50&amp;quot; class=&amp;quot;text  empty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Multiple short text&#039;&#039;&#039;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul class=&amp;quot;subquestions-list questions-list text-list&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li class=&amp;quot;question-item answer-item text-item&amp;quot; id=&amp;quot;javatbdSGQA&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Some example subquestion&amp;lt;/label&amp;gt;&lt;br /&gt;
     &amp;lt;span&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;20&amp;quot; class=&amp;quot;text empty&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Array question type&#039;&#039;&#039;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;question subquestion-list questions-list &amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;caption class=&amp;quot;hide read&amp;quot;&amp;gt;Some explanation for accessibility.&amp;lt;/caption&amp;gt;&lt;br /&gt;
	&amp;lt;colgroup class=&amp;quot;col-responses&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;50%&amp;quot; class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;25%&amp;quot; class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;13.3%&amp;quot; class=&amp;quot;col-no-answer even&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/colgroup&amp;gt;&lt;br /&gt;
	&amp;lt;thead&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array1 dontread&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;No answer&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/thead&amp;gt;&lt;br /&gt;
	&amp;lt;tbody&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array2 answers-list radio-list&amp;quot; id=&amp;quot;javatbdSGQ&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;20%&amp;quot; class=&amp;quot;answertext&amp;quot;&amp;gt;Some example subquestion&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer_cell_001 answer-item radio-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;1&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;1&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer-item radio-item noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;No answer&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==The full list of question classes==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Question Type&#039;&#039;&#039;||&#039;&#039;&#039;Question Class&#039;&#039;&#039;||&#039;&#039;&#039;Question ID&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|5 point choice||.choice-5-pt-radio||5&lt;br /&gt;
|-&lt;br /&gt;
|Array (10 point choice)||.array-10-pt||B&lt;br /&gt;
|-&lt;br /&gt;
|Array (5 point choice)||.array-5-pt||A&lt;br /&gt;
|-&lt;br /&gt;
|Array (Flexible Labels) dual scale||.array-flexible-duel-scale ||1&lt;br /&gt;
|-&lt;br /&gt;
|Array (Increase, Same, Decrease)||.array-increase-same-decrease||E&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Numbers)||.array-multi-flexi ||:&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Text)||.array-multi-flexi-text||;&lt;br /&gt;
|-&lt;br /&gt;
|Array (Yes/No/Uncertain)||.array-yes-uncertain-no||C&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels)||.array-flexible-row ||F&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels) by column||.array-flexible-column||H&lt;br /&gt;
|-&lt;br /&gt;
|Boilerplate question||.boilerplate||X&lt;br /&gt;
|-&lt;br /&gt;
|Date||.date||D&lt;br /&gt;
|-&lt;br /&gt;
|Gender||.gender||G&lt;br /&gt;
|-&lt;br /&gt;
|Huge free text||.text-huge||U&lt;br /&gt;
|-&lt;br /&gt;
|Language switch||.language||I&lt;br /&gt;
|-&lt;br /&gt;
|List (dropdown)||.list-dropdown||!&lt;br /&gt;
|-&lt;br /&gt;
|List (radio)||.list-radio||L&lt;br /&gt;
|-&lt;br /&gt;
|List with comment||.list-with-comment||O&lt;br /&gt;
|-&lt;br /&gt;
|Long free text||.text-long||T&lt;br /&gt;
|-&lt;br /&gt;
|Multiple numerical input||.numeric-multi||K&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options||.multiple-opt||M&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options with comments||.multiple-opt-comments||P&lt;br /&gt;
|-&lt;br /&gt;
|Multiple short text||.multiple-short-txt||Q&lt;br /&gt;
|-&lt;br /&gt;
|Numerical input||.numeric||N&lt;br /&gt;
|-&lt;br /&gt;
|Ranking||.ranking||R&lt;br /&gt;
|-&lt;br /&gt;
|Short free text||.text-short||S&lt;br /&gt;
|-&lt;br /&gt;
|Yes/No||.yes-no||Y&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The full list of validation classes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Note:  Prior to 1.92, only .mandatory and .input-error classes were available.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These apply to the help and/or validation tip messages so that each type can be individually styled.&lt;br /&gt;
&lt;br /&gt;
The .hide-tip option and .input-error options, by default, interact so that you can have validation tips start hidden, but appear when there validation errors, and disappear again when those errors are rectified.&lt;br /&gt;
&lt;br /&gt;
All of these are designed to eliminate the need for pop-up alert messages.  Instead, tips can appear/disappear as needed, and are color-coded to indicate whether the answers pass the validation criteria.&lt;br /&gt;
&lt;br /&gt;
Furthermore, when you first visit a page that has unmet validation criteria, you can color-code the tips in a pleasing color to show which validation criteria have not been med; then re-display the page using a harsher color if the person submits the page with lingering validation errors.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Purpose&#039;&#039;&#039;||&#039;&#039;&#039;CSS Class&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Mandatory||.mandatory||the question is mandatory&lt;br /&gt;
|-&lt;br /&gt;
|User input error||.input-error||the question had at least one validation error&lt;br /&gt;
|-&lt;br /&gt;
|Hide Tip||.hide-tip||added if you use the hide_tip option&lt;br /&gt;
|-&lt;br /&gt;
|Num answers||.em_num_answers||for for min_answers and max_answers&lt;br /&gt;
|-&lt;br /&gt;
|Value range||.em_value_range||for min/max_num_value_n and multiflexible_min/max&lt;br /&gt;
|-&lt;br /&gt;
|Sum range||.em_sum_range||for min/max/equals_num_value&lt;br /&gt;
|-&lt;br /&gt;
|Regex validation||.em_regex_validation||for regular-expression validation of the question&lt;br /&gt;
|-&lt;br /&gt;
|Question-level validation function||.em_q_fn_validation||for the em_validation_q option&lt;br /&gt;
|-&lt;br /&gt;
|Subquestion-level validation function||.em_sq_fn_validation||for the em_validation_sq option&lt;br /&gt;
|-&lt;br /&gt;
|Other comment mandatory||.em_other_comment_mandatory||for other_comment_mandatory option - shows when &amp;quot;other&amp;quot; is selected but associated comment is missing.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Importing styles into your custom template==&lt;br /&gt;
&lt;br /&gt;
The custom question styles are near the bottom of each template&#039;s CSS file and start with:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;/* --------------------------- START: Question styles  ------------------------------ */&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re styling your own custom template, you should be able to copy everything after the above from templates/default/template.css (for tables based layouts) or /templates/limespired/template.css (for CSS based layouts) into your own style sheet without any impact on your other styles.&lt;br /&gt;
&lt;br /&gt;
==Internet Explorer conditional style sheets==&lt;br /&gt;
&lt;br /&gt;
Because of the marked discrepancies in rendering between IE6, IE7 and most other browsers, there are special IE conditional style sheets included for each template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_all-versions.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if lt IE 7]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_older-than-7.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8]&amp;gt;&lt;br /&gt;
		&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}ie_fix_8.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should include the above code within your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; and copies of both the IE style sheets from either /templates/default/ or /templates/limespired for Tables base layout and CSS based layout respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; If you copy the styles into your own style sheet you will almost certainly need to tweak them.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alternative solution for Internet explorer===&lt;br /&gt;
&lt;br /&gt;
You can put conditional class for body in startpage.pstpl, and use this class in your template.css. This method is used in citronade template. Adding a js / no-js class to to have javascript / no javascript system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;!--[if lt IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie6 ielt7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie8 ielt9  no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 9 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if gt IE 9]&amp;gt;&amp;lt;!--&amp;gt;&amp;lt;body id=&amp;quot;body&amp;quot; class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} no-js&amp;quot;&amp;gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;script type=&#039;text/javascript&#039;&amp;gt;/*&amp;lt;![CDATA[*/(function(H){ H.className=H.className.replace(/\bno-js\b/,&#039;js&#039;) })(document.getElementsByTagName(&#039;body&#039;)[0]);/*]]&amp;gt;*/&amp;lt;/script&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And in template.css use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;.ie6{/*specific for internet explorer 6*/}&lt;br /&gt;
.ielt8{/*specific for internet explorer 6 and 7*/}&lt;br /&gt;
.ie{/*specific for all internet explorer */}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Right-to-Left (RTL) Languages and justify==&lt;br /&gt;
&lt;br /&gt;
The text editor within LimeSurvey is able to format RTL Text. However, the editor itself shows the RTL language in a left to right format when justified.  This is just an editor display issue. The RTL and justified question or text will display correctly from right to left, even when justified, in your survey or on preview.&lt;br /&gt;
&lt;br /&gt;
==Keywords==&lt;br /&gt;
&lt;br /&gt;
Keywords within a template file get replaced by the current survey information. They are surrounded by curly brackets, for example: {SURVEYNAME}&lt;br /&gt;
&lt;br /&gt;
The following strings will be replaced by LimeSurvey when parsing the template file and presenting it to survey users. These field strings will work on almost every template except for the &#039;Completed Page&#039;. (Most of these strings can be found in the common.php file. If it&#039;s not there, look in the index.php file.)&lt;br /&gt;
&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
!&#039;&#039;&#039;Keyword&#039;&#039;&#039;!!&#039;&#039;&#039;Template files&#039;&#039;&#039;!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||All Files||The survey title&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||All Files||The survey description&lt;br /&gt;
|-&lt;br /&gt;
|{WELCOME}||All files (mainly for welcome.pstpl)||The survey &#039;welcome&#039; text&lt;br /&gt;
|-&lt;br /&gt;
|{PERCENTCOMPLETE}||survey.pstpl||A small graph showing the percentage of the survey completed&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPNAME}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group name&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPDESCRIPTION}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group description&lt;br /&gt;
|-&lt;br /&gt;
|{NUMBEROFQUESTIONS}||welcome.pstpl||Displays the total number of questions in the survey (just the number)&lt;br /&gt;
|-&lt;br /&gt;
|{THEREAREXQUESTIONS}||welcome.pstpl||Displays the sentence &amp;quot;There are X questions in this survey&amp;quot; - from the relevant language file. The X is replaced with the number of questions. Note that this will also work appropriately for singular or plural. If there is only 1 question, it will print &amp;quot;There is 1 question in this survey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|{CHECKJAVASCRIPT}||All files (mainly for welcome.pstpl)||Warning message when end-user browser have javascript disabled&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION}||Question.pstpl||(&#039;&#039;&#039;Has been superseeded but the {QUESTION_...} keywords as of LS1.87&#039;&#039;&#039;) Displays the current question text (The format of {QUESTION} can customised by editing &#039;question_start.pstpl&#039;) Use the following: {QUESTION_TEXT}, {QUESTION_MANDATORY}, {QUESTION_HELP}, {QUESTION_MAN_MESSAGE}, {QUESTION_VALID_MESSAGE} and {QUESTION_INPUT_ERROR_CLASS} and appropriate wrapping HTML instead of {QUESTION}&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWER}||question.pstpl, print_question.pstpl||presents the answer form for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{SGQ}||question.pstpl, question text||Can be used in the question text itself, to reference the input field of the question dynamically by displaying the Survey-Group-Question id for the current question. (as of svn build 9755)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTIONHELP}||question.pstpl, print_question.pstpl||Displays help text (predefined tip for question type) for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CLASS}||question.pstpl, print_question.pstpl||unique class for each question type. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CODE}||question.pstpl, print_question.pstpl||Displays the current question code&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ESSENTIALS}||question.pstpl||the question ID and (if a question is conditional), &#039;style=&amp;quot;display:none;&amp;quot;&#039;. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_HELP}||question.pstp, question_start.pstpl||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TYPE_HELP}||print_question.pstp||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_INPUT_ERROR_CLASS}||question.pstp, question_start.pstpl||Provides a class if there was user input error&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ID}||print_question.pstp||Provides a unique ID for each question to allow styling for specific questions&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TEXT}||question.pstp, print_question.pstp, question_start.pstpl||Displays the text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MANDATORY}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_CLASS}||question.pstpl, print_question.pstpl||class if a question is mandatory. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_NUMBER}||print_question.pstpl||Incremental count of questions.&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_VALID_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated valid help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_SCENARIO}||print_question.pstp||Prints out the &#039;scenario&#039; text for conditional questions.&lt;br /&gt;
|-&lt;br /&gt;
|{NAVIGATOR}||navigator.pstpl||Displays navigation buttons (next, prev, last)&lt;br /&gt;
|-&lt;br /&gt;
|{CLEARALL}||All files (but intended for navigator.pstpl)||Displays the &amp;quot;Exit and Clear Results&amp;quot; link&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITBUTTON}||submit.pstpl||Displays the final submit button&lt;br /&gt;
|-&lt;br /&gt;
|{COMPLETED}||completed.pstpl||Displays the &#039;completed&#039; message for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{URL}||completed.pstpl||Displays the survey &#039;url&#039; and &#039;url text&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACY}||submit.pstpl||Displays privacy information when survey is anonymous&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACYMESSAGE}||privacy.pstpl||The privacy message is shown if you set your survey to be anonymous. [[Translating LimeSurvey|The text can be edited/translated]] in the language files. This can also be changed manually by editing the privacy.pstpl template you wish to use.&lt;br /&gt;
|-&lt;br /&gt;
|{TEMPLATEURL}||All Files||The URL to the current template location (useful for referencing image files in your template)&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITCOMPLETE}||endpage.pstpl||The statement (from the language files) that tells the user they have completed the survey, and to press the &amp;quot;Submit&amp;quot; button&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITREVIEW}||survey.pstpl||The statement (from the language files) that tells the user they can review/change the answers they have made by clicking &amp;quot;&amp;lt;&amp;lt; prev&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users first name from the tokens table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users last name from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:EMAIL}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users email from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_1 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_2 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERSCLEARED}||Preferably in navigator.pstpl||The &amp;quot;Answers Cleared&amp;quot; statement from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{RESTART}||clearall.pstpl||URL to restart the survey&lt;br /&gt;
|-&lt;br /&gt;
|{CLOSEWINDOW}||All Files (Preferably in navigator.pstpl)||URL to close current window&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERERROR}||register.pstpl||Shows any error messages in the register page (ie: &amp;quot;You must include an email address&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE1}||register.pstpl||The statement &amp;quot;You must be registered to complete this survey&amp;quot; from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE2}||register.pstpl||Details about registering from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERFORM}||register.pstpl||The actual form for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{SAVE}||Works suitable on navigator.pstpl||Displays the &#039;Save your responses so far&#039; button to offer the user to save and come back later to continue the survey. If the Save option is deactivated in the survey properties the tag will not be shown and ignored.&lt;br /&gt;
|-&lt;br /&gt;
|{LANGUAGECHANGER}||survey.pstpl||Displays a switch in multilingual surveys to change the question.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Input/Buttons==&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;input&amp;quot; type in a survey has been given its own class name, so that you can add CSS to your &amp;quot;startpage.pstpl&amp;quot; file, and have some control over the appearance of form buttons and inputs. These class names are as follows:&lt;br /&gt;
*&#039;&#039;&#039;submit&#039;&#039;&#039; (Submit Buttons)&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; (Text Inputs - for short free text, date and numerical type)&lt;br /&gt;
*&#039;&#039;&#039;answertext&#039;&#039;&#039; (Text of answers)&lt;br /&gt;
*&#039;&#039;&#039;radio&#039;&#039;&#039; (Radio Buttons)&lt;br /&gt;
*&#039;&#039;&#039;checkbox&#039;&#039;&#039; (Check Boxes)&lt;br /&gt;
*&#039;&#039;&#039;select&#039;&#039;&#039; (Select / List Boxes)&lt;br /&gt;
*&#039;&#039;&#039;textarea&#039;&#039;&#039; (Large text inputs - for long free text)&lt;br /&gt;
*&#039;&#039;&#039;clearall&#039;&#039;&#039; (The &amp;quot;Exit and Clear Survey&amp;quot; link)&lt;br /&gt;
*&#039;&#039;&#039;rank&#039;&#039;&#039; (The rank style question. Doesn&#039;t set the colour of the select box or the text boxes (these are set by relevant section above) but does allow changing of background colour, text colour and size etc for the rest of the ranking question)&lt;br /&gt;
*&#039;&#039;&#039;graph&#039;&#039;&#039; (The &amp;quot;percentage completed&amp;quot; graph table)&lt;br /&gt;
*&#039;&#039;&#039;innergraph&#039;&#039;&#039; (The table inside the graph table - this contains the 0% and 100% text. Use this for changing the size of this text)&lt;br /&gt;
*&#039;&#039;&#039;question&#039;&#039;&#039; (General settings for any question that is displayed within a table. Generally you should use this to make sure that their font size and colour is the same as you have used elsewhere as a default)&lt;br /&gt;
*&#039;&#039;&#039;mandatory&#039;&#039;&#039;  (Mandatory questions)&lt;br /&gt;
*&#039;&#039;&#039;input-error&#039;&#039;&#039; (User input error - for if a user has made a mistake with a mandatory question or question with validation)&lt;br /&gt;
*&#039;&#039;&#039;array1&#039;&#039;&#039; and &#039;&#039;&#039;array2&#039;&#039;&#039; (These two styles are cycled when presenting the range of answers for an array type question. This allows you to set an alternating background colour for these question types. &#039;&#039;&#039;Array1&#039;&#039;&#039; is also used for the column headings in these question types)&lt;br /&gt;
*&#039;&#039;&#039;errormandatory&#039;&#039;&#039; (Sets the colour and style of the &amp;quot;This question is mandatory&amp;quot; error message)&lt;br /&gt;
*&#039;&#039;&#039;warningjs&#039;&#039;&#039; (Sets the colour and style of the warning message displayed if the participant&#039;s browser has javascript disabled)&lt;br /&gt;
&lt;br /&gt;
There are also some elements that can be accessed using the ID of the element (&#039;&#039;&#039;#ID&#039;&#039;&#039; in CSS):&lt;br /&gt;
*&#039;&#039;&#039;surveycontact&#039;&#039;&#039; (The contact message shown on the start page)&lt;br /&gt;
*&#039;&#039;&#039;tokenmessage&#039;&#039;&#039; (used for messages inside the survey, e.g. the session expired error message)&lt;br /&gt;
&lt;br /&gt;
An example of using these classes with style sheets can be found in the &amp;quot;bubblegum&amp;quot; template that comes with the LimeSurvey application.&lt;br /&gt;
&lt;br /&gt;
Because you can edit all the HTML aspects, there&#039;s no reason to surround your templates with a &amp;lt;div class=&#039;new_name&#039;&amp;gt; and then define a css for that new_name class.&lt;br /&gt;
&lt;br /&gt;
==Styling the progress bar==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before version 1.87:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The chart.jpg file is a simple one pixel image file which is used to create the progress bar image in the &#039;PERCENTCOMPLETE&#039; table. If the file does not exist, LimeSurvey will use the default &#039;maroon&#039; coloured image in the public directory. If you want to create a bar to match your own colour scheme, then you should save the color in this file. Remember it should be a &#039;&#039;&#039;JPEG&#039;&#039;&#039; file, 1 pixel x 1 pixel, in the colour desired.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The progress bar appearance can be modified with CSS.&lt;br /&gt;
&lt;br /&gt;
To change the background colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-header {&lt;br /&gt;
 background-color: #3300FF;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the border colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-content,&lt;br /&gt;
#progress-wrapper .ui-widget-header {&lt;br /&gt;
 border: 1px solid #FF0000;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advanced Features Available to Developers==&lt;br /&gt;
&lt;br /&gt;
Starting with version 0.99, LimeSurvey has integrated some user-made patches that allow for some special changes.  These very advanced features generally require changes to the underlying code base of LimeSurvey and should be done carefully so as not to introduce security holes.&lt;br /&gt;
&lt;br /&gt;
===Basic CMS Integration support===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Deprecated: This function is not available anymore in version 2.0 or later&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To be able to integrate LimeSurvey into another CMS, use the following options in &#039;&#039;&#039;config.php&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
// Set $embedded to true and specify the header and footer functions if the survey is to be displayed embedded in a CMS&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$embedded = false;&lt;br /&gt;
$embedded_inc = &amp;quot;&amp;quot;;               // path to the header to include if any&lt;br /&gt;
$embedded_headerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteHeader for geeklog&lt;br /&gt;
$embedded_footerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteFooter for geeklog&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &#039;&#039;&#039;$embedded = true;&#039;&#039;&#039; to enable CMS-embedding. By using the &#039;&#039;&#039;$embedded_inc&#039;&#039;&#039; variable one can include their own &#039;&#039;&#039;.php&#039;&#039;&#039; files.  By setting &#039;&#039;&#039;$embedded_headerfunc&#039;&#039;&#039; or &#039;&#039;&#039;$embedded_footerfunc&#039;&#039;&#039;, one can call functions from within included files that output the relevant headers or footers instead of LimeSurveys default ones.&lt;br /&gt;
&lt;br /&gt;
===Support for your own Javascript functions===&lt;br /&gt;
&lt;br /&gt;
Some users may need to run Javascript on the survey pages, but calling &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; in the BODY element made it impossible to do so.  This call has been replaced with a small JavaScript function in the HEAD that sniffs for the existence of &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; and &#039;&#039;&#039;template_onload()&#039;&#039;&#039; before calling each.  This way a template author can create their own &#039;&#039;&#039;template_onload()&#039;&#039;&#039; function in the HEAD that replaces the default one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
*Disable XSS filter - in Global settings -&amp;gt; Security, set &amp;quot;Filter HTML for XSS&amp;quot; to No.&lt;br /&gt;
*Enter your script in the source of a question or group description.&lt;br /&gt;
*There are more details in the [[Workarounds: Manipulating a survey at runtime using Javascript#How to use Script (eg. JavaScript etc.) in LimeSurvey?|workaround section]].&lt;br /&gt;
&lt;br /&gt;
=Videos on Templates=&lt;br /&gt;
&lt;br /&gt;
This video will demonstrate the basic and advanced template functions that are available to all LimeSurvey users. This includes changing the appearance of certain forms and inserting custom graphics. Additionally, it will thoroughly walk you through on how to edit and preview specific page templates, importing/exporting templates, modify appearance of questions in the CSS, customizing survey description page, and completed page.&lt;br /&gt;
&lt;br /&gt;
[http://youtu.be/Uk3FQyDTIY0 LimeSurvey training video - template customization]&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; Tricks=&lt;br /&gt;
&lt;br /&gt;
==Some language specific element==&lt;br /&gt;
&lt;br /&gt;
If you want to have some language specific sentence in a survey, for example a help at end of each page, you can add in a .pstl file a sentence and hidding it for other language. And hidding it in the template.css, we can use the pseudo selector :lang, but for best compatibility, we use some class.&lt;br /&gt;
&lt;br /&gt;
Example for a help sentence at bottom of the page, in french and english, put this on endpage.pstpl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;fr&amp;quot; lang=&amp;quot;fr&amp;quot;&amp;gt;Pour de l&#039;aide en direct appelez le 000000&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;en&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;For some help, please call 000000&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and in template.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;.lang-fr .en{display:none}&lt;br /&gt;
.lang-en .fr{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use it to for other sentence in your question before 1.92 ( in 1.92, there are better solutions).&lt;br /&gt;
&lt;br /&gt;
==Change the layout of the survey page==&lt;br /&gt;
&lt;br /&gt;
When editing a template this template can be assigned to a single survey while the survey list page, which is shown at www.yourdomain.org/limesurveyinstallfolder, lists all your surveys.&lt;br /&gt;
&lt;br /&gt;
To use your current template for this page you have change the according setting at the Global Settings screen; at older versions this change can be done by editing the $defaulttemplate setting at the config file: Copy this setting from config-defaults.php to config.php which overrides config-defaults.php and edit this setting to $defaulttemplate = &#039;yourtemplatename&#039;;&lt;br /&gt;
&lt;br /&gt;
==Import/Export of templates: Mac users==&lt;br /&gt;
&lt;br /&gt;
Mac users, please note: Mac OSX default archive utility may have problems with zip folders &amp;quot;generated on the fly&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
a work around is to unix&#039;es unzip from the command line:&lt;br /&gt;
&lt;br /&gt;
$ unzip template.zip -d template&lt;br /&gt;
&lt;br /&gt;
Archive: template.zip&lt;br /&gt;
&lt;br /&gt;
 inflating: template/startpage&lt;br /&gt;
&lt;br /&gt;
 inflating: ...&lt;br /&gt;
&lt;br /&gt;
or scripts in their mac-compiled counterparts:&lt;br /&gt;
&lt;br /&gt;
http://homepage.mac.com/roger_jolly/software/&lt;br /&gt;
&lt;br /&gt;
==Changing your templates traffic light from red to green==&lt;br /&gt;
&lt;br /&gt;
If you haven&#039;t already, set the admin directory to read/write/execute (777). The files within it, however, may be set to read/execute only (chmod 755).&lt;br /&gt;
&lt;br /&gt;
GO to file directory ie file manager, find templates directory.&lt;br /&gt;
&lt;br /&gt;
1 change permission on eg&amp;quot;vallendar&amp;quot; (or any template of your choice) directory to read 777&lt;br /&gt;
&lt;br /&gt;
2 voila! the red traffic light on &amp;quot;vallendar&amp;quot; is now green.&lt;br /&gt;
&lt;br /&gt;
3 NOTE: to restrict access for safety, when finished editing template files, change all templates files back to what they were eg 644&lt;br /&gt;
&lt;br /&gt;
==Replacing the help icon==&lt;br /&gt;
&lt;br /&gt;
When a question help text is shown then an help.gif image is used from the default template folder.&lt;br /&gt;
&lt;br /&gt;
You can replace this image by uploading a new help.gif, help.png or help.jpg in your custom template folder. It then will be automatically used instead of the default help icon.&lt;br /&gt;
&lt;br /&gt;
==Replacing an existing logo==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Before uploading a new logo always delete the old, existing one!&lt;br /&gt;
&lt;br /&gt;
1. To edit the logo go to the &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; file which you can find it here:&lt;br /&gt;
&lt;br /&gt;
[[File:t1.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
2. Click the search button to find occurrences of logo related styles.&lt;br /&gt;
&lt;br /&gt;
[[File:2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
3. Search for &amp;lt;u&amp;gt;#logo&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
4. Edit the main style file&lt;br /&gt;
&lt;br /&gt;
You will see something similar to:&lt;br /&gt;
&lt;br /&gt;
[[File:t4.PNG|500px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to change the image just replace logo.gif with another image link. Example: (&amp;lt;u&amp;gt;logo.png&amp;lt;/u&amp;gt; or &amp;lt;u&amp;gt;logo.jpg&amp;lt;/u&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want change the image size adjust width and height (in pixels) like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;width:100px; height:100px;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding your own logo==&lt;br /&gt;
&lt;br /&gt;
1. Find and open the &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo; template file.&lt;br /&gt;
&lt;br /&gt;
[[File:5.PNG|200px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. After the &amp;lt;source lang=&amp;quot;html4strict&amp;quot; &amp;gt;&amp;lt;body ... &amp;gt;&amp;lt;/source&amp;gt; tag add this line to &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;img id=&amp;quot;page_logo&amp;quot; src=&amp;quot;{TEMPLATEURL}logo.png&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. To add logo go to &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo;, you can find it here (see in screen):&lt;br /&gt;
&lt;br /&gt;
[[File:6.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.1 Then go to the end of the main &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; style file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2 To align the logo add...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at left side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:left;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at right side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:right;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you want to center the logo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   display: block;&lt;br /&gt;
   margin-left: auto;&lt;br /&gt;
   margin-right: auto;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use the same template with different logos==&lt;br /&gt;
&lt;br /&gt;
If you want to use the same template for all surveys and just want to change the logo for each survey, you can use the {SID} placeholder in the template .pstpl file and thereby refer to different images:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;{TEMPLATEURL}logoImage-{SID}.png&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the default help to all question (hide_tip)==&lt;br /&gt;
&lt;br /&gt;
There are 3 solutions to remove the default help:&lt;br /&gt;
# like a [[Advanced question settings#hide_tip|hide_tip attribute]] but for all question and survey.&lt;br /&gt;
# you can remove the {QUESTIONHELP} and is container from the file question.pstl, but it can be a bad idea for screenreader.&lt;br /&gt;
# for the default template and some other, add this at the end of tempate.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;span.questionhelp{display:none;}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Display custom favicon==&lt;br /&gt;
&lt;br /&gt;
A favicon is the little icon you see in the browser&#039;s address bar, list of bookmarks or tab. You can display your own icon as follows:&lt;br /&gt;
#Create a favicon - google will find you lots of free favicon generators&lt;br /&gt;
#Name your new favicon &amp;quot;favicon.ico&amp;quot; and place it in your template directory&lt;br /&gt;
#Add the following code to your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; before the &amp;lt;/head&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;link rel=&amp;quot;icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Different appearance for survey-/question-pages==&lt;br /&gt;
&lt;br /&gt;
(&#039;&#039;Version 1.91 and newer&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
If you want LimeSurvey to change the appearance of every second page (i.e. of even and odd survey pages) you can use &#039;&#039;&#039;.page-odd&#039;&#039;&#039; class in your css file to change the appearance of odd pages.&lt;br /&gt;
&lt;br /&gt;
example from default template of LimeSurvey 1.91+&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
.page-odd table.question-group {&lt;br /&gt;
 background-color: #D2F2D3;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To &#039;&#039;&#039;not&#039;&#039;&#039; differentiate even and odd pages at the (default) template find all instances of &#039;&#039;.page-odd&#039;&#039; in template.css and remove those styles.&lt;br /&gt;
&lt;br /&gt;
==Create a vertical separator  border for dual scale array==&lt;br /&gt;
&lt;br /&gt;
To create a vertical separator border for a dual scale array you can add the following lines to your &#039;&#039;&#039;template.css&#039;&#039;&#039;-file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
table.question thead td.header_separator,&lt;br /&gt;
table.question tbody td.dual_scale_separator&lt;br /&gt;
{&lt;br /&gt;
   border-right:solid 1px #00A8E1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
header_separator is used to adress the separator for the header &amp;quot;td&amp;quot; and &amp;quot;dual_scale_separator&amp;quot; is used to adress the separator column in the dual scale array.&lt;br /&gt;
&lt;br /&gt;
==Hide the survey contact message shown on the start page/survey list==&lt;br /&gt;
&lt;br /&gt;
To hide the &amp;quot;Please contact ...&amp;quot; message on the start page (with the survey list) you can add the following to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.js&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$(&#039;#surveycontact&#039;).hide(); //Hides the survey contact message&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the survey contact message shown on error messages==&lt;br /&gt;
&lt;br /&gt;
If you want to remove the survey contact message from error messages it&#039;ll be trickier. You can add the following function call to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.css&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
removeContactAdressFromMessage(); //Removes the survey contact message from error messages&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and add the following function to your *template.js* file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
function removeContactAdressFromMessage()&lt;br /&gt;
{&lt;br /&gt;
if ($(&#039;#tokenmessage&#039;).length &amp;gt; 0)&lt;br /&gt;
   {&lt;br /&gt;
   var oldMessage = $(&#039;#tokenmessage&#039;).html();&lt;br /&gt;
   var indexContact = oldMessage.indexOf(&#039;Bitte kontaktieren&#039;);&lt;br /&gt;
   var newMessage = oldMessage.substr(0, indexContact);&lt;br /&gt;
   $(&#039;#tokenmessage&#039;).html(newMessage);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will probably not work for an englisch survey and have to be extended when using for multilingual surveys. But it&#039;s an idea/tip how to solve this.&lt;br /&gt;
&lt;br /&gt;
==How to deal with multilingual question attributes (before version 2.0 at which those were added)==&lt;br /&gt;
&lt;br /&gt;
If you have a multilingual survey and e. g. want to use a different string for the &amp;quot;other&amp;quot; field, this could only be done for the base language (until this feature was added at LimeSurvey 2.0). To work around this, paste in the field to change the label for &amp;quot;other&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;en&amp;quot;&amp;gt;New label&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;fr&amp;quot;&amp;gt;Nouveau label&amp;lt;/span&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the template.css of your template (at /limesurvey/upload/templates/&amp;lt;yourtemplatename&amp;gt;/template.css) add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;html:lang(en) .fr{display:none}&lt;br /&gt;
html:lang(fr) .en{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Theme_editor/1/pt&amp;diff=57622</id>
		<title>Translations:Theme editor/1/pt</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Theme_editor/1/pt&amp;diff=57622"/>
		<updated>2013-10-12T11:10:14Z</updated>

		<summary type="html">&lt;p&gt;Nery: Created page with &amp;quot;=Introdução=&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introdução=&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Theme_editor/pt&amp;diff=57621</id>
		<title>Theme editor/pt</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Theme_editor/pt&amp;diff=57621"/>
		<updated>2013-10-12T11:10:06Z</updated>

		<summary type="html">&lt;p&gt;Nery: Created page with &amp;quot;O editor de modelos&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
LimeSurvey has a basic template and style system providing a theme-like capability found in many browser-based applications.  They are simply termed &#039;&#039;&#039;Templates&#039;&#039;&#039; here.  The Templates allow control over the look and feel of pages during a survey.  A survey administrator can select the template to use for each survey to thus personalize that survey&#039;s look and feel.  Changes to a Template can be as simple as adding a unique logo on the welcome page, changing background colors, or maybe new text colors for specific types of questions.&lt;br /&gt;
&lt;br /&gt;
LimeSurvey comes with a set of templates right out of the box. These initial templates are defined by directories within the LimeSurvey installation &amp;quot;templates&amp;quot; directory.  Each template has it&#039;s own directory.  Within the main directory of a template are numerous files: &#039;&#039;&#039;templates (.pstpl)&#039;&#039;&#039;, &#039;&#039;&#039;cascading style sheets (.css)&#039;&#039;&#039;, &#039;&#039;&#039;images&#039;&#039;&#039; (&#039;&#039;&#039;.jpg&#039;&#039;&#039; or &#039;&#039;&#039;.png&#039;&#039;&#039;) and maybe others.&lt;br /&gt;
&lt;br /&gt;
Like in other theme-based systems, fragments of HTML code are stored in the .pstpl template files.  These fragments are read in and used to construct the page to display to the end user during the operation of a survey. Often &#039;&#039;&#039;keywords&#039;&#039;&#039; surrounded by curly braces are included in the files that are then replaced with the relevant text.  The following gives an example of a template file content and its result when used in a survey page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&amp;lt;font face=&#039;verdana&#039; color=&#039;red&#039;&amp;gt;{SURVEYNAME}&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;verdana&#039; color=&#039;blue&#039;&amp;gt;&amp;lt;u&amp;gt;{SURVEYDESCRIPTION}&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One gets a result that looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&#039;&#039;&#039;&amp;lt;span style=&#039;color:red&#039;&amp;gt;My New Survey&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;u&amp;gt;&amp;lt;span style=&#039;color:#0000ff&#039;&amp;gt;This is a survey written by me to find out what sort of chocolate people like.&amp;lt;/span&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Templates, being HTML code, tend to define the positioning and type of text to be displayed and similar structural features of the page.  They often reference or include other files.  Most reference a common cascading style sheets (CSS) file that defines the font style, color, size, background and similar parameters common to all pages in the survey. Style sheets reference HTML &#039;&#039;&#039;class&#039;&#039;&#039; parameters that are associated with the various types of objects in the HTML code.  This allows the style sheet to describe once how to display each of the many types of text or other objects that may appear in multiple places.  There are unique classes for each question type in LimeSurvey and thus giving detailed control over the appearance of each.  Image files, like logos or special progress-bar constructors, may be referenced as well in the Template file.  Finally, special Keywords in curly braces are replaced with text defined in the Survey for each of its corresponding language translations (for example, the Survey Title or Question Text for each language defined).&lt;br /&gt;
&lt;br /&gt;
If you create a new custom template, please consider contributing it back to the LimeSurvey community, and make it available to others. With your help, we can grow our repository of templates, surveys, and other ad-ons, to make LimeSurvey even better! See the shared [http://www.limesurvey.org/en/download-limesurvey-design-templates/com_josetta_menu_control_panel/viewcategory/9-survey-design-templates Template Repository]&lt;br /&gt;
&lt;br /&gt;
=Creating a new Template=&lt;br /&gt;
&lt;br /&gt;
To be able to create a new template (or edit an existing template), you need Template Editing user permission in LimeSurvey as well as permission to manipulate the files in the underlying operating system hosting your LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note of Warning:&#039;&#039;&#039; As template changes can affect all surveys in an installation, changes should be limited to those skilled in understanding general concepts in the code base. Templates are an advanced feature that can take some experimentation to get correct if you are not familiar with HTML code methods.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The preferred way to create a new template is through the Template Editor (see below) via the web Admin interface. Some people may like to work directly with template files so that they can use their favorite text editor instead of the web interface. In this case, still use the Template Editor to first create your new template. This will create a new base template with all the files you need in the LimeSurvey_web_root/upload/templates/your_new_template directory. From there you can use your text editor to manually adjust the template files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Permissions Note:&#039;&#039;&#039; on unix/linux systems, these template files will be owned by the group and user who the web server is running as (may be &amp;quot;www&amp;quot; for some systems). So make sure you have access to edit these files, and when you save them make sure they don&#039;t change ownership, so you can still use the web Template Editing interface if needed&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Template files may seem complex to understand at first. You have to likely understand HTML code, possibly Styles and Style Sheets, and have access to the underlying LimeSurvey installation files if the template files and directories are not editable. Copy an existing template to a new directory to play around with the content. This may help make the concept clearer.&lt;br /&gt;
&lt;br /&gt;
A number of the &#039;public&#039; elements of LimeSurvey can be adjusted by a series of templates. This section provides a very brief explanation of these templates.&lt;br /&gt;
&lt;br /&gt;
=The LimeSurvey Template Editor=&lt;br /&gt;
&lt;br /&gt;
To ease the understanding and quick update of a Template, LimeSurvey provides a &#039;&#039;&#039;Template Editor&#039;&#039;&#039; in the main &#039;&#039;&#039;administrative&#039;&#039;&#039; toolbar of the application.  This Template Editor is only available to users given the privilege in the User Security settings.  A template effects all surveys and can render a survey inoperable if not constructed properly.  So Template editing is thought best restricted to a very limited, knowledgeable set of users.  Having permission to enter the Template Editor is not enough though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The LimeSurvey Template Editor allows you to edit the contents of your templates online. Start the Template Editor by clicking on the &amp;quot;Template Editor&amp;quot; icon [[File:templates.png]] in the LimeSurvey Administration toolbar (Templates). The main screen is similar to the LimeSurvey Survey Administration screen. It allows you to select the template to edit/view. Once this has been selected you can then select from one of the different public survey pages. You are then presented with a list of the template files that make up that particular page.&lt;br /&gt;
&lt;br /&gt;
[[File:Template-editor-2013-7-10_11_38_16.png|center]]&lt;br /&gt;
&lt;br /&gt;
==The Template Menu==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Edit Icon:&#039;&#039;&#039; The &amp;quot;edit&amp;quot; icon indicates whether or not the template is editable. A blurred out icon indicates that the template is read only; a clickable icon indicates you may make modifications. To change the icon from blurred to clear, you have to modify the template&#039;s permissions.&lt;br /&gt;
*&#039;&#039;&#039;Import Template:&#039;&#039;&#039; Allows you to import a template.&lt;br /&gt;
*&#039;&#039;&#039;Export Template:&#039;&#039;&#039; Allows you to export the current template to a .zip-File.&lt;br /&gt;
*&#039;&#039;&#039;Copy Template:&#039;&#039;&#039; Allows you to make a new template by copying the current one.&lt;br /&gt;
*&#039;&#039;&#039;Rename this template:&#039;&#039;&#039; Allows you to change the name of the template.  Generally used after copying an existing template or importing a template by manipulating the underlying directories.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Screen&amp;quot; drop-down list on the right allows you to choose which particular survey page you are currently looking at.&lt;br /&gt;
&lt;br /&gt;
==Import/Export/Copy a Template==&lt;br /&gt;
&lt;br /&gt;
When you &#039;&#039;&#039;export &#039;&#039;&#039;a template, this will create a zip-file archive with all the files your template consists of (.pstpl files, images, css files, ...). You can simply &#039;&#039;&#039;import &#039;&#039;&#039;the exported zip-file at other LimeSurvey systems by using the import feature or you can manually copy the archive to another installation and extract it into the corresponding template directory there. If you copy the template in the same installation, you will need to rename the folder to create another named copy of that template.&lt;br /&gt;
&lt;br /&gt;
If the file and directory permissions are open for the LimeSurvey application to write, then you can use the programs &#039;&#039;&#039;copy &#039;&#039;&#039;and rename features to make a local copy of a template.&lt;br /&gt;
&lt;br /&gt;
==Page Structure / Template Use==&lt;br /&gt;
*&#039;&#039;&#039;The Welcome Page:&#039;&#039;&#039; startpage.pstpl, welcome.pstpl, privacy.pstpl,  navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Questions Pages:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, startgroup.pstpl, groupdescription.pstpl, question.pstpl, endgroup.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Submit Page:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, submit.pstpl, (privacy.pstpl), navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Final Page:&#039;&#039;&#039; startpage.pstpl, assessment.pstpl, completed.pstpl, endpage.pstpl&lt;br /&gt;
&lt;br /&gt;
==Template Files==&lt;br /&gt;
&lt;br /&gt;
The following template files are used to produce your public survey and must exist in any new template folder you create:&lt;br /&gt;
*&#039;&#039;&#039;startpage.pstpl:&#039;&#039;&#039; Produces the start of each html page. It starts at the &amp;quot;&amp;lt;head&amp;gt;&amp;quot; tag, and should not contain the &amp;quot;&amp;lt;html&amp;gt;&amp;quot; tag. This &#039;very beginning&#039; of a standard html page is written by the scripts. Please ensure that your startpage.pstpl files contains a &amp;lt;body&amp;gt; tag, even though many browsers do not require strict adherence to the W3 HTML stanards, the LimeSurvey script needs to find a &amp;lt;body&amp;gt; tag, to run certain javascript elements. It is not expected that many &#039;keywords&#039; will be used in the startpage.pstpl file, however you may wish to put the {SURVEYNAME} into the title. The startpage.pstpl file can contain code that ends in the corresponding endpage.pstpl file, so you can start a table in this file and close the table in the endpage.pstpl file. The startpage.pstpl and endpage.pstpl files wrap around every possible page used by LimeSurvey.&lt;br /&gt;
*&#039;&#039;&#039;survey.pstpl:&#039;&#039;&#039; This template is the second used on most pages, and provides a space to put the survey name and description. This template does not have a corresponding &#039;closing&#039; template, and subsequently you should close all tags opened in this template file (ie: don&#039;t leave a table open here because there is nowhere else to close it)&lt;br /&gt;
*&#039;&#039;&#039;welcome.pstpl:&#039;&#039;&#039; This template is only used in the welcome screen (which is also on the main page for &#039;all in one&#039; surveys). You can use this to print out the welcome text, and other information that should be provided in the introduction. Like the &#039;survey.pstpl&#039; file, there is no corresponding &#039;closing&#039; template, so all tags opened in this template file should be closed as well.&lt;br /&gt;
*&#039;&#039;&#039;startgroup.pstpl:&#039;&#039;&#039; This template can provide a &#039;summary&#039; wrap around for questions within a group. It has a matching &#039;endgroup.pstpl&#039; template that can be used to close any opened tags in this file, so you can open a table within this.&lt;br /&gt;
*&#039;&#039;&#039;groupdescription.pstpl:&#039;&#039;&#039; This template file is used to display a description of a group. It is separate to the startgroup.pstpl file because in a &amp;quot;question by question&amp;quot; survey it will be displayed on its own unique page in between groups, whereas in a &amp;quot;group by group&amp;quot; or &amp;quot;all in one&amp;quot; survey it provides a header to the subsequent questions. groupdescription.pstpl does not have a corresponding &#039;closing&#039; template file, so all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question.pstpl:&#039;&#039;&#039; This file contains the question, answer and help text sections of your survey, and in the &amp;quot;group by group&amp;quot; and &amp;quot;all in one&amp;quot; surveys this template is cycled repeatedly with each question. There is no corresponding closing file for this and all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question_start.pstpl:&#039;&#039;&#039; This file contains the individual elements found at the start of a question. It is included within &#039;question.pstpl&#039; via the {QUESTION} keyword. It is intended to allow template designers more control over the layout of a question. This template sits outside the normal templating system and &#039;&#039;&#039;was superseeded (as of LS1.87)&#039;&#039;&#039;. All keywords from this template are now available directly in question.pstpl. NOTE: templates using question_start.pstpl will still work at least for a couple more versions of LS 1.x&lt;br /&gt;
*&#039;&#039;&#039;submit.pstpl (and privacy.pstpl):&#039;&#039;&#039; This page is the penultimate page for all types of survey (except the &amp;quot;all in one&amp;quot; type) where the participant is given an option to review questions before submitting their responses. It provides privacy information where a survey is anonymous, which it extracts from the &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039; file.&lt;br /&gt;
*&#039;&#039;&#039;completed.pstpl:&#039;&#039;&#039; This page is displayed as the final page when the survey responses have been saved and the survey is over. It can be used to display a &amp;quot;forwarding link&amp;quot; as set in the survey setup.&lt;br /&gt;
*&#039;&#039;&#039;endgroup.pstpl:&#039;&#039;&#039; This file closes the group, and can be used to close off any tags opened in the startgroup.pstpl file&lt;br /&gt;
*&#039;&#039;&#039;navigator.pstpl:&#039;&#039;&#039; This file contains the buttons that navigate through the survey, &amp;quot;next&amp;quot;, &amp;quot;prev&amp;quot;, &amp;quot;last&amp;quot;, &amp;quot;submit&amp;quot;, &amp;quot;save so far&amp;quot;  and the &amp;quot;clear all&amp;quot; link. It is used in all pages except the completed page.&lt;br /&gt;
*&#039;&#039;&#039;printanswers.pstpl:&#039;&#039;&#039; This file has the HTML wrapper for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_group.pstpl:&#039;&#039;&#039; This file is the same as startgroup.pstpl endgroup.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_question.pstpl:&#039;&#039;&#039; This file is the same as question.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_survey.pstpl:&#039;&#039;&#039; This file is the same as survey.pstpl but for the print version of the survey.&lt;br /&gt;
&lt;br /&gt;
== CSS and Javascript==&lt;br /&gt;
&lt;br /&gt;
Two files are allways used for template : template.css for css and template.js for javascript.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATECSS}:&#039;&#039;&#039; Add lines for default css, template.css and template-rtl.css for rtl language.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATEJS}:&#039;&#039;&#039; Add lines for default javascript files, template.js and all js files needed for LimeSurvey.&lt;br /&gt;
&lt;br /&gt;
=== Replacing default css or javascript===&lt;br /&gt;
&lt;br /&gt;
Some question use specific files for javascript or css. You can use your own files. All files used in your survey included in ./scripts or in .//styles-public can be replaced, just put a file with the same name in your template.&lt;br /&gt;
&lt;br /&gt;
==Other Template Files==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;invitationemail.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;reminderemail.pstpl&#039;&#039;&#039; and &#039;&#039;&#039;confirmationemail.pstpl&#039;&#039;&#039; are no longer used by LimeSurvey and defaults are instead set in the applicable language files. The email messages can now be edited on a survey by survey basis.&lt;br /&gt;
&lt;br /&gt;
==Standard Pages==&lt;br /&gt;
&lt;br /&gt;
There are ten standard pages that a survey participant may see in the course of taking or accessing the LimeSurvey application.  Each is constructed from a number of common &#039;&#039;&#039;Template&#039;&#039;&#039; files from the &#039;&#039;&#039;Template&#039;&#039;&#039; specified in the survey&#039;s settings.  The table below indicates which template files are used in constructing each of these pages.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!  &#039;&#039;&#039;Survey Pages:&#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039;Template Files&#039;&#039;&#039;!!Survey&amp;lt;br /&amp;gt;List!!Welcome!!Question!!Completed!!Clear All!!Register!!Load!!Save!!Print&amp;lt;br /&amp;gt;Answers!!Print&amp;lt;br /&amp;gt;Survey&lt;br /&gt;
|-&lt;br /&gt;
|SurveyList||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Welcome|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Privacy|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Navigator|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Survey|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|StartGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|GroupDescription|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Question&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|EndGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Assessment|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Completed|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|ClearAll|| || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Register|| || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Load|| || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||&lt;br /&gt;
|-&lt;br /&gt;
|Save|| || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| ||&lt;br /&gt;
|-&lt;br /&gt;
|PrintAnswers|| || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||&lt;br /&gt;
|-&lt;br /&gt;
|Print Survey || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Group || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Question || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|StartPage&amp;lt;br /&amp;gt;EndPage&amp;lt;br /&amp;gt;Template.css||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In versions 1.90 and up this replaces question.pstpl AND question_start.pstpl. If you are using an old custom template, you need to add the following line to the beginning of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div {QUESTION_ESSENTIALS} class=&amp;quot;{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;And then add the corresponding closing tag to the end of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In version 1.91 and earlier, LimeSurvey js files are not included by the template. In version 2, &#039;&#039;&#039;you have to use {TEMPLATEJS} in your one of your template file&#039;&#039;&#039; to add the link to the js file. You can add it in startpage.pstpl or in endpage.pstpl. You can remove the {TEMPLATEURL}/template.js line and you have to replace with {TEMPLATEJS} to update a personal template.&lt;br /&gt;
&lt;br /&gt;
==The File Control Section==&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;file control&amp;quot; window on the left, you can click on one of the template files that is used to compile the page. The HTML code for that file will then appear in the &amp;quot;Now editing&amp;quot; window in the center. If the template is editable (determined by directory permissions) you can then make any changes and save them.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Other Files&amp;quot; window shows a list of all other files in the template directory. You can use the right side to &#039;&#039;&#039;upload and select image files (your pics, logos,...) or other files needed to create your template&#039;&#039;&#039;. Note: Instead of a link directly to each picture in your template you can use the field string {TEMPLATEURL}.  So instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;/limesurvey/templates/yourtemplate/mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
You can use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;{TEMPLATEURL}mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;sample&amp;quot; of the template page you are editing will be visible at the bottom of the screen. There is no way to to delete a template from the template editor. This must be done by accessing the underlying directory and deleting the file there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; The shipped templates cannot be edited using the Template Editor and should never be changed. If you want to modify them, create a copy first and modify the copy.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Location of template files==&lt;br /&gt;
&lt;br /&gt;
LimeSurvey stores each of the &#039;standard&#039; templates in their own distinct sub-directory within the /templates directory that is kept in the public directory with the other LimeSurvey public files. Customized user templates are stored in the /upload/templates directory.&lt;br /&gt;
&lt;br /&gt;
To create a new template, use the according icon in the template editor.&lt;br /&gt;
&lt;br /&gt;
There should ALWAYS be a &amp;quot;default&amp;quot; directory in the templates directory. This template is used by default and as a fall-back if a template folder doesn&#039;t exist, or can&#039;t be found. The &amp;quot;default&amp;quot; directory comes with the package.&lt;br /&gt;
&lt;br /&gt;
You can use any image files that you upload into the template management area with syntax like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;{TEMPLATEURL}filename.xyz&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Styling questions with CSS=&lt;br /&gt;
&lt;br /&gt;
Styling of questions in CSS has become much easier. Each question type now has a unique class. Mandatory question&#039;s also have an additional mandatory class. For example, for a non-mandatory question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and if the question is mandatory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and if the question is mandatory but the user didn&#039;t answer it or if there is validation on a question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and if the question has validation applied but the user hasn&#039;t answered correctly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question6&amp;quot; class=&amp;quot;text-short input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Global classes for question part==&lt;br /&gt;
&lt;br /&gt;
These classes are used for each question type. Some question types use only one or two class, but others can use much more.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable alternance&amp;quot;&lt;br /&gt;
|+ Global classes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Class name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Part&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Question type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Examples&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Note&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question&lt;br /&gt;
| All question block&lt;br /&gt;
| All question type&lt;br /&gt;
|&amp;amp;lt;p class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;ul class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;question&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .subquestions-list&lt;br /&gt;
| List of subquestion&lt;br /&gt;
| Multi choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;subquestions-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;subquestions-list&amp;quot;&amp;gt;&lt;br /&gt;
| .questions-list is used too&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answers-list&lt;br /&gt;
| List of answers&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;answers-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;answers-list&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answer-item&lt;br /&gt;
| The answer part: one answer&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;answer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;answer-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .noanswer-item&lt;br /&gt;
| The answer part for no answer&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;noanswer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
| No answer is an answer too, then have double class noanswer-item and answer-item&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question-item&lt;br /&gt;
| The question part: one question&lt;br /&gt;
| Multi text question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;question-item&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;question-item&amp;quot;&amp;gt;&lt;br /&gt;
| Some answer are question too, then we have a lot of class=&amp;quot;question-item answer-item&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-list&lt;br /&gt;
| A list of checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;checkbox-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;checkbox-list&amp;quot;&amp;gt;&lt;br /&gt;
| Some question type have multi list class: like checkbox with comment : class=&amp;quot;checkbox-list text-list&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-item&lt;br /&gt;
| The answer part with a checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;checkbox-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;checkbox-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-list&lt;br /&gt;
| A list of radio item&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;radio-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;radio-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-item&lt;br /&gt;
| The answer part with a radio&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;radio-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;radio-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-list&lt;br /&gt;
| A list of text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-item&lt;br /&gt;
| The answer part of a text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;text-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;text-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-list&lt;br /&gt;
| A list of text input with numeric only answer&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-item&lt;br /&gt;
| The answer part of a numeric input&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;numeric-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;numeric-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-list&lt;br /&gt;
| A list of select&lt;br /&gt;
| Array numbers, Dual scale array (select)&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;select-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-item&lt;br /&gt;
| The answer part of a select&lt;br /&gt;
| Array numbers, Dual scale array (select), single choice with select&lt;br /&gt;
| &amp;amp;lt;p class=&amp;quot;select-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;select-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .hide&lt;br /&gt;
| Used for accessibility: hidden with css but read by screenreader&lt;br /&gt;
| Short text question&lt;br /&gt;
| &amp;amp;lt;label class=&amp;quot;hide&amp;quot;&amp;gt;&lt;br /&gt;
| Can be used for other purpose&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .dontread&lt;br /&gt;
| Used for accessibility: not be read by screenreader&lt;br /&gt;
| Array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;dontread&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox&lt;br /&gt;
| input[type=checkbox]&lt;br /&gt;
| Question with checkbox&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;checkbox&amp;quot; class=&amp;quot;checkbox&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio&lt;br /&gt;
| input[type=radio]&lt;br /&gt;
| Question with radio&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;radio&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text&lt;br /&gt;
| input[type=text]&lt;br /&gt;
| Question with input text, or textarea&lt;br /&gt;
| &amp;amp;lt;textarea class=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answertext&lt;br /&gt;
| Array question type&lt;br /&gt;
| Answer part of array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;answertext&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .col-answers&lt;br /&gt;
| Array question type&lt;br /&gt;
| Column of answers&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .array1 .array2&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for line&lt;br /&gt;
| &amp;amp;lt;tr class=&amp;quot;array1&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Some example of question part with classes===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;text-short question type:&#039;&#039;&#039;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;question answer-item text-item &amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label class=&amp;quot;hide label&amp;quot; for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Answer&amp;lt;/label&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;50&amp;quot; class=&amp;quot;text  empty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Multiple short text&#039;&#039;&#039;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul class=&amp;quot;subquestions-list questions-list text-list&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li class=&amp;quot;question-item answer-item text-item&amp;quot; id=&amp;quot;javatbdSGQA&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Some example subquestion&amp;lt;/label&amp;gt;&lt;br /&gt;
     &amp;lt;span&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;20&amp;quot; class=&amp;quot;text empty&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Array question type&#039;&#039;&#039;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;question subquestion-list questions-list &amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;caption class=&amp;quot;hide read&amp;quot;&amp;gt;Some explanation for accessibility.&amp;lt;/caption&amp;gt;&lt;br /&gt;
	&amp;lt;colgroup class=&amp;quot;col-responses&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;50%&amp;quot; class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;25%&amp;quot; class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;13.3%&amp;quot; class=&amp;quot;col-no-answer even&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/colgroup&amp;gt;&lt;br /&gt;
	&amp;lt;thead&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array1 dontread&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;No answer&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/thead&amp;gt;&lt;br /&gt;
	&amp;lt;tbody&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array2 answers-list radio-list&amp;quot; id=&amp;quot;javatbdSGQ&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;20%&amp;quot; class=&amp;quot;answertext&amp;quot;&amp;gt;Some example subquestion&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer_cell_001 answer-item radio-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;1&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;1&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer-item radio-item noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;No answer&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==The full list of question classes==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Question Type&#039;&#039;&#039;||&#039;&#039;&#039;Question Class&#039;&#039;&#039;||&#039;&#039;&#039;Question ID&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|5 point choice||.choice-5-pt-radio||5&lt;br /&gt;
|-&lt;br /&gt;
|Array (10 point choice)||.array-10-pt||B&lt;br /&gt;
|-&lt;br /&gt;
|Array (5 point choice)||.array-5-pt||A&lt;br /&gt;
|-&lt;br /&gt;
|Array (Flexible Labels) dual scale||.array-flexible-duel-scale ||1&lt;br /&gt;
|-&lt;br /&gt;
|Array (Increase, Same, Decrease)||.array-increase-same-decrease||E&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Numbers)||.array-multi-flexi ||:&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Text)||.array-multi-flexi-text||;&lt;br /&gt;
|-&lt;br /&gt;
|Array (Yes/No/Uncertain)||.array-yes-uncertain-no||C&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels)||.array-flexible-row ||F&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels) by column||.array-flexible-column||H&lt;br /&gt;
|-&lt;br /&gt;
|Boilerplate question||.boilerplate||X&lt;br /&gt;
|-&lt;br /&gt;
|Date||.date||D&lt;br /&gt;
|-&lt;br /&gt;
|Gender||.gender||G&lt;br /&gt;
|-&lt;br /&gt;
|Huge free text||.text-huge||U&lt;br /&gt;
|-&lt;br /&gt;
|Language switch||.language||I&lt;br /&gt;
|-&lt;br /&gt;
|List (dropdown)||.list-dropdown||!&lt;br /&gt;
|-&lt;br /&gt;
|List (radio)||.list-radio||L&lt;br /&gt;
|-&lt;br /&gt;
|List with comment||.list-with-comment||O&lt;br /&gt;
|-&lt;br /&gt;
|Long free text||.text-long||T&lt;br /&gt;
|-&lt;br /&gt;
|Multiple numerical input||.numeric-multi||K&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options||.multiple-opt||M&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options with comments||.multiple-opt-comments||P&lt;br /&gt;
|-&lt;br /&gt;
|Multiple short text||.multiple-short-txt||Q&lt;br /&gt;
|-&lt;br /&gt;
|Numerical input||.numeric||N&lt;br /&gt;
|-&lt;br /&gt;
|Ranking||.ranking||R&lt;br /&gt;
|-&lt;br /&gt;
|Short free text||.text-short||S&lt;br /&gt;
|-&lt;br /&gt;
|Yes/No||.yes-no||Y&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The full list of validation classes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Note:  Prior to 1.92, only .mandatory and .input-error classes were available.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These apply to the help and/or validation tip messages so that each type can be individually styled.&lt;br /&gt;
&lt;br /&gt;
The .hide-tip option and .input-error options, by default, interact so that you can have validation tips start hidden, but appear when there validation errors, and disappear again when those errors are rectified.&lt;br /&gt;
&lt;br /&gt;
All of these are designed to eliminate the need for pop-up alert messages.  Instead, tips can appear/disappear as needed, and are color-coded to indicate whether the answers pass the validation criteria.&lt;br /&gt;
&lt;br /&gt;
Furthermore, when you first visit a page that has unmet validation criteria, you can color-code the tips in a pleasing color to show which validation criteria have not been med; then re-display the page using a harsher color if the person submits the page with lingering validation errors.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Purpose&#039;&#039;&#039;||&#039;&#039;&#039;CSS Class&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Mandatory||.mandatory||the question is mandatory&lt;br /&gt;
|-&lt;br /&gt;
|User input error||.input-error||the question had at least one validation error&lt;br /&gt;
|-&lt;br /&gt;
|Hide Tip||.hide-tip||added if you use the hide_tip option&lt;br /&gt;
|-&lt;br /&gt;
|Num answers||.em_num_answers||for for min_answers and max_answers&lt;br /&gt;
|-&lt;br /&gt;
|Value range||.em_value_range||for min/max_num_value_n and multiflexible_min/max&lt;br /&gt;
|-&lt;br /&gt;
|Sum range||.em_sum_range||for min/max/equals_num_value&lt;br /&gt;
|-&lt;br /&gt;
|Regex validation||.em_regex_validation||for regular-expression validation of the question&lt;br /&gt;
|-&lt;br /&gt;
|Question-level validation function||.em_q_fn_validation||for the em_validation_q option&lt;br /&gt;
|-&lt;br /&gt;
|Subquestion-level validation function||.em_sq_fn_validation||for the em_validation_sq option&lt;br /&gt;
|-&lt;br /&gt;
|Other comment mandatory||.em_other_comment_mandatory||for other_comment_mandatory option - shows when &amp;quot;other&amp;quot; is selected but associated comment is missing.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Importing styles into your custom template==&lt;br /&gt;
&lt;br /&gt;
The custom question styles are near the bottom of each template&#039;s CSS file and start with:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;/* --------------------------- START: Question styles  ------------------------------ */&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re styling your own custom template, you should be able to copy everything after the above from templates/default/template.css (for tables based layouts) or /templates/limespired/template.css (for CSS based layouts) into your own style sheet without any impact on your other styles.&lt;br /&gt;
&lt;br /&gt;
==Internet Explorer conditional style sheets==&lt;br /&gt;
&lt;br /&gt;
Because of the marked discrepancies in rendering between IE6, IE7 and most other browsers, there are special IE conditional style sheets included for each template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_all-versions.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if lt IE 7]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_older-than-7.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8]&amp;gt;&lt;br /&gt;
		&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}ie_fix_8.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should include the above code within your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; and copies of both the IE style sheets from either /templates/default/ or /templates/limespired for Tables base layout and CSS based layout respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; If you copy the styles into your own style sheet you will almost certainly need to tweak them.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alternative solution for Internet explorer===&lt;br /&gt;
&lt;br /&gt;
You can put conditional class for body in startpage.pstpl, and use this class in your template.css. This method is used in citronade template. Adding a js / no-js class to to have javascript / no javascript system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;!--[if lt IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie6 ielt7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie8 ielt9  no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 9 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if gt IE 9]&amp;gt;&amp;lt;!--&amp;gt;&amp;lt;body id=&amp;quot;body&amp;quot; class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} no-js&amp;quot;&amp;gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;script type=&#039;text/javascript&#039;&amp;gt;/*&amp;lt;![CDATA[*/(function(H){ H.className=H.className.replace(/\bno-js\b/,&#039;js&#039;) })(document.getElementsByTagName(&#039;body&#039;)[0]);/*]]&amp;gt;*/&amp;lt;/script&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And in template.css use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;.ie6{/*specific for internet explorer 6*/}&lt;br /&gt;
.ielt8{/*specific for internet explorer 6 and 7*/}&lt;br /&gt;
.ie{/*specific for all internet explorer */}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Right-to-Left (RTL) Languages and justify==&lt;br /&gt;
&lt;br /&gt;
The text editor within LimeSurvey is able to format RTL Text. However, the editor itself shows the RTL language in a left to right format when justified.  This is just an editor display issue. The RTL and justified question or text will display correctly from right to left, even when justified, in your survey or on preview.&lt;br /&gt;
&lt;br /&gt;
==Keywords==&lt;br /&gt;
&lt;br /&gt;
Keywords within a template file get replaced by the current survey information. They are surrounded by curly brackets, for example: {SURVEYNAME}&lt;br /&gt;
&lt;br /&gt;
The following strings will be replaced by LimeSurvey when parsing the template file and presenting it to survey users. These field strings will work on almost every template except for the &#039;Completed Page&#039;. (Most of these strings can be found in the common.php file. If it&#039;s not there, look in the index.php file.)&lt;br /&gt;
&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
!&#039;&#039;&#039;Keyword&#039;&#039;&#039;!!&#039;&#039;&#039;Template files&#039;&#039;&#039;!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||All Files||The survey title&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||All Files||The survey description&lt;br /&gt;
|-&lt;br /&gt;
|{WELCOME}||All files (mainly for welcome.pstpl)||The survey &#039;welcome&#039; text&lt;br /&gt;
|-&lt;br /&gt;
|{PERCENTCOMPLETE}||survey.pstpl||A small graph showing the percentage of the survey completed&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPNAME}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group name&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPDESCRIPTION}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group description&lt;br /&gt;
|-&lt;br /&gt;
|{NUMBEROFQUESTIONS}||welcome.pstpl||Displays the total number of questions in the survey (just the number)&lt;br /&gt;
|-&lt;br /&gt;
|{THEREAREXQUESTIONS}||welcome.pstpl||Displays the sentence &amp;quot;There are X questions in this survey&amp;quot; - from the relevant language file. The X is replaced with the number of questions. Note that this will also work appropriately for singular or plural. If there is only 1 question, it will print &amp;quot;There is 1 question in this survey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|{CHECKJAVASCRIPT}||All files (mainly for welcome.pstpl)||Warning message when end-user browser have javascript disabled&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION}||Question.pstpl||(&#039;&#039;&#039;Has been superseeded but the {QUESTION_...} keywords as of LS1.87&#039;&#039;&#039;) Displays the current question text (The format of {QUESTION} can customised by editing &#039;question_start.pstpl&#039;) Use the following: {QUESTION_TEXT}, {QUESTION_MANDATORY}, {QUESTION_HELP}, {QUESTION_MAN_MESSAGE}, {QUESTION_VALID_MESSAGE} and {QUESTION_INPUT_ERROR_CLASS} and appropriate wrapping HTML instead of {QUESTION}&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWER}||question.pstpl, print_question.pstpl||presents the answer form for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{SGQ}||question.pstpl, question text||Can be used in the question text itself, to reference the input field of the question dynamically by displaying the Survey-Group-Question id for the current question. (as of svn build 9755)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTIONHELP}||question.pstpl, print_question.pstpl||Displays help text (predefined tip for question type) for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CLASS}||question.pstpl, print_question.pstpl||unique class for each question type. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CODE}||question.pstpl, print_question.pstpl||Displays the current question code&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ESSENTIALS}||question.pstpl||the question ID and (if a question is conditional), &#039;style=&amp;quot;display:none;&amp;quot;&#039;. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_HELP}||question.pstp, question_start.pstpl||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TYPE_HELP}||print_question.pstp||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_INPUT_ERROR_CLASS}||question.pstp, question_start.pstpl||Provides a class if there was user input error&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ID}||print_question.pstp||Provides a unique ID for each question to allow styling for specific questions&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TEXT}||question.pstp, print_question.pstp, question_start.pstpl||Displays the text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MANDATORY}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_CLASS}||question.pstpl, print_question.pstpl||class if a question is mandatory. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_NUMBER}||print_question.pstpl||Incremental count of questions.&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_VALID_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated valid help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_SCENARIO}||print_question.pstp||Prints out the &#039;scenario&#039; text for conditional questions.&lt;br /&gt;
|-&lt;br /&gt;
|{NAVIGATOR}||navigator.pstpl||Displays navigation buttons (next, prev, last)&lt;br /&gt;
|-&lt;br /&gt;
|{CLEARALL}||All files (but intended for navigator.pstpl)||Displays the &amp;quot;Exit and Clear Results&amp;quot; link&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITBUTTON}||submit.pstpl||Displays the final submit button&lt;br /&gt;
|-&lt;br /&gt;
|{COMPLETED}||completed.pstpl||Displays the &#039;completed&#039; message for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{URL}||completed.pstpl||Displays the survey &#039;url&#039; and &#039;url text&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACY}||submit.pstpl||Displays privacy information when survey is anonymous&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACYMESSAGE}||privacy.pstpl||The privacy message is shown if you set your survey to be anonymous. [[Translating LimeSurvey|The text can be edited/translated]] in the language files. This can also be changed manually by editing the privacy.pstpl template you wish to use.&lt;br /&gt;
|-&lt;br /&gt;
|{TEMPLATEURL}||All Files||The URL to the current template location (useful for referencing image files in your template)&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITCOMPLETE}||endpage.pstpl||The statement (from the language files) that tells the user they have completed the survey, and to press the &amp;quot;Submit&amp;quot; button&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITREVIEW}||survey.pstpl||The statement (from the language files) that tells the user they can review/change the answers they have made by clicking &amp;quot;&amp;lt;&amp;lt; prev&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users first name from the tokens table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users last name from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:EMAIL}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users email from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_1 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_2 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERSCLEARED}||Preferably in navigator.pstpl||The &amp;quot;Answers Cleared&amp;quot; statement from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{RESTART}||clearall.pstpl||URL to restart the survey&lt;br /&gt;
|-&lt;br /&gt;
|{CLOSEWINDOW}||All Files (Preferably in navigator.pstpl)||URL to close current window&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERERROR}||register.pstpl||Shows any error messages in the register page (ie: &amp;quot;You must include an email address&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE1}||register.pstpl||The statement &amp;quot;You must be registered to complete this survey&amp;quot; from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE2}||register.pstpl||Details about registering from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERFORM}||register.pstpl||The actual form for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{SAVE}||Works suitable on navigator.pstpl||Displays the &#039;Save your responses so far&#039; button to offer the user to save and come back later to continue the survey. If the Save option is deactivated in the survey properties the tag will not be shown and ignored.&lt;br /&gt;
|-&lt;br /&gt;
|{LANGUAGECHANGER}||survey.pstpl||Displays a switch in multilingual surveys to change the question.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Input/Buttons==&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;input&amp;quot; type in a survey has been given its own class name, so that you can add CSS to your &amp;quot;startpage.pstpl&amp;quot; file, and have some control over the appearance of form buttons and inputs. These class names are as follows:&lt;br /&gt;
*&#039;&#039;&#039;submit&#039;&#039;&#039; (Submit Buttons)&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; (Text Inputs - for short free text, date and numerical type)&lt;br /&gt;
*&#039;&#039;&#039;answertext&#039;&#039;&#039; (Text of answers)&lt;br /&gt;
*&#039;&#039;&#039;radio&#039;&#039;&#039; (Radio Buttons)&lt;br /&gt;
*&#039;&#039;&#039;checkbox&#039;&#039;&#039; (Check Boxes)&lt;br /&gt;
*&#039;&#039;&#039;select&#039;&#039;&#039; (Select / List Boxes)&lt;br /&gt;
*&#039;&#039;&#039;textarea&#039;&#039;&#039; (Large text inputs - for long free text)&lt;br /&gt;
*&#039;&#039;&#039;clearall&#039;&#039;&#039; (The &amp;quot;Exit and Clear Survey&amp;quot; link)&lt;br /&gt;
*&#039;&#039;&#039;rank&#039;&#039;&#039; (The rank style question. Doesn&#039;t set the colour of the select box or the text boxes (these are set by relevant section above) but does allow changing of background colour, text colour and size etc for the rest of the ranking question)&lt;br /&gt;
*&#039;&#039;&#039;graph&#039;&#039;&#039; (The &amp;quot;percentage completed&amp;quot; graph table)&lt;br /&gt;
*&#039;&#039;&#039;innergraph&#039;&#039;&#039; (The table inside the graph table - this contains the 0% and 100% text. Use this for changing the size of this text)&lt;br /&gt;
*&#039;&#039;&#039;question&#039;&#039;&#039; (General settings for any question that is displayed within a table. Generally you should use this to make sure that their font size and colour is the same as you have used elsewhere as a default)&lt;br /&gt;
*&#039;&#039;&#039;mandatory&#039;&#039;&#039;  (Mandatory questions)&lt;br /&gt;
*&#039;&#039;&#039;input-error&#039;&#039;&#039; (User input error - for if a user has made a mistake with a mandatory question or question with validation)&lt;br /&gt;
*&#039;&#039;&#039;array1&#039;&#039;&#039; and &#039;&#039;&#039;array2&#039;&#039;&#039; (These two styles are cycled when presenting the range of answers for an array type question. This allows you to set an alternating background colour for these question types. &#039;&#039;&#039;Array1&#039;&#039;&#039; is also used for the column headings in these question types)&lt;br /&gt;
*&#039;&#039;&#039;errormandatory&#039;&#039;&#039; (Sets the colour and style of the &amp;quot;This question is mandatory&amp;quot; error message)&lt;br /&gt;
*&#039;&#039;&#039;warningjs&#039;&#039;&#039; (Sets the colour and style of the warning message displayed if the participant&#039;s browser has javascript disabled)&lt;br /&gt;
&lt;br /&gt;
There are also some elements that can be accessed using the ID of the element (&#039;&#039;&#039;#ID&#039;&#039;&#039; in CSS):&lt;br /&gt;
*&#039;&#039;&#039;surveycontact&#039;&#039;&#039; (The contact message shown on the start page)&lt;br /&gt;
*&#039;&#039;&#039;tokenmessage&#039;&#039;&#039; (used for messages inside the survey, e.g. the session expired error message)&lt;br /&gt;
&lt;br /&gt;
An example of using these classes with style sheets can be found in the &amp;quot;bubblegum&amp;quot; template that comes with the LimeSurvey application.&lt;br /&gt;
&lt;br /&gt;
Because you can edit all the HTML aspects, there&#039;s no reason to surround your templates with a &amp;lt;div class=&#039;new_name&#039;&amp;gt; and then define a css for that new_name class.&lt;br /&gt;
&lt;br /&gt;
==Styling the progress bar==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before version 1.87:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The chart.jpg file is a simple one pixel image file which is used to create the progress bar image in the &#039;PERCENTCOMPLETE&#039; table. If the file does not exist, LimeSurvey will use the default &#039;maroon&#039; coloured image in the public directory. If you want to create a bar to match your own colour scheme, then you should save the color in this file. Remember it should be a &#039;&#039;&#039;JPEG&#039;&#039;&#039; file, 1 pixel x 1 pixel, in the colour desired.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The progress bar appearance can be modified with CSS.&lt;br /&gt;
&lt;br /&gt;
To change the background colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-header {&lt;br /&gt;
 background-color: #3300FF;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the border colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-content,&lt;br /&gt;
#progress-wrapper .ui-widget-header {&lt;br /&gt;
 border: 1px solid #FF0000;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advanced Features Available to Developers==&lt;br /&gt;
&lt;br /&gt;
Starting with version 0.99, LimeSurvey has integrated some user-made patches that allow for some special changes.  These very advanced features generally require changes to the underlying code base of LimeSurvey and should be done carefully so as not to introduce security holes.&lt;br /&gt;
&lt;br /&gt;
===Basic CMS Integration support===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Deprecated: This function is not available anymore in version 2.0 or later&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To be able to integrate LimeSurvey into another CMS, use the following options in &#039;&#039;&#039;config.php&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
// Set $embedded to true and specify the header and footer functions if the survey is to be displayed embedded in a CMS&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$embedded = false;&lt;br /&gt;
$embedded_inc = &amp;quot;&amp;quot;;               // path to the header to include if any&lt;br /&gt;
$embedded_headerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteHeader for geeklog&lt;br /&gt;
$embedded_footerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteFooter for geeklog&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set &#039;&#039;&#039;$embedded = true;&#039;&#039;&#039; to enable CMS-embedding. By using the &#039;&#039;&#039;$embedded_inc&#039;&#039;&#039; variable one can include their own &#039;&#039;&#039;.php&#039;&#039;&#039; files.  By setting &#039;&#039;&#039;$embedded_headerfunc&#039;&#039;&#039; or &#039;&#039;&#039;$embedded_footerfunc&#039;&#039;&#039;, one can call functions from within included files that output the relevant headers or footers instead of LimeSurveys default ones.&lt;br /&gt;
&lt;br /&gt;
===Support for your own Javascript functions===&lt;br /&gt;
&lt;br /&gt;
Some users may need to run Javascript on the survey pages, but calling &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; in the BODY element made it impossible to do so.  This call has been replaced with a small JavaScript function in the HEAD that sniffs for the existence of &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; and &#039;&#039;&#039;template_onload()&#039;&#039;&#039; before calling each.  This way a template author can create their own &#039;&#039;&#039;template_onload()&#039;&#039;&#039; function in the HEAD that replaces the default one.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
*Disable XSS filter - in Global settings -&amp;gt; Security, set &amp;quot;Filter HTML for XSS&amp;quot; to No.&lt;br /&gt;
*Enter your script in the source of a question or group description.&lt;br /&gt;
*There are more details in the [[Workarounds: Manipulating a survey at runtime using Javascript#How to use Script (eg. JavaScript etc.) in LimeSurvey?|workaround section]].&lt;br /&gt;
&lt;br /&gt;
=Videos on Templates=&lt;br /&gt;
&lt;br /&gt;
This video will demonstrate the basic and advanced template functions that are available to all LimeSurvey users. This includes changing the appearance of certain forms and inserting custom graphics. Additionally, it will thoroughly walk you through on how to edit and preview specific page templates, importing/exporting templates, modify appearance of questions in the CSS, customizing survey description page, and completed page.&lt;br /&gt;
&lt;br /&gt;
[http://youtu.be/Uk3FQyDTIY0 LimeSurvey training video - template customization]&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; Tricks=&lt;br /&gt;
&lt;br /&gt;
==Some language specific element==&lt;br /&gt;
&lt;br /&gt;
If you want to have some language specific sentence in a survey, for example a help at end of each page, you can add in a .pstl file a sentence and hidding it for other language. And hidding it in the template.css, we can use the pseudo selector :lang, but for best compatibility, we use some class.&lt;br /&gt;
&lt;br /&gt;
Example for a help sentence at bottom of the page, in french and english, put this on endpage.pstpl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;fr&amp;quot; lang=&amp;quot;fr&amp;quot;&amp;gt;Pour de l&#039;aide en direct appelez le 000000&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;en&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;For some help, please call 000000&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and in template.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;.lang-fr .en{display:none}&lt;br /&gt;
.lang-en .fr{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use it to for other sentence in your question before 1.92 ( in 1.92, there are better solutions).&lt;br /&gt;
&lt;br /&gt;
==Change the layout of the survey page==&lt;br /&gt;
&lt;br /&gt;
When editing a template this template can be assigned to a single survey while the survey list page, which is shown at www.yourdomain.org/limesurveyinstallfolder, lists all your surveys.&lt;br /&gt;
&lt;br /&gt;
To use your current template for this page you have change the according setting at the Global Settings screen; at older versions this change can be done by editing the $defaulttemplate setting at the config file: Copy this setting from config-defaults.php to config.php which overrides config-defaults.php and edit this setting to $defaulttemplate = &#039;yourtemplatename&#039;;&lt;br /&gt;
&lt;br /&gt;
==Import/Export of templates: Mac users==&lt;br /&gt;
&lt;br /&gt;
Mac users, please note: Mac OSX default archive utility may have problems with zip folders &amp;quot;generated on the fly&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
a work around is to unix&#039;es unzip from the command line:&lt;br /&gt;
&lt;br /&gt;
$ unzip template.zip -d template&lt;br /&gt;
&lt;br /&gt;
Archive: template.zip&lt;br /&gt;
&lt;br /&gt;
 inflating: template/startpage&lt;br /&gt;
&lt;br /&gt;
 inflating: ...&lt;br /&gt;
&lt;br /&gt;
or scripts in their mac-compiled counterparts:&lt;br /&gt;
&lt;br /&gt;
http://homepage.mac.com/roger_jolly/software/&lt;br /&gt;
&lt;br /&gt;
==Changing your templates traffic light from red to green==&lt;br /&gt;
&lt;br /&gt;
If you haven&#039;t already, set the admin directory to read/write/execute (777). The files within it, however, may be set to read/execute only (chmod 755).&lt;br /&gt;
&lt;br /&gt;
GO to file directory ie file manager, find templates directory.&lt;br /&gt;
&lt;br /&gt;
1 change permission on eg&amp;quot;vallendar&amp;quot; (or any template of your choice) directory to read 777&lt;br /&gt;
&lt;br /&gt;
2 voila! the red traffic light on &amp;quot;vallendar&amp;quot; is now green.&lt;br /&gt;
&lt;br /&gt;
3 NOTE: to restrict access for safety, when finished editing template files, change all templates files back to what they were eg 644&lt;br /&gt;
&lt;br /&gt;
==Replacing the help icon==&lt;br /&gt;
&lt;br /&gt;
When a question help text is shown then an help.gif image is used from the default template folder.&lt;br /&gt;
&lt;br /&gt;
You can replace this image by uploading a new help.gif, help.png or help.jpg in your custom template folder. It then will be automatically used instead of the default help icon.&lt;br /&gt;
&lt;br /&gt;
==Replacing an existing logo==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Before uploading a new logo always delete the old, existing one!&lt;br /&gt;
&lt;br /&gt;
1. To edit the logo go to the &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; file which you can find it here:&lt;br /&gt;
&lt;br /&gt;
[[File:t1.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
2. Click the search button to find occurrences of logo related styles.&lt;br /&gt;
&lt;br /&gt;
[[File:2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
3. Search for &amp;lt;u&amp;gt;#logo&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
4. Edit the main style file&lt;br /&gt;
&lt;br /&gt;
You will see something similar to:&lt;br /&gt;
&lt;br /&gt;
[[File:t4.PNG|500px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to change the image just replace logo.gif with another image link. Example: (&amp;lt;u&amp;gt;logo.png&amp;lt;/u&amp;gt; or &amp;lt;u&amp;gt;logo.jpg&amp;lt;/u&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want change the image size adjust width and height (in pixels) like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;width:100px; height:100px;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding your own logo==&lt;br /&gt;
&lt;br /&gt;
1. Find and open the &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo; template file.&lt;br /&gt;
&lt;br /&gt;
[[File:5.PNG|200px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. After the &amp;lt;source lang=&amp;quot;html4strict&amp;quot; &amp;gt;&amp;lt;body ... &amp;gt;&amp;lt;/source&amp;gt; tag add this line to &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;img id=&amp;quot;page_logo&amp;quot; src=&amp;quot;{TEMPLATEURL}logo.png&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. To add logo go to &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo;, you can find it here (see in screen):&lt;br /&gt;
&lt;br /&gt;
[[File:6.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.1 Then go to the end of the main &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; style file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2 To align the logo add...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at left side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:left;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at right side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:right;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you want to center the logo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   display: block;&lt;br /&gt;
   margin-left: auto;&lt;br /&gt;
   margin-right: auto;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use the same template with different logos==&lt;br /&gt;
&lt;br /&gt;
If you want to use the same template for all surveys and just want to change the logo for each survey, you can use the {SID} placeholder in the template .pstpl file and thereby refer to different images:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;{TEMPLATEURL}logoImage-{SID}.png&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the default help to all question (hide_tip)==&lt;br /&gt;
&lt;br /&gt;
There are 3 solutions to remove the default help:&lt;br /&gt;
# like a [[Advanced question settings#hide_tip|hide_tip attribute]] but for all question and survey.&lt;br /&gt;
# you can remove the {QUESTIONHELP} and is container from the file question.pstl, but it can be a bad idea for screenreader.&lt;br /&gt;
# for the default template and some other, add this at the end of tempate.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;span.questionhelp{display:none;}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Display custom favicon==&lt;br /&gt;
&lt;br /&gt;
A favicon is the little icon you see in the browser&#039;s address bar, list of bookmarks or tab. You can display your own icon as follows:&lt;br /&gt;
#Create a favicon - google will find you lots of free favicon generators&lt;br /&gt;
#Name your new favicon &amp;quot;favicon.ico&amp;quot; and place it in your template directory&lt;br /&gt;
#Add the following code to your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; before the &amp;lt;/head&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;link rel=&amp;quot;icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Different appearance for survey-/question-pages==&lt;br /&gt;
&lt;br /&gt;
(&#039;&#039;Version 1.91 and newer&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
If you want LimeSurvey to change the appearance of every second page (i.e. of even and odd survey pages) you can use &#039;&#039;&#039;.page-odd&#039;&#039;&#039; class in your css file to change the appearance of odd pages.&lt;br /&gt;
&lt;br /&gt;
example from default template of LimeSurvey 1.91+&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
.page-odd table.question-group {&lt;br /&gt;
 background-color: #D2F2D3;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To &#039;&#039;&#039;not&#039;&#039;&#039; differentiate even and odd pages at the (default) template find all instances of &#039;&#039;.page-odd&#039;&#039; in template.css and remove those styles.&lt;br /&gt;
&lt;br /&gt;
==Create a vertical separator  border for dual scale array==&lt;br /&gt;
&lt;br /&gt;
To create a vertical separator border for a dual scale array you can add the following lines to your &#039;&#039;&#039;template.css&#039;&#039;&#039;-file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
table.question thead td.header_separator,&lt;br /&gt;
table.question tbody td.dual_scale_separator&lt;br /&gt;
{&lt;br /&gt;
   border-right:solid 1px #00A8E1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
header_separator is used to adress the separator for the header &amp;quot;td&amp;quot; and &amp;quot;dual_scale_separator&amp;quot; is used to adress the separator column in the dual scale array.&lt;br /&gt;
&lt;br /&gt;
==Hide the survey contact message shown on the start page/survey list==&lt;br /&gt;
&lt;br /&gt;
To hide the &amp;quot;Please contact ...&amp;quot; message on the start page (with the survey list) you can add the following to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.js&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$(&#039;#surveycontact&#039;).hide(); //Hides the survey contact message&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the survey contact message shown on error messages==&lt;br /&gt;
&lt;br /&gt;
If you want to remove the survey contact message from error messages it&#039;ll be trickier. You can add the following function call to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.css&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
removeContactAdressFromMessage(); //Removes the survey contact message from error messages&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and add the following function to your *template.js* file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
function removeContactAdressFromMessage()&lt;br /&gt;
{&lt;br /&gt;
if ($(&#039;#tokenmessage&#039;).length &amp;gt; 0)&lt;br /&gt;
   {&lt;br /&gt;
   var oldMessage = $(&#039;#tokenmessage&#039;).html();&lt;br /&gt;
   var indexContact = oldMessage.indexOf(&#039;Bitte kontaktieren&#039;);&lt;br /&gt;
   var newMessage = oldMessage.substr(0, indexContact);&lt;br /&gt;
   $(&#039;#tokenmessage&#039;).html(newMessage);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will probably not work for an englisch survey and have to be extended when using for multilingual surveys. But it&#039;s an idea/tip how to solve this.&lt;br /&gt;
&lt;br /&gt;
==How to deal with multilingual question attributes (before version 2.0 at which those were added)==&lt;br /&gt;
&lt;br /&gt;
If you have a multilingual survey and e. g. want to use a different string for the &amp;quot;other&amp;quot; field, this could only be done for the base language (until this feature was added at LimeSurvey 2.0). To work around this, paste in the field to change the label for &amp;quot;other&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;en&amp;quot;&amp;gt;New label&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;fr&amp;quot;&amp;gt;Nouveau label&amp;lt;/span&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the template.css of your template (at /limesurvey/upload/templates/&amp;lt;yourtemplatename&amp;gt;/template.css) add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;html:lang(en) .fr{display:none}&lt;br /&gt;
html:lang(fr) .en{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Theme_editor/Page_display_title/pt&amp;diff=57620</id>
		<title>Translations:Theme editor/Page display title/pt</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Theme_editor/Page_display_title/pt&amp;diff=57620"/>
		<updated>2013-10-12T11:10:04Z</updated>

		<summary type="html">&lt;p&gt;Nery: Created page with &amp;quot;O editor de modelos&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;O editor de modelos&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=57591</id>
		<title>Theme editor</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=57591"/>
		<updated>2013-10-12T02:07:37Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
LimeSurvey has a basic template and style system providing a theme-like capability found in many browser-based applications.  They are simply termed &#039;&#039;&#039;Templates&#039;&#039;&#039; here.  The Templates allow control over the look and feel of pages during a survey.  A survey administrator can select the template to use for each survey to thus personalize that survey&#039;s look and feel.  Changes to a Template can be as simple as adding a unique logo on the welcome page, changing background colors, or maybe new text colors for specific types of questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
LimeSurvey comes with a set of templates right out of the box. These initial templates are defined by directories within the LimeSurvey installation &amp;quot;templates&amp;quot; directory.  Each template has it&#039;s own directory.  Within the main directory of a template are numerous files: &#039;&#039;&#039;templates (.pstpl)&#039;&#039;&#039;, &#039;&#039;&#039;cascading style sheets (.css)&#039;&#039;&#039;, &#039;&#039;&#039;images&#039;&#039;&#039; (&#039;&#039;&#039;.jpg&#039;&#039;&#039; or &#039;&#039;&#039;.png&#039;&#039;&#039;) and maybe others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Like in other theme-based systems, fragments of HTML code are stored in the .pstpl template files.  These fragments are read in and used to construct the page to display to the end user during the operation of a survey. Often &#039;&#039;&#039;keywords&#039;&#039;&#039; surrounded by curly braces are included in the files that are then replaced with the relevant text.  The following gives an example of a template file content and its result when used in a survey page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&amp;lt;font face=&#039;verdana&#039; color=&#039;red&#039;&amp;gt;{SURVEYNAME}&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;verdana&#039; color=&#039;blue&#039;&amp;gt;&amp;lt;u&amp;gt;{SURVEYDESCRIPTION}&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
One gets a result that looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:278--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&#039;&#039;&#039;&amp;lt;span style=&#039;color:red&#039;&amp;gt;My New Survey&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;u&amp;gt;&amp;lt;span style=&#039;color:#0000ff&#039;&amp;gt;This is a survey written by me to find out what sort of chocolate people like.&amp;lt;/span&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Templates, being HTML code, tend to define the positioning and type of text to be displayed and similar structural features of the page.  They often reference or include other files.  Most reference a common cascading style sheets (CSS) file that defines the font style, color, size, background and similar parameters common to all pages in the survey. Style sheets reference HTML &#039;&#039;&#039;class&#039;&#039;&#039; parameters that are associated with the various types of objects in the HTML code.  This allows the style sheet to describe once how to display each of the many types of text or other objects that may appear in multiple places.  There are unique classes for each question type in LimeSurvey and thus giving detailed control over the appearance of each.  Image files, like logos or special progress-bar constructors, may be referenced as well in the Template file.  Finally, special Keywords in curly braces are replaced with text defined in the Survey for each of its corresponding language translations (for example, the Survey Title or Question Text for each language defined).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
If you create a new custom template, please consider contributing it back to the LimeSurvey community, and make it available to others. With your help, we can grow our repository of templates, surveys, and other ad-ons, to make LimeSurvey even better! See the shared [http://www.limesurvey.org/en/download-limesurvey-design-templates/com_josetta_menu_control_panel/viewcategory/9-survey-design-templates Template Repository]&lt;br /&gt;
&lt;br /&gt;
=Creating a new Template= &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
To be able to create a new template (or edit an existing template), you need Template Editing user permission in LimeSurvey as well as permission to manipulate the files in the underlying operating system hosting your LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note of Warning:&#039;&#039;&#039; As template changes can affect all surveys in an installation, changes should be limited to those skilled in understanding general concepts in the code base. Templates are an advanced feature that can take some experimentation to get correct if you are not familiar with HTML code methods.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
The preferred way to create a new template is through the Template Editor (see below) via the web Admin interface. Some people may like to work directly with template files so that they can use their favorite text editor instead of the web interface. In this case, still use the Template Editor to first create your new template. This will create a new base template with all the files you need in the LimeSurvey_web_root/upload/templates/your_new_template directory. From there you can use your text editor to manually adjust the template files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Permissions Note:&#039;&#039;&#039; on unix/linux systems, these template files will be owned by the group and user who the web server is running as (may be &amp;quot;www&amp;quot; for some systems). So make sure you have access to edit these files, and when you save them make sure they don&#039;t change ownership, so you can still use the web Template Editing interface if needed&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Template files may seem complex to understand at first. You have to likely understand HTML code, possibly Styles and Style Sheets, and have access to the underlying LimeSurvey installation files if the template files and directories are not editable. Copy an existing template to a new directory to play around with the content. This may help make the concept clearer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
A number of the &#039;public&#039; elements of LimeSurvey can be adjusted by a series of templates. This section provides a very brief explanation of these templates.&lt;br /&gt;
&lt;br /&gt;
=The LimeSurvey Template Editor= &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
To ease the understanding and quick update of a Template, LimeSurvey provides a &#039;&#039;&#039;Template Editor&#039;&#039;&#039; in the main &#039;&#039;&#039;administrative&#039;&#039;&#039; toolbar of the application.  This Template Editor is only available to users given the privilege in the User Security settings.  A template effects all surveys and can render a survey inoperable if not constructed properly.  So Template editing is thought best restricted to a very limited, knowledgeable set of users.  Having permission to enter the Template Editor is not enough though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
The LimeSurvey Template Editor allows you to edit the contents of your templates online. Start the Template Editor by clicking on the &amp;quot;Template Editor&amp;quot; icon [[File:templates.png]] in the LimeSurvey Administration toolbar (Templates). The main screen is similar to the LimeSurvey Survey Administration screen. It allows you to select the template to edit/view. Once this has been selected you can then select from one of the different public survey pages. You are then presented with a list of the template files that make up that particular page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:279--&amp;gt;&lt;br /&gt;
[[File:Template-editor-2013-7-10_11_38_16.png|center]]&lt;br /&gt;
&lt;br /&gt;
==The Template Menu== &amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:280--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Edit Icon:&#039;&#039;&#039; The &amp;quot;edit&amp;quot; icon indicates whether or not the template is editable. A blurred out icon indicates that the template is read only; a clickable icon indicates you may make modifications. To change the icon from blurred to clear, you have to modify the template&#039;s permissions.&lt;br /&gt;
*&#039;&#039;&#039;Import Template:&#039;&#039;&#039; Allows you to import a template.&lt;br /&gt;
*&#039;&#039;&#039;Export Template:&#039;&#039;&#039; Allows you to export the current template to a .zip-File.&lt;br /&gt;
*&#039;&#039;&#039;Copy Template:&#039;&#039;&#039; Allows you to make a new template by copying the current one.&lt;br /&gt;
*&#039;&#039;&#039;Rename this template:&#039;&#039;&#039; Allows you to change the name of the template.  Generally used after copying an existing template or importing a template by manipulating the underlying directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
The &amp;quot;Screen&amp;quot; drop-down list on the right allows you to choose which particular survey page you are currently looking at.&lt;br /&gt;
&lt;br /&gt;
==Import/Export/Copy a Template== &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
When you &#039;&#039;&#039;export &#039;&#039;&#039;a template, this will create a zip-file archive with all the files your template consists of (.pstpl files, images, css files, ...). You can simply &#039;&#039;&#039;import &#039;&#039;&#039;the exported zip-file at other LimeSurvey systems by using the import feature or you can manually copy the archive to another installation and extract it into the corresponding template directory there. If you copy the template in the same installation, you will need to rename the folder to create another named copy of that template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
If the file and directory permissions are open for the LimeSurvey application to write, then you can use the programs &#039;&#039;&#039;copy &#039;&#039;&#039;and rename features to make a local copy of a template.&lt;br /&gt;
&lt;br /&gt;
==Page Structure / Template Use== &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;The Welcome Page:&#039;&#039;&#039; startpage.pstpl, welcome.pstpl, privacy.pstpl,  navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Questions Pages:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, startgroup.pstpl, groupdescription.pstpl, question.pstpl, endgroup.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Submit Page:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, submit.pstpl, (privacy.pstpl), navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Final Page:&#039;&#039;&#039; startpage.pstpl, assessment.pstpl, completed.pstpl, endpage.pstpl&lt;br /&gt;
&lt;br /&gt;
==Template Files== &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
The following template files are used to produce your public survey and must exist in any new template folder you create:&lt;br /&gt;
*&#039;&#039;&#039;startpage.pstpl:&#039;&#039;&#039; Produces the start of each html page. It starts at the &amp;quot;&amp;lt;head&amp;gt;&amp;quot; tag, and should not contain the &amp;quot;&amp;lt;html&amp;gt;&amp;quot; tag. This &#039;very beginning&#039; of a standard html page is written by the scripts. Please ensure that your startpage.pstpl files contains a &amp;lt;body&amp;gt; tag, even though many browsers do not require strict adherence to the W3 HTML stanards, the LimeSurvey script needs to find a &amp;lt;body&amp;gt; tag, to run certain javascript elements. It is not expected that many &#039;keywords&#039; will be used in the startpage.pstpl file, however you may wish to put the {SURVEYNAME} into the title. The startpage.pstpl file can contain code that ends in the corresponding endpage.pstpl file, so you can start a table in this file and close the table in the endpage.pstpl file. The startpage.pstpl and endpage.pstpl files wrap around every possible page used by LimeSurvey.&lt;br /&gt;
*&#039;&#039;&#039;survey.pstpl:&#039;&#039;&#039; This template is the second used on most pages, and provides a space to put the survey name and description. This template does not have a corresponding &#039;closing&#039; template, and subsequently you should close all tags opened in this template file (ie: don&#039;t leave a table open here because there is nowhere else to close it)&lt;br /&gt;
*&#039;&#039;&#039;welcome.pstpl:&#039;&#039;&#039; This template is only used in the welcome screen (which is also on the main page for &#039;all in one&#039; surveys). You can use this to print out the welcome text, and other information that should be provided in the introduction. Like the &#039;survey.pstpl&#039; file, there is no corresponding &#039;closing&#039; template, so all tags opened in this template file should be closed as well.&lt;br /&gt;
*&#039;&#039;&#039;startgroup.pstpl:&#039;&#039;&#039; This template can provide a &#039;summary&#039; wrap around for questions within a group. It has a matching &#039;endgroup.pstpl&#039; template that can be used to close any opened tags in this file, so you can open a table within this.&lt;br /&gt;
*&#039;&#039;&#039;groupdescription.pstpl:&#039;&#039;&#039; This template file is used to display a description of a group. It is separate to the startgroup.pstpl file because in a &amp;quot;question by question&amp;quot; survey it will be displayed on its own unique page in between groups, whereas in a &amp;quot;group by group&amp;quot; or &amp;quot;all in one&amp;quot; survey it provides a header to the subsequent questions. groupdescription.pstpl does not have a corresponding &#039;closing&#039; template file, so all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question.pstpl:&#039;&#039;&#039; This file contains the question, answer and help text sections of your survey, and in the &amp;quot;group by group&amp;quot; and &amp;quot;all in one&amp;quot; surveys this template is cycled repeatedly with each question. There is no corresponding closing file for this and all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question_start.pstpl:&#039;&#039;&#039; This file contains the individual elements found at the start of a question. It is included within &#039;question.pstpl&#039; via the {QUESTION} keyword. It is intended to allow template designers more control over the layout of a question. This template sits outside the normal templating system and &#039;&#039;&#039;was superseeded (as of LS1.87)&#039;&#039;&#039;. All keywords from this template are now available directly in question.pstpl. NOTE: templates using question_start.pstpl will still work at least for a couple more versions of LS 1.x&lt;br /&gt;
*&#039;&#039;&#039;submit.pstpl (and privacy.pstpl):&#039;&#039;&#039; This page is the penultimate page for all types of survey (except the &amp;quot;all in one&amp;quot; type) where the participant is given an option to review questions before submitting their responses. It provides privacy information where a survey is anonymous, which it extracts from the &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039; file.&lt;br /&gt;
*&#039;&#039;&#039;completed.pstpl:&#039;&#039;&#039; This page is displayed as the final page when the survey responses have been saved and the survey is over. It can be used to display a &amp;quot;forwarding link&amp;quot; as set in the survey setup.&lt;br /&gt;
*&#039;&#039;&#039;endgroup.pstpl:&#039;&#039;&#039; This file closes the group, and can be used to close off any tags opened in the startgroup.pstpl file&lt;br /&gt;
*&#039;&#039;&#039;navigator.pstpl:&#039;&#039;&#039; This file contains the buttons that navigate through the survey, &amp;quot;next&amp;quot;, &amp;quot;prev&amp;quot;, &amp;quot;last&amp;quot;, &amp;quot;submit&amp;quot;, &amp;quot;save so far&amp;quot;  and the &amp;quot;clear all&amp;quot; link. It is used in all pages except the completed page.&lt;br /&gt;
*&#039;&#039;&#039;printanswers.pstpl:&#039;&#039;&#039; This file has the HTML wrapper for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_group.pstpl:&#039;&#039;&#039; This file is the same as startgroup.pstpl endgroup.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_question.pstpl:&#039;&#039;&#039; This file is the same as question.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_survey.pstpl:&#039;&#039;&#039; This file is the same as survey.pstpl but for the print version of the survey.&lt;br /&gt;
&lt;br /&gt;
== CSS and Javascript== &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Two files are allways used for template : template.css for css and template.js for javascript.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATECSS}:&#039;&#039;&#039; Add lines for default css, template.css and template-rtl.css for rtl language.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATEJS}:&#039;&#039;&#039; Add lines for default javascript files, template.js and all js files needed for LimeSurvey.&lt;br /&gt;
&lt;br /&gt;
=== Replacing default css or javascript=== &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Some question use specific files for javascript or css. You can use your own files. All files used in your survey included in ./scripts or in .//styles-public can be replaced, just put a file with the same name in your template.&lt;br /&gt;
&lt;br /&gt;
==Other Template Files== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
The &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;invitationemail.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;reminderemail.pstpl&#039;&#039;&#039; and &#039;&#039;&#039;confirmationemail.pstpl&#039;&#039;&#039; are no longer used by LimeSurvey and defaults are instead set in the applicable language files. The email messages can now be edited on a survey by survey basis.&lt;br /&gt;
&lt;br /&gt;
==Standard Pages== &amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
There are ten standard pages that a survey participant may see in the course of taking or accessing the LimeSurvey application.  Each is constructed from a number of common &#039;&#039;&#039;Template&#039;&#039;&#039; files from the &#039;&#039;&#039;Template&#039;&#039;&#039; specified in the survey&#039;s settings.  The table below indicates which template files are used in constructing each of these pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!  &#039;&#039;&#039;Survey Pages:&#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039;Template Files&#039;&#039;&#039;!!Survey&amp;lt;br /&amp;gt;List!!Welcome!!Question!!Completed!!Clear All!!Register!!Load!!Save!!Print&amp;lt;br /&amp;gt;Answers!!Print&amp;lt;br /&amp;gt;Survey&lt;br /&gt;
|-&lt;br /&gt;
|SurveyList||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Welcome|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Privacy|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Navigator|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Survey|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|StartGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|GroupDescription|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Question&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|EndGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Assessment|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Completed|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|ClearAll|| || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Register|| || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Load|| || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||&lt;br /&gt;
|-&lt;br /&gt;
|Save|| || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| ||&lt;br /&gt;
|-&lt;br /&gt;
|PrintAnswers|| || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||&lt;br /&gt;
|-&lt;br /&gt;
|Print Survey || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Group || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Question || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|StartPage&amp;lt;br /&amp;gt;EndPage&amp;lt;br /&amp;gt;Template.css||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In versions 1.90 and up this replaces question.pstpl AND question_start.pstpl. If you are using an old custom template, you need to add the following line to the beginning of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div {QUESTION_ESSENTIALS} class=&amp;quot;{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;And then add the corresponding closing tag to the end of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In version 1.91 and earlier, LimeSurvey js files are not included by the template. In version 2, &#039;&#039;&#039;you have to use {TEMPLATEJS} in your one of your template file&#039;&#039;&#039; to add the link to the js file. You can add it in startpage.pstpl or in endpage.pstpl. You can remove the {TEMPLATEURL}/template.js line and you have to replace with {TEMPLATEJS} to update a personal template.&lt;br /&gt;
&lt;br /&gt;
==The File Control Section== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
In the &amp;quot;file control&amp;quot; window on the left, you can click on one of the template files that is used to compile the page. The HTML code for that file will then appear in the &amp;quot;Now editing&amp;quot; window in the center. If the template is editable (determined by directory permissions) you can then make any changes and save them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
The &amp;quot;Other Files&amp;quot; window shows a list of all other files in the template directory. You can use the right side to &#039;&#039;&#039;upload and select image files (your pics, logos,...) or other files needed to create your template&#039;&#039;&#039;. Note: Instead of a link directly to each picture in your template you can use the field string {TEMPLATEURL}.  So instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;/limesurvey/templates/yourtemplate/mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
You can use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;{TEMPLATEURL}mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
A &amp;quot;sample&amp;quot; of the template page you are editing will be visible at the bottom of the screen. There is no way to to delete a template from the template editor. This must be done by accessing the underlying directory and deleting the file there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; The shipped templates cannot be edited using the Template Editor and should never be changed. If you want to modify them, create a copy first and modify the copy.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Location of template files== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
LimeSurvey stores each of the &#039;standard&#039; templates in their own distinct sub-directory within the /templates directory that is kept in the public directory with the other LimeSurvey public files. Customized user templates are stored in the /upload/templates directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
To create a new template, use the according icon in the template editor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
There should ALWAYS be a &amp;quot;default&amp;quot; directory in the templates directory. This template is used by default and as a fall-back if a template folder doesn&#039;t exist, or can&#039;t be found. The &amp;quot;default&amp;quot; directory comes with the package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
You can use any image files that you upload into the template management area with syntax like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;{TEMPLATEURL}filename.xyz&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Styling questions with CSS= &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
Styling of questions in CSS has become much easier. Each question type now has a unique class. Mandatory question&#039;s also have an additional mandatory class. For example, for a non-mandatory question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
and if the question is mandatory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
and if the question is mandatory but the user didn&#039;t answer it or if there is validation on a question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
and if the question has validation applied but the user hasn&#039;t answered correctly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question6&amp;quot; class=&amp;quot;text-short input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Global classes for question part== &amp;lt;!--T:273--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:274--&amp;gt;&lt;br /&gt;
These classes are used for each question type. Some question types use only one or two class, but others can use much more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:281--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable alternance&amp;quot;&lt;br /&gt;
|+ Global classes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Class name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Part&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Question type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Examples&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Note&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question&lt;br /&gt;
| All question block&lt;br /&gt;
| All question type&lt;br /&gt;
|&amp;amp;lt;p class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;ul class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;question&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .subquestions-list&lt;br /&gt;
| List of subquestion&lt;br /&gt;
| Multi choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;subquestions-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;subquestions-list&amp;quot;&amp;gt;&lt;br /&gt;
| .questions-list is used too&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answers-list&lt;br /&gt;
| List of answers&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;answers-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;answers-list&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answer-item&lt;br /&gt;
| The answer part: one answer&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;answer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;answer-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .noanswer-item&lt;br /&gt;
| The answer part for no answer&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;noanswer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
| No answer is an answer too, then have double class noanswer-item and answer-item&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question-item&lt;br /&gt;
| The question part: one question&lt;br /&gt;
| Multi text question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;question-item&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;question-item&amp;quot;&amp;gt;&lt;br /&gt;
| Some answer are question too, then we have a lot of class=&amp;quot;question-item answer-item&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-list&lt;br /&gt;
| A list of checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;checkbox-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;checkbox-list&amp;quot;&amp;gt;&lt;br /&gt;
| Some question type have multi list class: like checkbox with comment : class=&amp;quot;checkbox-list text-list&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-item&lt;br /&gt;
| The answer part with a checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;checkbox-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;checkbox-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-list&lt;br /&gt;
| A list of radio item&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;radio-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;radio-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-item&lt;br /&gt;
| The answer part with a radio&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;radio-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;radio-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-list&lt;br /&gt;
| A list of text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-item&lt;br /&gt;
| The answer part of a text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;text-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;text-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-list&lt;br /&gt;
| A list of text input with numeric only answer&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-item&lt;br /&gt;
| The answer part of a numeric input&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;numeric-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;numeric-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-list&lt;br /&gt;
| A list of select&lt;br /&gt;
| Array numbers, Dual scale array (select)&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;select-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-item&lt;br /&gt;
| The answer part of a select&lt;br /&gt;
| Array numbers, Dual scale array (select), single choice with select&lt;br /&gt;
| &amp;amp;lt;p class=&amp;quot;select-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;select-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .hide&lt;br /&gt;
| Used for accessibility: hidden with css but read by screenreader&lt;br /&gt;
| Short text question&lt;br /&gt;
| &amp;amp;lt;label class=&amp;quot;hide&amp;quot;&amp;gt;&lt;br /&gt;
| Can be used for other purpose&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .dontread&lt;br /&gt;
| Used for accessibility: not be read by screenreader&lt;br /&gt;
| Array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;dontread&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox&lt;br /&gt;
| input[type=checkbox]&lt;br /&gt;
| Question with checkbox&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;checkbox&amp;quot; class=&amp;quot;checkbox&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio&lt;br /&gt;
| input[type=radio]&lt;br /&gt;
| Question with radio&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;radio&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text&lt;br /&gt;
| input[type=text]&lt;br /&gt;
| Question with input text, or textarea&lt;br /&gt;
| &amp;amp;lt;textarea class=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answertext&lt;br /&gt;
| Array question type&lt;br /&gt;
| Answer part of array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;answertext&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .col-answers&lt;br /&gt;
| Array question type&lt;br /&gt;
| Column of answers&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .array1 .array2&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for line&lt;br /&gt;
| &amp;amp;lt;tr class=&amp;quot;array1&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Some example of question part with classes=== &amp;lt;!--T:275--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:276--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;text-short question type:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;question answer-item text-item &amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label class=&amp;quot;hide label&amp;quot; for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Answer&amp;lt;/label&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;50&amp;quot; class=&amp;quot;text  empty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:277--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Multiple short text&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul class=&amp;quot;subquestions-list questions-list text-list&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li class=&amp;quot;question-item answer-item text-item&amp;quot; id=&amp;quot;javatbdSGQA&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Some example subquestion&amp;lt;/label&amp;gt;&lt;br /&gt;
     &amp;lt;span&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;20&amp;quot; class=&amp;quot;text empty&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:282--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Array question type&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;question subquestion-list questions-list &amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;caption class=&amp;quot;hide read&amp;quot;&amp;gt;Some explanation for accessibility.&amp;lt;/caption&amp;gt;&lt;br /&gt;
	&amp;lt;colgroup class=&amp;quot;col-responses&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;50%&amp;quot; class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;25%&amp;quot; class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;13.3%&amp;quot; class=&amp;quot;col-no-answer even&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/colgroup&amp;gt;&lt;br /&gt;
	&amp;lt;thead&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array1 dontread&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;No answer&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/thead&amp;gt;&lt;br /&gt;
	&amp;lt;tbody&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array2 answers-list radio-list&amp;quot; id=&amp;quot;javatbdSGQ&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;20%&amp;quot; class=&amp;quot;answertext&amp;quot;&amp;gt;Some example subquestion&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer_cell_001 answer-item radio-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;1&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;1&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer-item radio-item noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;No answer&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The full list of question classes== &amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Question Type&#039;&#039;&#039;||&#039;&#039;&#039;Question Class&#039;&#039;&#039;||&#039;&#039;&#039;Question ID&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|5 point choice||.choice-5-pt-radio||5&lt;br /&gt;
|-&lt;br /&gt;
|Array (10 point choice)||.array-10-pt||B&lt;br /&gt;
|-&lt;br /&gt;
|Array (5 point choice)||.array-5-pt||A&lt;br /&gt;
|-&lt;br /&gt;
|Array (Flexible Labels) dual scale||.array-flexible-duel-scale ||1&lt;br /&gt;
|-&lt;br /&gt;
|Array (Increase, Same, Decrease)||.array-increase-same-decrease||E&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Numbers)||.array-multi-flexi ||:&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Text)||.array-multi-flexi-text||;&lt;br /&gt;
|-&lt;br /&gt;
|Array (Yes/No/Uncertain)||.array-yes-uncertain-no||C&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels)||.array-flexible-row ||F&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels) by column||.array-flexible-column||H&lt;br /&gt;
|-&lt;br /&gt;
|Boilerplate question||.boilerplate||X&lt;br /&gt;
|-&lt;br /&gt;
|Date||.date||D&lt;br /&gt;
|-&lt;br /&gt;
|Gender||.gender||G&lt;br /&gt;
|-&lt;br /&gt;
|Huge free text||.text-huge||U&lt;br /&gt;
|-&lt;br /&gt;
|Language switch||.language||I&lt;br /&gt;
|-&lt;br /&gt;
|List (dropdown)||.list-dropdown||!&lt;br /&gt;
|-&lt;br /&gt;
|List (radio)||.list-radio||L&lt;br /&gt;
|-&lt;br /&gt;
|List with comment||.list-with-comment||O&lt;br /&gt;
|-&lt;br /&gt;
|Long free text||.text-long||T&lt;br /&gt;
|-&lt;br /&gt;
|Multiple numerical input||.numeric-multi||K&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options||.multiple-opt||M&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options with comments||.multiple-opt-comments||P&lt;br /&gt;
|-&lt;br /&gt;
|Multiple short text||.multiple-short-txt||Q&lt;br /&gt;
|-&lt;br /&gt;
|Numerical input||.numeric||N&lt;br /&gt;
|-&lt;br /&gt;
|Ranking||.ranking||R&lt;br /&gt;
|-&lt;br /&gt;
|Short free text||.text-short||S&lt;br /&gt;
|-&lt;br /&gt;
|Yes/No||.yes-no||Y&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The full list of validation classes== &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Note:  Prior to 1.92, only .mandatory and .input-error classes were available.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
These apply to the help and/or validation tip messages so that each type can be individually styled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
The .hide-tip option and .input-error options, by default, interact so that you can have validation tips start hidden, but appear when there validation errors, and disappear again when those errors are rectified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
All of these are designed to eliminate the need for pop-up alert messages.  Instead, tips can appear/disappear as needed, and are color-coded to indicate whether the answers pass the validation criteria.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
Furthermore, when you first visit a page that has unmet validation criteria, you can color-code the tips in a pleasing color to show which validation criteria have not been med; then re-display the page using a harsher color if the person submits the page with lingering validation errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Purpose&#039;&#039;&#039;||&#039;&#039;&#039;CSS Class&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Mandatory||.mandatory||the question is mandatory&lt;br /&gt;
|-&lt;br /&gt;
|User input error||.input-error||the question had at least one validation error&lt;br /&gt;
|-&lt;br /&gt;
|Hide Tip||.hide-tip||added if you use the hide_tip option&lt;br /&gt;
|-&lt;br /&gt;
|Num answers||.em_num_answers||for for min_answers and max_answers&lt;br /&gt;
|-&lt;br /&gt;
|Value range||.em_value_range||for min/max_num_value_n and multiflexible_min/max&lt;br /&gt;
|-&lt;br /&gt;
|Sum range||.em_sum_range||for min/max/equals_num_value&lt;br /&gt;
|-&lt;br /&gt;
|Regex validation||.em_regex_validation||for regular-expression validation of the question&lt;br /&gt;
|-&lt;br /&gt;
|Question-level validation function||.em_q_fn_validation||for the em_validation_q option&lt;br /&gt;
|-&lt;br /&gt;
|Subquestion-level validation function||.em_sq_fn_validation||for the em_validation_sq option&lt;br /&gt;
|-&lt;br /&gt;
|Other comment mandatory||.em_other_comment_mandatory||for other_comment_mandatory option - shows when &amp;quot;other&amp;quot; is selected but associated comment is missing.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Importing styles into your custom template== &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
The custom question styles are near the bottom of each template&#039;s CSS file and start with:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;/* --------------------------- START: Question styles  ------------------------------ */&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
If you&#039;re styling your own custom template, you should be able to copy everything after the above from templates/default/template.css (for tables based layouts) or /templates/limespired/template.css (for CSS based layouts) into your own style sheet without any impact on your other styles.&lt;br /&gt;
&lt;br /&gt;
==Internet Explorer conditional style sheets== &amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
Because of the marked discrepancies in rendering between IE6, IE7 and most other browsers, there are special IE conditional style sheets included for each template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_all-versions.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if lt IE 7]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_older-than-7.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8]&amp;gt;&lt;br /&gt;
		&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}ie_fix_8.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
You should include the above code within your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; and copies of both the IE style sheets from either /templates/default/ or /templates/limespired for Tables base layout and CSS based layout respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; If you copy the styles into your own style sheet you will almost certainly need to tweak them.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alternative solution for Internet explorer=== &amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
You can put conditional class for body in startpage.pstpl, and use this class in your template.css. This method is used in citronade template. Adding a js / no-js class to to have javascript / no javascript system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;!--[if lt IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie6 ielt7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie8 ielt9  no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 9 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if gt IE 9]&amp;gt;&amp;lt;!--&amp;gt;&amp;lt;body id=&amp;quot;body&amp;quot; class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} no-js&amp;quot;&amp;gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;script type=&#039;text/javascript&#039;&amp;gt;/*&amp;lt;![CDATA[*/(function(H){ H.className=H.className.replace(/\bno-js\b/,&#039;js&#039;) })(document.getElementsByTagName(&#039;body&#039;)[0]);/*]]&amp;gt;*/&amp;lt;/script&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
And in template.css use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;.ie6{/*specific for internet explorer 6*/}&lt;br /&gt;
.ielt8{/*specific for internet explorer 6 and 7*/}&lt;br /&gt;
.ie{/*specific for all internet explorer */}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Right-to-Left (RTL) Languages and justify== &amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
The text editor within LimeSurvey is able to format RTL Text. However, the editor itself shows the RTL language in a left to right format when justified.  This is just an editor display issue. The RTL and justified question or text will display correctly from right to left, even when justified, in your survey or on preview.&lt;br /&gt;
&lt;br /&gt;
==Keywords== &amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
Keywords within a template file get replaced by the current survey information. They are surrounded by curly brackets, for example: {SURVEYNAME}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
The following strings will be replaced by LimeSurvey when parsing the template file and presenting it to survey users. These field strings will work on almost every template except for the &#039;Completed Page&#039;. (Most of these strings can be found in the common.php file. If it&#039;s not there, look in the index.php file.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
!&#039;&#039;&#039;Keyword&#039;&#039;&#039;!!&#039;&#039;&#039;Template files&#039;&#039;&#039;!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||All Files||The survey title&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||All Files||The survey description&lt;br /&gt;
|-&lt;br /&gt;
|{WELCOME}||All files (mainly for welcome.pstpl)||The survey &#039;welcome&#039; text&lt;br /&gt;
|-&lt;br /&gt;
|{PERCENTCOMPLETE}||survey.pstpl||A small graph showing the percentage of the survey completed&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPNAME}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group name&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPDESCRIPTION}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group description&lt;br /&gt;
|-&lt;br /&gt;
|{NUMBEROFQUESTIONS}||welcome.pstpl||Displays the total number of questions in the survey (just the number)&lt;br /&gt;
|-&lt;br /&gt;
|{THEREAREXQUESTIONS}||welcome.pstpl||Displays the sentence &amp;quot;There are X questions in this survey&amp;quot; - from the relevant language file. The X is replaced with the number of questions. Note that this will also work appropriately for singular or plural. If there is only 1 question, it will print &amp;quot;There is 1 question in this survey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|{CHECKJAVASCRIPT}||All files (mainly for welcome.pstpl)||Warning message when end-user browser have javascript disabled&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION}||Question.pstpl||(&#039;&#039;&#039;Has been superseeded but the {QUESTION_...} keywords as of LS1.87&#039;&#039;&#039;) Displays the current question text (The format of {QUESTION} can customised by editing &#039;question_start.pstpl&#039;) Use the following: {QUESTION_TEXT}, {QUESTION_MANDATORY}, {QUESTION_HELP}, {QUESTION_MAN_MESSAGE}, {QUESTION_VALID_MESSAGE} and {QUESTION_INPUT_ERROR_CLASS} and appropriate wrapping HTML instead of {QUESTION}&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWER}||question.pstpl, print_question.pstpl||presents the answer form for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{SGQ}||question.pstpl, question text||Can be used in the question text itself, to reference the input field of the question dynamically by displaying the Survey-Group-Question id for the current question. (as of svn build 9755)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTIONHELP}||question.pstpl, print_question.pstpl||Displays help text (predefined tip for question type) for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CLASS}||question.pstpl, print_question.pstpl||unique class for each question type. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CODE}||question.pstpl, print_question.pstpl||Displays the current question code&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ESSENTIALS}||question.pstpl||the question ID and (if a question is conditional), &#039;style=&amp;quot;display:none;&amp;quot;&#039;. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_HELP}||question.pstp, question_start.pstpl||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TYPE_HELP}||print_question.pstp||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_INPUT_ERROR_CLASS}||question.pstp, question_start.pstpl||Provides a class if there was user input error&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ID}||print_question.pstp||Provides a unique ID for each question to allow styling for specific questions&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TEXT}||question.pstp, print_question.pstp, question_start.pstpl||Displays the text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MANDATORY}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_CLASS}||question.pstpl, print_question.pstpl||class if a question is mandatory. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_NUMBER}||print_question.pstpl||Incremental count of questions.&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_VALID_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated valid help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_SCENARIO}||print_question.pstp||Prints out the &#039;scenario&#039; text for conditional questions.&lt;br /&gt;
|-&lt;br /&gt;
|{NAVIGATOR}||navigator.pstpl||Displays navigation buttons (next, prev, last)&lt;br /&gt;
|-&lt;br /&gt;
|{CLEARALL}||All files (but intended for navigator.pstpl)||Displays the &amp;quot;Exit and Clear Results&amp;quot; link&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITBUTTON}||submit.pstpl||Displays the final submit button&lt;br /&gt;
|-&lt;br /&gt;
|{COMPLETED}||completed.pstpl||Displays the &#039;completed&#039; message for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{URL}||completed.pstpl||Displays the survey &#039;url&#039; and &#039;url text&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACY}||submit.pstpl||Displays privacy information when survey is anonymous&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACYMESSAGE}||privacy.pstpl||The privacy message is shown if you set your survey to be anonymous. [[Translating LimeSurvey|The text can be edited/translated]] in the language files. This can also be changed manually by editing the privacy.pstpl template you wish to use.&lt;br /&gt;
|-&lt;br /&gt;
|{TEMPLATEURL}||All Files||The URL to the current template location (useful for referencing image files in your template)&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITCOMPLETE}||endpage.pstpl||The statement (from the language files) that tells the user they have completed the survey, and to press the &amp;quot;Submit&amp;quot; button&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITREVIEW}||survey.pstpl||The statement (from the language files) that tells the user they can review/change the answers they have made by clicking &amp;quot;&amp;lt;&amp;lt; prev&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users first name from the tokens table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users last name from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:EMAIL}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users email from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_1 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_2 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERSCLEARED}||Preferably in navigator.pstpl||The &amp;quot;Answers Cleared&amp;quot; statement from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{RESTART}||clearall.pstpl||URL to restart the survey&lt;br /&gt;
|-&lt;br /&gt;
|{CLOSEWINDOW}||All Files (Preferably in navigator.pstpl)||URL to close current window&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERERROR}||register.pstpl||Shows any error messages in the register page (ie: &amp;quot;You must include an email address&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE1}||register.pstpl||The statement &amp;quot;You must be registered to complete this survey&amp;quot; from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE2}||register.pstpl||Details about registering from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERFORM}||register.pstpl||The actual form for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{SAVE}||Works suitable on navigator.pstpl||Displays the &#039;Save your responses so far&#039; button to offer the user to save and come back later to continue the survey. If the Save option is deactivated in the survey properties the tag will not be shown and ignored.&lt;br /&gt;
|-&lt;br /&gt;
|{LANGUAGECHANGER}||survey.pstpl||Displays a switch in multilingual surveys to change the question.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Input/Buttons== &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
Each &amp;quot;input&amp;quot; type in a survey has been given its own class name, so that you can add CSS to your &amp;quot;startpage.pstpl&amp;quot; file, and have some control over the appearance of form buttons and inputs. These class names are as follows:&lt;br /&gt;
*&#039;&#039;&#039;submit&#039;&#039;&#039; (Submit Buttons)&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; (Text Inputs - for short free text, date and numerical type)&lt;br /&gt;
*&#039;&#039;&#039;answertext&#039;&#039;&#039; (Text of answers)&lt;br /&gt;
*&#039;&#039;&#039;radio&#039;&#039;&#039; (Radio Buttons)&lt;br /&gt;
*&#039;&#039;&#039;checkbox&#039;&#039;&#039; (Check Boxes)&lt;br /&gt;
*&#039;&#039;&#039;select&#039;&#039;&#039; (Select / List Boxes)&lt;br /&gt;
*&#039;&#039;&#039;textarea&#039;&#039;&#039; (Large text inputs - for long free text)&lt;br /&gt;
*&#039;&#039;&#039;clearall&#039;&#039;&#039; (The &amp;quot;Exit and Clear Survey&amp;quot; link)&lt;br /&gt;
*&#039;&#039;&#039;rank&#039;&#039;&#039; (The rank style question. Doesn&#039;t set the colour of the select box or the text boxes (these are set by relevant section above) but does allow changing of background colour, text colour and size etc for the rest of the ranking question)&lt;br /&gt;
*&#039;&#039;&#039;graph&#039;&#039;&#039; (The &amp;quot;percentage completed&amp;quot; graph table)&lt;br /&gt;
*&#039;&#039;&#039;innergraph&#039;&#039;&#039; (The table inside the graph table - this contains the 0% and 100% text. Use this for changing the size of this text)&lt;br /&gt;
*&#039;&#039;&#039;question&#039;&#039;&#039; (General settings for any question that is displayed within a table. Generally you should use this to make sure that their font size and colour is the same as you have used elsewhere as a default)&lt;br /&gt;
*&#039;&#039;&#039;mandatory&#039;&#039;&#039;  (Mandatory questions)&lt;br /&gt;
*&#039;&#039;&#039;input-error&#039;&#039;&#039; (User input error - for if a user has made a mistake with a mandatory question or question with validation)&lt;br /&gt;
*&#039;&#039;&#039;array1&#039;&#039;&#039; and &#039;&#039;&#039;array2&#039;&#039;&#039; (These two styles are cycled when presenting the range of answers for an array type question. This allows you to set an alternating background colour for these question types. &#039;&#039;&#039;Array1&#039;&#039;&#039; is also used for the column headings in these question types)&lt;br /&gt;
*&#039;&#039;&#039;errormandatory&#039;&#039;&#039; (Sets the colour and style of the &amp;quot;This question is mandatory&amp;quot; error message)&lt;br /&gt;
*&#039;&#039;&#039;warningjs&#039;&#039;&#039; (Sets the colour and style of the warning message displayed if the participant&#039;s browser has javascript disabled)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
There are also some elements that can be accessed using the ID of the element (&#039;&#039;&#039;#ID&#039;&#039;&#039; in CSS):&lt;br /&gt;
*&#039;&#039;&#039;surveycontact&#039;&#039;&#039; (The contact message shown on the start page)&lt;br /&gt;
*&#039;&#039;&#039;tokenmessage&#039;&#039;&#039; (used for messages inside the survey, e.g. the session expired error message)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
An example of using these classes with style sheets can be found in the &amp;quot;bubblegum&amp;quot; template that comes with the LimeSurvey application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
Because you can edit all the HTML aspects, there&#039;s no reason to surround your templates with a &amp;lt;div class=&#039;new_name&#039;&amp;gt; and then define a css for that new_name class.&lt;br /&gt;
&lt;br /&gt;
==Styling the progress bar== &amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Before version 1.87:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
The chart.jpg file is a simple one pixel image file which is used to create the progress bar image in the &#039;PERCENTCOMPLETE&#039; table. If the file does not exist, LimeSurvey will use the default &#039;maroon&#039; coloured image in the public directory. If you want to create a bar to match your own colour scheme, then you should save the color in this file. Remember it should be a &#039;&#039;&#039;JPEG&#039;&#039;&#039; file, 1 pixel x 1 pixel, in the colour desired.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
The progress bar appearance can be modified with CSS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
To change the background colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-header {&lt;br /&gt;
 background-color: #3300FF;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
To change the border colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-content,&lt;br /&gt;
#progress-wrapper .ui-widget-header {&lt;br /&gt;
 border: 1px solid #FF0000;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advanced Features Available to Developers== &amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
Starting with version 0.99, LimeSurvey has integrated some user-made patches that allow for some special changes.  These very advanced features generally require changes to the underlying code base of LimeSurvey and should be done carefully so as not to introduce security holes.&lt;br /&gt;
&lt;br /&gt;
===Basic CMS Integration support=== &amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Deprecated: This function is not available anymore in version 2.0 or later&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
To be able to integrate LimeSurvey into another CMS, use the following options in &#039;&#039;&#039;config.php&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
// Set $embedded to true and specify the header and footer functions if the survey is to be displayed embedded in a CMS&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$embedded = false;&lt;br /&gt;
$embedded_inc = &amp;quot;&amp;quot;;               // path to the header to include if any&lt;br /&gt;
$embedded_headerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteHeader for geeklog&lt;br /&gt;
$embedded_footerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteFooter for geeklog&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:133--&amp;gt;&lt;br /&gt;
Set &#039;&#039;&#039;$embedded = true;&#039;&#039;&#039; to enable CMS-embedding. By using the &#039;&#039;&#039;$embedded_inc&#039;&#039;&#039; variable one can include their own &#039;&#039;&#039;.php&#039;&#039;&#039; files.  By setting &#039;&#039;&#039;$embedded_headerfunc&#039;&#039;&#039; or &#039;&#039;&#039;$embedded_footerfunc&#039;&#039;&#039;, one can call functions from within included files that output the relevant headers or footers instead of LimeSurveys default ones.&lt;br /&gt;
&lt;br /&gt;
===Support for your own Javascript functions=== &amp;lt;!--T:134--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:135--&amp;gt;&lt;br /&gt;
Some users may need to run Javascript on the survey pages, but calling &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; in the BODY element made it impossible to do so.  This call has been replaced with a small JavaScript function in the HEAD that sniffs for the existence of &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; and &#039;&#039;&#039;template_onload()&#039;&#039;&#039; before calling each.  This way a template author can create their own &#039;&#039;&#039;template_onload()&#039;&#039;&#039; function in the HEAD that replaces the default one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:136--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
*Disable XSS filter - in Global settings -&amp;gt; Security, set &amp;quot;Filter HTML for XSS&amp;quot; to No.&lt;br /&gt;
*Enter your script in the source of a question or group description.&lt;br /&gt;
*There are more details in the [[Workarounds: Manipulating a survey at runtime using Javascript#How to use Script (eg. JavaScript etc.) in LimeSurvey?|workaround section]].&lt;br /&gt;
&lt;br /&gt;
=Videos on Templates= &amp;lt;!--T:137--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
This video will demonstrate the basic and advanced template functions that are available to all LimeSurvey users. This includes changing the appearance of certain forms and inserting custom graphics. Additionally, it will thoroughly walk you through on how to edit and preview specific page templates, importing/exporting templates, modify appearance of questions in the CSS, customizing survey description page, and completed page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
[http://youtu.be/Uk3FQyDTIY0 LimeSurvey training video - template customization]&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; Tricks= &amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Some language specific element== &amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
If you want to have some language specific sentence in a survey, for example a help at end of each page, you can add in a .pstl file a sentence and hidding it for other language. And hidding it in the template.css, we can use the pseudo selector :lang, but for best compatibility, we use some class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
Example for a help sentence at bottom of the page, in french and english, put this on endpage.pstpl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;fr&amp;quot; lang=&amp;quot;fr&amp;quot;&amp;gt;Pour de l&#039;aide en direct appelez le 000000&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;en&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;For some help, please call 000000&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
and in template.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;.lang-fr .en{display:none}&lt;br /&gt;
.lang-en .fr{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
You can use it to for other sentence in your question before 1.92 ( in 1.92, there are better solutions).&lt;br /&gt;
&lt;br /&gt;
==Change the layout of the survey page== &amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
When editing a template this template can be assigned to a single survey while the survey list page, which is shown at www.yourdomain.org/limesurveyinstallfolder, lists all your surveys.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
To use your current template for this page you have change the according setting at the Global Settings screen; at older versions this change can be done by editing the $defaulttemplate setting at the config file: Copy this setting from config-defaults.php to config.php which overrides config-defaults.php and edit this setting to $defaulttemplate = &#039;yourtemplatename&#039;;&lt;br /&gt;
&lt;br /&gt;
==Import/Export of templates: Mac users== &amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
Mac users, please note: Mac OSX default archive utility may have problems with zip folders &amp;quot;generated on the fly&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
a work around is to unix&#039;es unzip from the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
$ unzip template.zip -d template&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
Archive: template.zip&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
 inflating: template/startpage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
 inflating: ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
or scripts in their mac-compiled counterparts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
http://homepage.mac.com/roger_jolly/software/&lt;br /&gt;
&lt;br /&gt;
==Changing your templates traffic light from red to green== &amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
If you haven&#039;t already, set the admin directory to read/write/execute (777). The files within it, however, may be set to read/execute only (chmod 755).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
GO to file directory ie file manager, find templates directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
1 change permission on eg&amp;quot;vallendar&amp;quot; (or any template of your choice) directory to read 777&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
2 voila! the red traffic light on &amp;quot;vallendar&amp;quot; is now green.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:172--&amp;gt;&lt;br /&gt;
3 NOTE: to restrict access for safety, when finished editing template files, change all templates files back to what they were eg 644&lt;br /&gt;
&lt;br /&gt;
==Replacing the help icon== &amp;lt;!--T:173--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:174--&amp;gt;&lt;br /&gt;
When a question help text is shown then an help.gif image is used from the default template folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:175--&amp;gt;&lt;br /&gt;
You can replace this image by uploading a new help.gif, help.png or help.jpg in your custom template folder. It then will be automatically used instead of the default help icon.&lt;br /&gt;
&lt;br /&gt;
==Replacing an existing logo== &amp;lt;!--T:176--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:177--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Before uploading a new logo always delete the old, existing one!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
1. To edit the logo go to the &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; file which you can find it here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
[[File:t1.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:180--&amp;gt;&lt;br /&gt;
2. Click the search button to find occurrences of logo related styles.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
[[File:2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:182--&amp;gt;&lt;br /&gt;
3. Search for &amp;lt;u&amp;gt;#logo&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:183--&amp;gt;&lt;br /&gt;
[[File:3.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
4. Edit the main style file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:185--&amp;gt;&lt;br /&gt;
You will see something similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:186--&amp;gt;&lt;br /&gt;
[[File:t4.PNG|500px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:187--&amp;gt;&lt;br /&gt;
If you want to change the image just replace logo.gif with another image link. Example: (&amp;lt;u&amp;gt;logo.png&amp;lt;/u&amp;gt; or &amp;lt;u&amp;gt;logo.jpg&amp;lt;/u&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
If you want change the image size adjust width and height (in pixels) like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:189--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;width:100px; height:100px;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding your own logo== &amp;lt;!--T:190--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:191--&amp;gt;&lt;br /&gt;
1. Find and open the &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo; template file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
[[File:5.PNG|200px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:194--&amp;gt;&lt;br /&gt;
2. After the &amp;lt;source lang=&amp;quot;html4strict&amp;quot; &amp;gt;&amp;lt;body ... &amp;gt;&amp;lt;/source&amp;gt; tag add this line to &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;img id=&amp;quot;page_logo&amp;quot; src=&amp;quot;{TEMPLATEURL}logo.png&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:196--&amp;gt;&lt;br /&gt;
3. To add logo go to &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo;, you can find it here (see in screen):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:197--&amp;gt;&lt;br /&gt;
[[File:6.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:198--&amp;gt;&lt;br /&gt;
3.1 Then go to the end of the main &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; style file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:199--&amp;gt;&lt;br /&gt;
3.2 To align the logo add...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:200--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at left side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:201--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:left;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at right side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:right;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:208--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want to center the logo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:209--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   display: block;&lt;br /&gt;
   margin-left: auto;&lt;br /&gt;
   margin-right: auto;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use the same template with different logos== &amp;lt;!--T:214--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:215--&amp;gt;&lt;br /&gt;
If you want to use the same template for all surveys and just want to change the logo for each survey, you can use the {SID} placeholder in the template .pstpl file and thereby refer to different images:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:216--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;{TEMPLATEURL}logoImage-{SID}.png&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the default help to all question (hide_tip)== &amp;lt;!--T:217--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:218--&amp;gt;&lt;br /&gt;
There are 3 solutions to remove the default help:&lt;br /&gt;
# like a [[Advanced question settings#hide_tip|hide_tip attribute]] but for all question and survey.&lt;br /&gt;
# you can remove the {QUESTIONHELP} and is container from the file question.pstl, but it can be a bad idea for screenreader.&lt;br /&gt;
# for the default template and some other, add this at the end of tempate.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:219--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;span.questionhelp{display:none;}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Display custom favicon== &amp;lt;!--T:220--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:221--&amp;gt;&lt;br /&gt;
A favicon is the little icon you see in the browser&#039;s address bar, list of bookmarks or tab. You can display your own icon as follows:&lt;br /&gt;
#Create a favicon - google will find you lots of free favicon generators&lt;br /&gt;
#Name your new favicon &amp;quot;favicon.ico&amp;quot; and place it in your template directory&lt;br /&gt;
#Add the following code to your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; before the &amp;lt;/head&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:222--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;link rel=&amp;quot;icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Different appearance for survey-/question-pages== &amp;lt;!--T:224--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:225--&amp;gt;&lt;br /&gt;
(&#039;&#039;Version 1.91 and newer&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:226--&amp;gt;&lt;br /&gt;
If you want LimeSurvey to change the appearance of every second page (i.e. of even and odd survey pages) you can use &#039;&#039;&#039;.page-odd&#039;&#039;&#039; class in your css file to change the appearance of odd pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:227--&amp;gt;&lt;br /&gt;
example from default template of LimeSurvey 1.91+&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:228--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
.page-odd table.question-group {&lt;br /&gt;
 background-color: #D2F2D3;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:232--&amp;gt;&lt;br /&gt;
To &#039;&#039;&#039;not&#039;&#039;&#039; differentiate even and odd pages at the (default) template find all instances of &#039;&#039;.page-odd&#039;&#039; in template.css and remove those styles.&lt;br /&gt;
&lt;br /&gt;
==Create a vertical separator  border for dual scale array== &amp;lt;!--T:233--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:234--&amp;gt;&lt;br /&gt;
To create a vertical separator border for a dual scale array you can add the following lines to your &#039;&#039;&#039;template.css&#039;&#039;&#039;-file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:235--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
table.question thead td.header_separator,&lt;br /&gt;
table.question tbody td.dual_scale_separator&lt;br /&gt;
{&lt;br /&gt;
   border-right:solid 1px #00A8E1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:242--&amp;gt;&lt;br /&gt;
header_separator is used to adress the separator for the header &amp;quot;td&amp;quot; and &amp;quot;dual_scale_separator&amp;quot; is used to adress the separator column in the dual scale array.&lt;br /&gt;
&lt;br /&gt;
==Hide the survey contact message shown on the start page/survey list== &amp;lt;!--T:243--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:244--&amp;gt;&lt;br /&gt;
To hide the &amp;quot;Please contact ...&amp;quot; message on the start page (with the survey list) you can add the following to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.js&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:245--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:246--&amp;gt;&lt;br /&gt;
$(&#039;#surveycontact&#039;).hide(); //Hides the survey contact message&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:247--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the survey contact message shown on error messages== &amp;lt;!--T:248--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:249--&amp;gt;&lt;br /&gt;
If you want to remove the survey contact message from error messages it&#039;ll be trickier. You can add the following function call to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.css&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:250--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
removeContactAdressFromMessage(); //Removes the survey contact message from error messages&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:253--&amp;gt;&lt;br /&gt;
and add the following function to your *template.js* file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:254--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
function removeContactAdressFromMessage()&lt;br /&gt;
{&lt;br /&gt;
if ($(&#039;#tokenmessage&#039;).length &amp;gt; 0)&lt;br /&gt;
   {&lt;br /&gt;
   var oldMessage = $(&#039;#tokenmessage&#039;).html();&lt;br /&gt;
   var indexContact = oldMessage.indexOf(&#039;Bitte kontaktieren&#039;);&lt;br /&gt;
   var newMessage = oldMessage.substr(0, indexContact);&lt;br /&gt;
   $(&#039;#tokenmessage&#039;).html(newMessage);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:266--&amp;gt;&lt;br /&gt;
It will probably not work for an englisch survey and have to be extended when using for multilingual surveys. But it&#039;s an idea/tip how to solve this.&lt;br /&gt;
&lt;br /&gt;
==How to deal with multilingual question attributes (before version 2.0 at which those were added)== &amp;lt;!--T:267--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:268--&amp;gt;&lt;br /&gt;
If you have a multilingual survey and e. g. want to use a different string for the &amp;quot;other&amp;quot; field, this could only be done for the base language (until this feature was added at LimeSurvey 2.0). To work around this, paste in the field to change the label for &amp;quot;other&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:269--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;en&amp;quot;&amp;gt;New label&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;fr&amp;quot;&amp;gt;Nouveau label&amp;lt;/span&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:270--&amp;gt;&lt;br /&gt;
At the template.css of your template (at /limesurvey/upload/templates/&amp;lt;yourtemplatename&amp;gt;/template.css) add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:271--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;html:lang(en) .fr{display:none}&lt;br /&gt;
html:lang(fr) .en{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=57590</id>
		<title>Theme editor</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=57590"/>
		<updated>2013-10-12T02:00:52Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
LimeSurvey has a basic template and style system providing a theme-like capability found in many browser-based applications.  They are simply termed &#039;&#039;&#039;Templates&#039;&#039;&#039; here.  The Templates allow control over the look and feel of pages during a survey.  A survey administrator can select the template to use for each survey to thus personalize that survey&#039;s look and feel.  Changes to a Template can be as simple as adding a unique logo on the welcome page, changing background colors, or maybe new text colors for specific types of questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
LimeSurvey comes with a set of templates right out of the box. These initial templates are defined by directories within the LimeSurvey installation &amp;quot;templates&amp;quot; directory.  Each template has it&#039;s own directory.  Within the main directory of a template are numerous files: &#039;&#039;&#039;templates (.pstpl)&#039;&#039;&#039;, &#039;&#039;&#039;cascading style sheets (.css)&#039;&#039;&#039;, &#039;&#039;&#039;images&#039;&#039;&#039; (&#039;&#039;&#039;.jpg&#039;&#039;&#039; or &#039;&#039;&#039;.png&#039;&#039;&#039;) and maybe others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Like in other theme-based systems, fragments of HTML code are stored in the .pstpl template files.  These fragments are read in and used to construct the page to display to the end user during the operation of a survey. Often &#039;&#039;&#039;keywords&#039;&#039;&#039; surrounded by curly braces are included in the files that are then replaced with the relevant text.  The following gives an example of a template file content and its result when used in a survey page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&amp;lt;font face=&#039;verdana&#039; color=&#039;red&#039;&amp;gt;{SURVEYNAME}&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;verdana&#039; color=&#039;blue&#039;&amp;gt;&amp;lt;u&amp;gt;{SURVEYDESCRIPTION}&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
One gets a result that looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:278--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&#039;&#039;&#039;&amp;lt;span style=&#039;color:red&#039;&amp;gt;My New Survey&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;u&amp;gt;&amp;lt;span style=&#039;color:#0000ff&#039;&amp;gt;This is a survey written by me to find out what sort of chocolate people like.&amp;lt;/span&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Templates, being HTML code, tend to define the positioning and type of text to be displayed and similar structural features of the page.  They often reference or include other files.  Most reference a common cascading style sheets (CSS) file that defines the font style, color, size, background and similar parameters common to all pages in the survey. Style sheets reference HTML &#039;&#039;&#039;class&#039;&#039;&#039; parameters that are associated with the various types of objects in the HTML code.  This allows the style sheet to describe once how to display each of the many types of text or other objects that may appear in multiple places.  There are unique classes for each question type in LimeSurvey and thus giving detailed control over the appearance of each.  Image files, like logos or special progress-bar constructors, may be referenced as well in the Template file.  Finally, special Keywords in curly braces are replaced with text defined in the Survey for each of its corresponding language translations (for example, the Survey Title or Question Text for each language defined).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
If you create a new custom template, please consider contributing it back to the LimeSurvey community, and make it available to others. With your help, we can grow our repository of templates, surveys, and other ad-ons, to make LimeSurvey even better! See the shared [http://www.limesurvey.org/en/download-limesurvey-design-templates/com_josetta_menu_control_panel/viewcategory/9-survey-design-templates Template Repository]&lt;br /&gt;
&lt;br /&gt;
=Creating a new Template= &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
To be able to create a new template (or edit an existing template), you need Template Editing user permission in LimeSurvey as well as permission to manipulate the files in the underlying operating system hosting your LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note of Warning:&#039;&#039;&#039; As template changes can affect all surveys in an installation, changes should be limited to those skilled in understanding general concepts in the code base. Templates are an advanced feature that can take some experimentation to get correct if you are not familiar with HTML code methods.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
The preferred way to create a new template is through the Template Editor (see below) via the web Admin interface. Some people may like to work directly with template files so that they can use their favorite text editor instead of the web interface. In this case, still use the Template Editor to first create your new template. This will create a new base template with all the files you need in the LimeSurvey_web_root/upload/templates/your_new_template directory. From there you can use your text editor to manually adjust the template files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Permissions Note:&#039;&#039;&#039; on unix/linux systems, these template files will be owned by the group and user who the web server is running as (may be &amp;quot;www&amp;quot; for some systems). So make sure you have access to edit these files, and when you save them make sure they don&#039;t change ownership, so you can still use the web Template Editing interface if needed&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Template files may seem complex to understand at first. You have to likely understand HTML code, possibly Styles and Style Sheets, and have access to the underlying LimeSurvey installation files if the template files and directories are not editable. Copy an existing template to a new directory to play around with the content. This may help make the concept clearer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
A number of the &#039;public&#039; elements of LimeSurvey can be adjusted by a series of templates. This section provides a very brief explanation of these templates.&lt;br /&gt;
&lt;br /&gt;
=The LimeSurvey Template Editor= &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
To ease the understanding and quick update of a Template, LimeSurvey provides a &#039;&#039;&#039;Template Editor&#039;&#039;&#039; in the main &#039;&#039;&#039;administrative&#039;&#039;&#039; toolbar of the application.  This Template Editor is only available to users given the privilege in the User Security settings.  A template effects all surveys and can render a survey inoperable if not constructed properly.  So Template editing is thought best restricted to a very limited, knowledgeable set of users.  Having permission to enter the Template Editor is not enough though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
The LimeSurvey Template Editor allows you to edit the contents of your templates online. Start the Template Editor by clicking on the &amp;quot;Template Editor&amp;quot; icon [[File:templates.png]] in the LimeSurvey Administration toolbar (Templates). The main screen is similar to the LimeSurvey Survey Administration screen. It allows you to select the template to edit/view. Once this has been selected you can then select from one of the different public survey pages. You are then presented with a list of the template files that make up that particular page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:279--&amp;gt;&lt;br /&gt;
[[File:Template-editor-2013-7-10_11_38_16.png|center]]&lt;br /&gt;
&lt;br /&gt;
==The Template Menu== &amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:280--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Edit Icon:&#039;&#039;&#039; The &amp;quot;edit&amp;quot; icon indicates whether or not the template is editable. A blurred out icon indicates that the template is read only; a clickable icon indicates you may make modifications. To change the icon from blurred to clear, you have to modify the template&#039;s permissions.&lt;br /&gt;
*&#039;&#039;&#039;Import Template:&#039;&#039;&#039; Allows you to import a template.&lt;br /&gt;
*&#039;&#039;&#039;Export Template:&#039;&#039;&#039; Allows you to export the current template to a .zip-File.&lt;br /&gt;
*&#039;&#039;&#039;Copy Template:&#039;&#039;&#039; Allows you to make a new template by copying the current one.&lt;br /&gt;
*&#039;&#039;&#039;Rename this template:&#039;&#039;&#039; Allows you to change the name of the template.  Generally used after copying an existing template or importing a template by manipulating the underlying directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
The &amp;quot;Screen&amp;quot; drop-down list on the right allows you to choose which particular survey page you are currently looking at.&lt;br /&gt;
&lt;br /&gt;
==Import/Export/Copy a Template== &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
When you &#039;&#039;&#039;export &#039;&#039;&#039;a template, this will create a zip-file archive with all the files your template consists of (.pstpl files, images, css files, ...). You can simply &#039;&#039;&#039;import &#039;&#039;&#039;the exported zip-file at other LimeSurvey systems by using the import feature or you can manually copy the archive to another installation and extract it into the corresponding template directory there. If you copy the template in the same installation, you will need to rename the folder to create another named copy of that template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
If the file and directory permissions are open for the LimeSurvey application to write, then you can use the programs &#039;&#039;&#039;copy &#039;&#039;&#039;and rename features to make a local copy of a template.&lt;br /&gt;
&lt;br /&gt;
==Page Structure / Template Use== &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;The Welcome Page:&#039;&#039;&#039; startpage.pstpl, welcome.pstpl, privacy.pstpl,  navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Questions Pages:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, startgroup.pstpl, groupdescription.pstpl, question.pstpl, endgroup.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Submit Page:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, submit.pstpl, (privacy.pstpl), navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Final Page:&#039;&#039;&#039; startpage.pstpl, assessment.pstpl, completed.pstpl, endpage.pstpl&lt;br /&gt;
&lt;br /&gt;
==Template Files== &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
The following template files are used to produce your public survey and must exist in any new template folder you create:&lt;br /&gt;
*&#039;&#039;&#039;startpage.pstpl:&#039;&#039;&#039; Produces the start of each html page. It starts at the &amp;quot;&amp;lt;head&amp;gt;&amp;quot; tag, and should not contain the &amp;quot;&amp;lt;html&amp;gt;&amp;quot; tag. This &#039;very beginning&#039; of a standard html page is written by the scripts. Please ensure that your startpage.pstpl files contains a &amp;lt;body&amp;gt; tag, even though many browsers do not require strict adherence to the W3 HTML stanards, the LimeSurvey script needs to find a &amp;lt;body&amp;gt; tag, to run certain javascript elements. It is not expected that many &#039;keywords&#039; will be used in the startpage.pstpl file, however you may wish to put the {SURVEYNAME} into the title. The startpage.pstpl file can contain code that ends in the corresponding endpage.pstpl file, so you can start a table in this file and close the table in the endpage.pstpl file. The startpage.pstpl and endpage.pstpl files wrap around every possible page used by LimeSurvey.&lt;br /&gt;
*&#039;&#039;&#039;survey.pstpl:&#039;&#039;&#039; This template is the second used on most pages, and provides a space to put the survey name and description. This template does not have a corresponding &#039;closing&#039; template, and subsequently you should close all tags opened in this template file (ie: don&#039;t leave a table open here because there is nowhere else to close it)&lt;br /&gt;
*&#039;&#039;&#039;welcome.pstpl:&#039;&#039;&#039; This template is only used in the welcome screen (which is also on the main page for &#039;all in one&#039; surveys). You can use this to print out the welcome text, and other information that should be provided in the introduction. Like the &#039;survey.pstpl&#039; file, there is no corresponding &#039;closing&#039; template, so all tags opened in this template file should be closed as well.&lt;br /&gt;
*&#039;&#039;&#039;startgroup.pstpl:&#039;&#039;&#039; This template can provide a &#039;summary&#039; wrap around for questions within a group. It has a matching &#039;endgroup.pstpl&#039; template that can be used to close any opened tags in this file, so you can open a table within this.&lt;br /&gt;
*&#039;&#039;&#039;groupdescription.pstpl:&#039;&#039;&#039; This template file is used to display a description of a group. It is separate to the startgroup.pstpl file because in a &amp;quot;question by question&amp;quot; survey it will be displayed on its own unique page in between groups, whereas in a &amp;quot;group by group&amp;quot; or &amp;quot;all in one&amp;quot; survey it provides a header to the subsequent questions. groupdescription.pstpl does not have a corresponding &#039;closing&#039; template file, so all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question.pstpl:&#039;&#039;&#039; This file contains the question, answer and help text sections of your survey, and in the &amp;quot;group by group&amp;quot; and &amp;quot;all in one&amp;quot; surveys this template is cycled repeatedly with each question. There is no corresponding closing file for this and all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question_start.pstpl:&#039;&#039;&#039; This file contains the individual elements found at the start of a question. It is included within &#039;question.pstpl&#039; via the {QUESTION} keyword. It is intended to allow template designers more control over the layout of a question. This template sits outside the normal templating system and &#039;&#039;&#039;was superseeded (as of LS1.87)&#039;&#039;&#039;. All keywords from this template are now available directly in question.pstpl. NOTE: templates using question_start.pstpl will still work at least for a couple more versions of LS 1.x&lt;br /&gt;
*&#039;&#039;&#039;submit.pstpl (and privacy.pstpl):&#039;&#039;&#039; This page is the penultimate page for all types of survey (except the &amp;quot;all in one&amp;quot; type) where the participant is given an option to review questions before submitting their responses. It provides privacy information where a survey is anonymous, which it extracts from the &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039; file.&lt;br /&gt;
*&#039;&#039;&#039;completed.pstpl:&#039;&#039;&#039; This page is displayed as the final page when the survey responses have been saved and the survey is over. It can be used to display a &amp;quot;forwarding link&amp;quot; as set in the survey setup.&lt;br /&gt;
*&#039;&#039;&#039;endgroup.pstpl:&#039;&#039;&#039; This file closes the group, and can be used to close off any tags opened in the startgroup.pstpl file&lt;br /&gt;
*&#039;&#039;&#039;navigator.pstpl:&#039;&#039;&#039; This file contains the buttons that navigate through the survey, &amp;quot;next&amp;quot;, &amp;quot;prev&amp;quot;, &amp;quot;last&amp;quot;, &amp;quot;submit&amp;quot;, &amp;quot;save so far&amp;quot;  and the &amp;quot;clear all&amp;quot; link. It is used in all pages except the completed page.&lt;br /&gt;
*&#039;&#039;&#039;printanswers.pstpl:&#039;&#039;&#039; This file has the HTML wrapper for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_group.pstpl:&#039;&#039;&#039; This file is the same as startgroup.pstpl endgroup.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_question.pstpl:&#039;&#039;&#039; This file is the same as question.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_survey.pstpl:&#039;&#039;&#039; This file is the same as survey.pstpl but for the print version of the survey.&lt;br /&gt;
&lt;br /&gt;
== CSS and Javascript== &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Two files are allways used for template : template.css for css and template.js for javascript.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATECSS}:&#039;&#039;&#039; Add lines for default css, template.css and template-rtl.css for rtl language.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATEJS}:&#039;&#039;&#039; Add lines for default javascript files, template.js and all js files needed for LimeSurvey.&lt;br /&gt;
&lt;br /&gt;
=== Replacing default css or javascript=== &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Some question use specific files for javascript or css. You can use your own files. All files used in your survey included in ./scripts or in .//styles-public can be replaced, just put a file with the same name in your template.&lt;br /&gt;
&lt;br /&gt;
==Other Template Files== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
The &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;invitationemail.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;reminderemail.pstpl&#039;&#039;&#039; and &#039;&#039;&#039;confirmationemail.pstpl&#039;&#039;&#039; are no longer used by LimeSurvey and defaults are instead set in the applicable language files. The email messages can now be edited on a survey by survey basis.&lt;br /&gt;
&lt;br /&gt;
==Standard Pages== &amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
There are ten standard pages that a survey participant may see in the course of taking or accessing the LimeSurvey application.  Each is constructed from a number of common &#039;&#039;&#039;Template&#039;&#039;&#039; files from the &#039;&#039;&#039;Template&#039;&#039;&#039; specified in the survey&#039;s settings.  The table below indicates which template files are used in constructing each of these pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!  &#039;&#039;&#039;Survey Pages:&#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039;Template Files&#039;&#039;&#039;!!Survey&amp;lt;br /&amp;gt;List!!Welcome!!Question!!Completed!!Clear All!!Register!!Load!!Save!!Print&amp;lt;br /&amp;gt;Answers!!Print&amp;lt;br /&amp;gt;Survey&lt;br /&gt;
|-&lt;br /&gt;
|SurveyList||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Welcome|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Privacy|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Navigator|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Survey|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|StartGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|GroupDescription|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Question&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|EndGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Assessment|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Completed|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|ClearAll|| || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Register|| || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Load|| || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||&lt;br /&gt;
|-&lt;br /&gt;
|Save|| || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| ||&lt;br /&gt;
|-&lt;br /&gt;
|PrintAnswers|| || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||&lt;br /&gt;
|-&lt;br /&gt;
|Print Survey || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Group || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Question || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|StartPage&amp;lt;br /&amp;gt;EndPage&amp;lt;br /&amp;gt;Template.css||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In versions 1.90 and up this replaces question.pstpl AND question_start.pstpl. If you are using an old custom template, you need to add the following line to the beginning of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div {QUESTION_ESSENTIALS} class=&amp;quot;{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;And then add the corresponding closing tag to the end of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In version 1.91 and earlier, LimeSurvey js files are not included by the template. In version 2, &#039;&#039;&#039;you have to use {TEMPLATEJS} in your one of your template file&#039;&#039;&#039; to add the link to the js file. You can add it in startpage.pstpl or in endpage.pstpl. You can remove the {TEMPLATEURL}/template.js line and you have to replace with {TEMPLATEJS} to update a personal template.&lt;br /&gt;
&lt;br /&gt;
==The File Control Section== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
In the &amp;quot;file control&amp;quot; window on the left, you can click on one of the template files that is used to compile the page. The HTML code for that file will then appear in the &amp;quot;Now editing&amp;quot; window in the center. If the template is editable (determined by directory permissions) you can then make any changes and save them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
The &amp;quot;Other Files&amp;quot; window shows a list of all other files in the template directory. You can use the right side to &#039;&#039;&#039;upload and select image files (your pics, logos,...) or other files needed to create your template&#039;&#039;&#039;. Note: Instead of a link directly to each picture in your template you can use the field string {TEMPLATEURL}.  So instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;/limesurvey/templates/yourtemplate/mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
You can use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;{TEMPLATEURL}mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
A &amp;quot;sample&amp;quot; of the template page you are editing will be visible at the bottom of the screen. There is no way to to delete a template from the template editor. This must be done by accessing the underlying directory and deleting the file there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; The shipped templates cannot be edited using the Template Editor and should never be changed. If you want to modify them, create a copy first and modify the copy.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Location of template files== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
LimeSurvey stores each of the &#039;standard&#039; templates in their own distinct sub-directory within the /templates directory that is kept in the public directory with the other LimeSurvey public files. Customized user templates are stored in the /upload/templates directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
To create a new template, use the according icon in the template editor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
There should ALWAYS be a &amp;quot;default&amp;quot; directory in the templates directory. This template is used by default and as a fall-back if a template folder doesn&#039;t exist, or can&#039;t be found. The &amp;quot;default&amp;quot; directory comes with the package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
You can use any image files that you upload into the template management area with syntax like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;{TEMPLATEURL}filename.xyz&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Styling questions with CSS= &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
Styling of questions in CSS has become much easier. Each question type now has a unique class. Mandatory question&#039;s also have an additional mandatory class. For example, for a non-mandatory question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
and if the question is mandatory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
and if the question is mandatory but the user didn&#039;t answer it or if there is validation on a question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
and if the question has validation applied but the user hasn&#039;t answered correctly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question6&amp;quot; class=&amp;quot;text-short input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Global classes for question part== &amp;lt;!--T:273--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:274--&amp;gt;&lt;br /&gt;
These classes are used for each question type. Some question types use only one or two class, but others can use much more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:281--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable alternance&amp;quot;&lt;br /&gt;
|+ Global classes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Class name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Part&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Question type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Examples&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Note&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question&lt;br /&gt;
| All question block&lt;br /&gt;
| All question type&lt;br /&gt;
|&amp;amp;lt;p class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;ul class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;question&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .subquestions-list&lt;br /&gt;
| List of subquestion&lt;br /&gt;
| Multi choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;subquestions-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;subquestions-list&amp;quot;&amp;gt;&lt;br /&gt;
| .questions-list is used too&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answers-list&lt;br /&gt;
| List of answers&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;answers-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;answers-list&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answer-item&lt;br /&gt;
| The answer part: one answer&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;answer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;answer-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .noanswer-item&lt;br /&gt;
| The answer part for no answer&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;noanswer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
| No answer is an answer too, then have double class noanswer-item and answer-item&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question-item&lt;br /&gt;
| The question part: one question&lt;br /&gt;
| Multi text question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;question-item&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;question-item&amp;quot;&amp;gt;&lt;br /&gt;
| Some answer are question too, then we have a lot of class=&amp;quot;question-item answer-item&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-list&lt;br /&gt;
| A list of checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;checkbox-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;checkbox-list&amp;quot;&amp;gt;&lt;br /&gt;
| Some question type have multi list class: like checkbox with comment : class=&amp;quot;checkbox-list text-list&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-item&lt;br /&gt;
| The answer part with a checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;checkbox-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;checkbox-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-list&lt;br /&gt;
| A list of radio item&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;radio-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;radio-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-item&lt;br /&gt;
| The answer part with a radio&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;radio-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;radio-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-list&lt;br /&gt;
| A list of text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-item&lt;br /&gt;
| The answer part of a text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;text-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;text-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-list&lt;br /&gt;
| A list of text input with numeric only answer&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-item&lt;br /&gt;
| The answer part of a numeric input&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;numeric-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;numeric-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-list&lt;br /&gt;
| A list of select&lt;br /&gt;
| Array numbers, Dual scale array (select)&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;select-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-item&lt;br /&gt;
| The answer part of a select&lt;br /&gt;
| Array numbers, Dual scale array (select), single choice with select&lt;br /&gt;
| &amp;amp;lt;p class=&amp;quot;select-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;select-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .hide&lt;br /&gt;
| Used for accessibility: hidden with css but read by screenreader&lt;br /&gt;
| Short text question&lt;br /&gt;
| &amp;amp;lt;label class=&amp;quot;hide&amp;quot;&amp;gt;&lt;br /&gt;
| Can be used for other purpose&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .dontread&lt;br /&gt;
| Used for accessibility: not be read by screenreader&lt;br /&gt;
| Array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;dontread&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox&lt;br /&gt;
| input[type=checkbox]&lt;br /&gt;
| Question with checkbox&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;checkbox&amp;quot; class=&amp;quot;checkbox&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio&lt;br /&gt;
| input[type=radio]&lt;br /&gt;
| Question with radio&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;radio&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text&lt;br /&gt;
| input[type=text]&lt;br /&gt;
| Question with input text, or textarea&lt;br /&gt;
| &amp;amp;lt;textarea class=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answertext&lt;br /&gt;
| Array question type&lt;br /&gt;
| Answer part of array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;answertext&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .col-answers&lt;br /&gt;
| Array question type&lt;br /&gt;
| Column of answers&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .array1 .array2&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for line&lt;br /&gt;
| &amp;amp;lt;tr class=&amp;quot;array1&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Some example of question part with classes=== &amp;lt;!--T:275--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:276--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;text-short question type:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;question answer-item text-item &amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label class=&amp;quot;hide label&amp;quot; for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Answer&amp;lt;/label&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;50&amp;quot; class=&amp;quot;text  empty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:277--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Multiple short text&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul class=&amp;quot;subquestions-list questions-list text-list&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li class=&amp;quot;question-item answer-item text-item&amp;quot; id=&amp;quot;javatbdSGQA&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Some example subquestion&amp;lt;/label&amp;gt;&lt;br /&gt;
     &amp;lt;span&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;20&amp;quot; class=&amp;quot;text empty&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:282--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Array question type&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;question subquestion-list questions-list &amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;caption class=&amp;quot;hide read&amp;quot;&amp;gt;Some explanation for accessibility.&amp;lt;/caption&amp;gt;&lt;br /&gt;
	&amp;lt;colgroup class=&amp;quot;col-responses&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;50%&amp;quot; class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;25%&amp;quot; class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;13.3%&amp;quot; class=&amp;quot;col-no-answer even&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/colgroup&amp;gt;&lt;br /&gt;
	&amp;lt;thead&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array1 dontread&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;No answer&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/thead&amp;gt;&lt;br /&gt;
	&amp;lt;tbody&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array2 answers-list radio-list&amp;quot; id=&amp;quot;javatbdSGQ&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;20%&amp;quot; class=&amp;quot;answertext&amp;quot;&amp;gt;Some example subquestion&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer_cell_001 answer-item radio-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;1&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;1&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer-item radio-item noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;No answer&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The full list of question classes== &amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Question Type&#039;&#039;&#039;||&#039;&#039;&#039;Question Class&#039;&#039;&#039;||&#039;&#039;&#039;Question ID&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|5 point choice||.choice-5-pt-radio||5&lt;br /&gt;
|-&lt;br /&gt;
|Array (10 point choice)||.array-10-pt||B&lt;br /&gt;
|-&lt;br /&gt;
|Array (5 point choice)||.array-5-pt||A&lt;br /&gt;
|-&lt;br /&gt;
|Array (Flexible Labels) dual scale||.array-flexible-duel-scale ||1&lt;br /&gt;
|-&lt;br /&gt;
|Array (Increase, Same, Decrease)||.array-increase-same-decrease||E&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Numbers)||.array-multi-flexi ||:&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Text)||.array-multi-flexi-text||;&lt;br /&gt;
|-&lt;br /&gt;
|Array (Yes/No/Uncertain)||.array-yes-uncertain-no||C&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels)||.array-flexible-row ||F&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels) by column||.array-flexible-column||H&lt;br /&gt;
|-&lt;br /&gt;
|Boilerplate question||.boilerplate||X&lt;br /&gt;
|-&lt;br /&gt;
|Date||.date||D&lt;br /&gt;
|-&lt;br /&gt;
|Gender||.gender||G&lt;br /&gt;
|-&lt;br /&gt;
|Huge free text||.text-huge||U&lt;br /&gt;
|-&lt;br /&gt;
|Language switch||.language||I&lt;br /&gt;
|-&lt;br /&gt;
|List (dropdown)||.list-dropdown||!&lt;br /&gt;
|-&lt;br /&gt;
|List (radio)||.list-radio||L&lt;br /&gt;
|-&lt;br /&gt;
|List with comment||.list-with-comment||O&lt;br /&gt;
|-&lt;br /&gt;
|Long free text||.text-long||T&lt;br /&gt;
|-&lt;br /&gt;
|Multiple numerical input||.numeric-multi||K&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options||.multiple-opt||M&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options with comments||.multiple-opt-comments||P&lt;br /&gt;
|-&lt;br /&gt;
|Multiple short text||.multiple-short-txt||Q&lt;br /&gt;
|-&lt;br /&gt;
|Numerical input||.numeric||N&lt;br /&gt;
|-&lt;br /&gt;
|Ranking||.ranking||R&lt;br /&gt;
|-&lt;br /&gt;
|Short free text||.text-short||S&lt;br /&gt;
|-&lt;br /&gt;
|Yes/No||.yes-no||Y&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The full list of validation classes== &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Note:  Prior to 1.92, only .mandatory and .input-error classes were available.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
These apply to the help and/or validation tip messages so that each type can be individually styled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
The .hide-tip option and .input-error options, by default, interact so that you can have validation tips start hidden, but appear when there validation errors, and disappear again when those errors are rectified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
All of these are designed to eliminate the need for pop-up alert messages.  Instead, tips can appear/disappear as needed, and are color-coded to indicate whether the answers pass the validation criteria.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
Furthermore, when you first visit a page that has unmet validation criteria, you can color-code the tips in a pleasing color to show which validation criteria have not been med; then re-display the page using a harsher color if the person submits the page with lingering validation errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Purpose&#039;&#039;&#039;||&#039;&#039;&#039;CSS Class&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Mandatory||.mandatory||the question is mandatory&lt;br /&gt;
|-&lt;br /&gt;
|User input error||.input-error||the question had at least one validation error&lt;br /&gt;
|-&lt;br /&gt;
|Hide Tip||.hide-tip||added if you use the hide_tip option&lt;br /&gt;
|-&lt;br /&gt;
|Num answers||.em_num_answers||for for min_answers and max_answers&lt;br /&gt;
|-&lt;br /&gt;
|Value range||.em_value_range||for min/max_num_value_n and multiflexible_min/max&lt;br /&gt;
|-&lt;br /&gt;
|Sum range||.em_sum_range||for min/max/equals_num_value&lt;br /&gt;
|-&lt;br /&gt;
|Regex validation||.em_regex_validation||for regular-expression validation of the question&lt;br /&gt;
|-&lt;br /&gt;
|Question-level validation function||.em_q_fn_validation||for the em_validation_q option&lt;br /&gt;
|-&lt;br /&gt;
|Subquestion-level validation function||.em_sq_fn_validation||for the em_validation_sq option&lt;br /&gt;
|-&lt;br /&gt;
|Other comment mandatory||.em_other_comment_mandatory||for other_comment_mandatory option - shows when &amp;quot;other&amp;quot; is selected but associated comment is missing.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Importing styles into your custom template== &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
The custom question styles are near the bottom of each template&#039;s CSS file and start with:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;/* --------------------------- START: Question styles  ------------------------------ */&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
If you&#039;re styling your own custom template, you should be able to copy everything after the above from templates/default/template.css (for tables based layouts) or /templates/limespired/template.css (for CSS based layouts) into your own style sheet without any impact on your other styles.&lt;br /&gt;
&lt;br /&gt;
==Internet Explorer conditional style sheets== &amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
Because of the marked discrepancies in rendering between IE6, IE7 and most other browsers, there are special IE conditional style sheets included for each template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_all-versions.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if lt IE 7]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_older-than-7.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8]&amp;gt;&lt;br /&gt;
		&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}ie_fix_8.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
You should include the above code within your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; and copies of both the IE style sheets from either /templates/default/ or /templates/limespired for Tables base layout and CSS based layout respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; If you copy the styles into your own style sheet you will almost certainly need to tweak them.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alternative solution for Internet explorer=== &amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
You can put conditional class for body in startpage.pstpl, and use this class in your template.css. This method is used in citronade template. Adding a js / no-js class to to have javascript / no javascript system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;!--[if lt IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie6 ielt7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie8 ielt9  no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 9 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if gt IE 9]&amp;gt;&amp;lt;!--&amp;gt;&amp;lt;body id=&amp;quot;body&amp;quot; class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} no-js&amp;quot;&amp;gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;script type=&#039;text/javascript&#039;&amp;gt;/*&amp;lt;![CDATA[*/(function(H){ H.className=H.className.replace(/\bno-js\b/,&#039;js&#039;) })(document.getElementsByTagName(&#039;body&#039;)[0]);/*]]&amp;gt;*/&amp;lt;/script&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
And in template.css use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;.ie6{/*specific for internet explorer 6*/}&lt;br /&gt;
.ielt8{/*specific for internet explorer 6 and 7*/}&lt;br /&gt;
.ie{/*specific for all internet explorer */}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Right-to-Left (RTL) Languages and justify== &amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
The text editor within LimeSurvey is able to format RTL Text. However, the editor itself shows the RTL language in a left to right format when justified.  This is just an editor display issue. The RTL and justified question or text will display correctly from right to left, even when justified, in your survey or on preview.&lt;br /&gt;
&lt;br /&gt;
==Keywords== &amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
Keywords within a template file get replaced by the current survey information. They are surrounded by curly brackets, for example: {SURVEYNAME}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
The following strings will be replaced by LimeSurvey when parsing the template file and presenting it to survey users. These field strings will work on almost every template except for the &#039;Completed Page&#039;. (Most of these strings can be found in the common.php file. If it&#039;s not there, look in the index.php file.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
!&#039;&#039;&#039;Keyword&#039;&#039;&#039;!!&#039;&#039;&#039;Template files&#039;&#039;&#039;!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||All Files||The survey title&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||All Files||The survey description&lt;br /&gt;
|-&lt;br /&gt;
|{WELCOME}||All files (mainly for welcome.pstpl)||The survey &#039;welcome&#039; text&lt;br /&gt;
|-&lt;br /&gt;
|{PERCENTCOMPLETE}||survey.pstpl||A small graph showing the percentage of the survey completed&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPNAME}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group name&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPDESCRIPTION}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group description&lt;br /&gt;
|-&lt;br /&gt;
|{NUMBEROFQUESTIONS}||welcome.pstpl||Displays the total number of questions in the survey (just the number)&lt;br /&gt;
|-&lt;br /&gt;
|{THEREAREXQUESTIONS}||welcome.pstpl||Displays the sentence &amp;quot;There are X questions in this survey&amp;quot; - from the relevant language file. The X is replaced with the number of questions. Note that this will also work appropriately for singular or plural. If there is only 1 question, it will print &amp;quot;There is 1 question in this survey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|{CHECKJAVASCRIPT}||All files (mainly for welcome.pstpl)||Warning message when end-user browser have javascript disabled&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION}||Question.pstpl||(&#039;&#039;&#039;Has been superseeded but the {QUESTION_...} keywords as of LS1.87&#039;&#039;&#039;) Displays the current question text (The format of {QUESTION} can customised by editing &#039;question_start.pstpl&#039;) Use the following: {QUESTION_TEXT}, {QUESTION_MANDATORY}, {QUESTION_HELP}, {QUESTION_MAN_MESSAGE}, {QUESTION_VALID_MESSAGE} and {QUESTION_INPUT_ERROR_CLASS} and appropriate wrapping HTML instead of {QUESTION}&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWER}||question.pstpl, print_question.pstpl||presents the answer form for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{SGQ}||question.pstpl, question text||Can be used in the question text itself, to reference the input field of the question dynamically by displaying the Survey-Group-Question id for the current question. (as of svn build 9755)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTIONHELP}||question.pstpl, print_question.pstpl||Displays help text (predefined tip for question type) for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CLASS}||question.pstpl, print_question.pstpl||unique class for each question type. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CODE}||question.pstpl, print_question.pstpl||Displays the current question code&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ESSENTIALS}||question.pstpl||the question ID and (if a question is conditional), &#039;style=&amp;quot;display:none;&amp;quot;&#039;. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_HELP}||question.pstp, question_start.pstpl||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TYPE_HELP}||print_question.pstp||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_INPUT_ERROR_CLASS}||question.pstp, question_start.pstpl||Provides a class if there was user input error&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ID}||print_question.pstp||Provides a unique ID for each question to allow styling for specific questions&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TEXT}||question.pstp, print_question.pstp, question_start.pstpl||Displays the text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MANDATORY}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_CLASS}||question.pstpl, print_question.pstpl||class if a question is mandatory. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_NUMBER}||print_question.pstpl||Incremental count of questions.&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_VALID_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated valid help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_SCENARIO}||print_question.pstp||Prints out the &#039;scenario&#039; text for conditional questions.&lt;br /&gt;
|-&lt;br /&gt;
|{NAVIGATOR}||navigator.pstpl||Displays navigation buttons (next, prev, last)&lt;br /&gt;
|-&lt;br /&gt;
|{CLEARALL}||All files (but intended for navigator.pstpl)||Displays the &amp;quot;Exit and Clear Results&amp;quot; link&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITBUTTON}||submit.pstpl||Displays the final submit button&lt;br /&gt;
|-&lt;br /&gt;
|{COMPLETED}||completed.pstpl||Displays the &#039;completed&#039; message for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{URL}||completed.pstpl||Displays the survey &#039;url&#039; and &#039;url text&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACY}||submit.pstpl||Displays privacy information when survey is anonymous&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACYMESSAGE}||privacy.pstpl||The privacy message is shown if you set your survey to be anonymous. [[Translating LimeSurvey|The text can be edited/translated]] in the language files. This can also be changed manually by editing the privacy.pstpl template you wish to use.&lt;br /&gt;
|-&lt;br /&gt;
|{TEMPLATEURL}||All Files||The URL to the current template location (useful for referencing image files in your template)&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITCOMPLETE}||endpage.pstpl||The statement (from the language files) that tells the user they have completed the survey, and to press the &amp;quot;Submit&amp;quot; button&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITREVIEW}||survey.pstpl||The statement (from the language files) that tells the user they can review/change the answers they have made by clicking &amp;quot;&amp;lt;&amp;lt; prev&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users first name from the tokens table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users last name from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:EMAIL}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users email from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_1 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_2 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERSCLEARED}||Preferably in navigator.pstpl||The &amp;quot;Answers Cleared&amp;quot; statement from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{RESTART}||clearall.pstpl||URL to restart the survey&lt;br /&gt;
|-&lt;br /&gt;
|{CLOSEWINDOW}||All Files (Preferably in navigator.pstpl)||URL to close current window&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERERROR}||register.pstpl||Shows any error messages in the register page (ie: &amp;quot;You must include an email address&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE1}||register.pstpl||The statement &amp;quot;You must be registered to complete this survey&amp;quot; from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE2}||register.pstpl||Details about registering from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERFORM}||register.pstpl||The actual form for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{SAVE}||Works suitable on navigator.pstpl||Displays the &#039;Save your responses so far&#039; button to offer the user to save and come back later to continue the survey. If the Save option is deactivated in the survey properties the tag will not be shown and ignored.&lt;br /&gt;
|-&lt;br /&gt;
|{LANGUAGECHANGER}||survey.pstpl||Displays a switch in multilingual surveys to change the question.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Input/Buttons== &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
Each &amp;quot;input&amp;quot; type in a survey has been given its own class name, so that you can add CSS to your &amp;quot;startpage.pstpl&amp;quot; file, and have some control over the appearance of form buttons and inputs. These class names are as follows:&lt;br /&gt;
*&#039;&#039;&#039;submit&#039;&#039;&#039; (Submit Buttons)&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; (Text Inputs - for short free text, date and numerical type)&lt;br /&gt;
*&#039;&#039;&#039;answertext&#039;&#039;&#039; (Text of answers)&lt;br /&gt;
*&#039;&#039;&#039;radio&#039;&#039;&#039; (Radio Buttons)&lt;br /&gt;
*&#039;&#039;&#039;checkbox&#039;&#039;&#039; (Check Boxes)&lt;br /&gt;
*&#039;&#039;&#039;select&#039;&#039;&#039; (Select / List Boxes)&lt;br /&gt;
*&#039;&#039;&#039;textarea&#039;&#039;&#039; (Large text inputs - for long free text)&lt;br /&gt;
*&#039;&#039;&#039;clearall&#039;&#039;&#039; (The &amp;quot;Exit and Clear Survey&amp;quot; link)&lt;br /&gt;
*&#039;&#039;&#039;rank&#039;&#039;&#039; (The rank style question. Doesn&#039;t set the colour of the select box or the text boxes (these are set by relevant section above) but does allow changing of background colour, text colour and size etc for the rest of the ranking question)&lt;br /&gt;
*&#039;&#039;&#039;graph&#039;&#039;&#039; (The &amp;quot;percentage completed&amp;quot; graph table)&lt;br /&gt;
*&#039;&#039;&#039;innergraph&#039;&#039;&#039; (The table inside the graph table - this contains the 0% and 100% text. Use this for changing the size of this text)&lt;br /&gt;
*&#039;&#039;&#039;question&#039;&#039;&#039; (General settings for any question that is displayed within a table. Generally you should use this to make sure that their font size and colour is the same as you have used elsewhere as a default)&lt;br /&gt;
*&#039;&#039;&#039;mandatory&#039;&#039;&#039;  (Mandatory questions)&lt;br /&gt;
*&#039;&#039;&#039;input-error&#039;&#039;&#039; (User input error - for if a user has made a mistake with a mandatory question or question with validation)&lt;br /&gt;
*&#039;&#039;&#039;array1&#039;&#039;&#039; and &#039;&#039;&#039;array2&#039;&#039;&#039; (These two styles are cycled when presenting the range of answers for an array type question. This allows you to set an alternating background colour for these question types. &#039;&#039;&#039;Array1&#039;&#039;&#039; is also used for the column headings in these question types)&lt;br /&gt;
*&#039;&#039;&#039;errormandatory&#039;&#039;&#039; (Sets the colour and style of the &amp;quot;This question is mandatory&amp;quot; error message)&lt;br /&gt;
*&#039;&#039;&#039;warningjs&#039;&#039;&#039; (Sets the colour and style of the warning message displayed if the participant&#039;s browser has javascript disabled)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
There are also some elements that can be accessed using the ID of the element (&#039;&#039;&#039;#ID&#039;&#039;&#039; in CSS):&lt;br /&gt;
*&#039;&#039;&#039;surveycontact&#039;&#039;&#039; (The contact message shown on the start page)&lt;br /&gt;
*&#039;&#039;&#039;tokenmessage&#039;&#039;&#039; (used for messages inside the survey, e.g. the session expired error message)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
An example of using these classes with style sheets can be found in the &amp;quot;bubblegum&amp;quot; template that comes with the LimeSurvey application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
Because you can edit all the HTML aspects, there&#039;s no reason to surround your templates with a &amp;lt;div class=&#039;new_name&#039;&amp;gt; and then define a css for that new_name class.&lt;br /&gt;
&lt;br /&gt;
==Styling the progress bar== &amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Before version 1.87:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
The chart.jpg file is a simple one pixel image file which is used to create the progress bar image in the &#039;PERCENTCOMPLETE&#039; table. If the file does not exist, LimeSurvey will use the default &#039;maroon&#039; coloured image in the public directory. If you want to create a bar to match your own colour scheme, then you should save the color in this file. Remember it should be a &#039;&#039;&#039;JPEG&#039;&#039;&#039; file, 1 pixel x 1 pixel, in the colour desired.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
The progress bar appearance can be modified with CSS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
To change the background colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-header {&lt;br /&gt;
 background-color: #3300FF;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
To change the border colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-content,&lt;br /&gt;
#progress-wrapper .ui-widget-header {&lt;br /&gt;
 border: 1px solid #FF0000;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advanced Features Available to Developers== &amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
Starting with version 0.99, LimeSurvey has integrated some user-made patches that allow for some special changes.  These very advanced features generally require changes to the underlying code base of LimeSurvey and should be done carefully so as not to introduce security holes.&lt;br /&gt;
&lt;br /&gt;
===Basic CMS Integration support=== &amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Deprecated: This function is not available anymore in version 2.0 or later&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
To be able to integrate LimeSurvey into another CMS, use the following options in &#039;&#039;&#039;config.php&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
// Set $embedded to true and specify the header and footer functions if the survey is to be displayed embedded in a CMS&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$embedded = false;&lt;br /&gt;
$embedded_inc = &amp;quot;&amp;quot;;               // path to the header to include if any&lt;br /&gt;
$embedded_headerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteHeader for geeklog&lt;br /&gt;
$embedded_footerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteFooter for geeklog&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:133--&amp;gt;&lt;br /&gt;
Set &#039;&#039;&#039;$embedded = true;&#039;&#039;&#039; to enable CMS-embedding. By using the &#039;&#039;&#039;$embedded_inc&#039;&#039;&#039; variable one can include their own &#039;&#039;&#039;.php&#039;&#039;&#039; files.  By setting &#039;&#039;&#039;$embedded_headerfunc&#039;&#039;&#039; or &#039;&#039;&#039;$embedded_footerfunc&#039;&#039;&#039;, one can call functions from within included files that output the relevant headers or footers instead of LimeSurveys default ones.&lt;br /&gt;
&lt;br /&gt;
===Support for your own Javascript functions=== &amp;lt;!--T:134--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:135--&amp;gt;&lt;br /&gt;
Some users may need to run Javascript on the survey pages, but calling &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; in the BODY element made it impossible to do so.  This call has been replaced with a small JavaScript function in the HEAD that sniffs for the existence of &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; and &#039;&#039;&#039;template_onload()&#039;&#039;&#039; before calling each.  This way a template author can create their own &#039;&#039;&#039;template_onload()&#039;&#039;&#039; function in the HEAD that replaces the default one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:136--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
*Disable XSS filter - in Global settings -&amp;gt; Security, set &amp;quot;Filter HTML for XSS&amp;quot; to No.&lt;br /&gt;
*Enter your script in the source of a question or group description.&lt;br /&gt;
*There are more details in the [[Workarounds: Manipulating a survey at runtime using Javascript#How to use Script (eg. JavaScript etc.) in LimeSurvey?|workaround section]].&lt;br /&gt;
&lt;br /&gt;
=Videos on Templates= &amp;lt;!--T:137--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
This video will demonstrate the basic and advanced template functions that are available to all LimeSurvey users. This includes changing the appearance of certain forms and inserting custom graphics. Additionally, it will thoroughly walk you through on how to edit and preview specific page templates, importing/exporting templates, modify appearance of questions in the CSS, customizing survey description page, and completed page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
[http://youtu.be/Uk3FQyDTIY0 LimeSurvey training video - template customization]&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; Tricks= &amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Some language specific element== &amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
If you want to have some language specific sentence in a survey, for example an help at end of each page, you can add in a .pstl file a sentence and hidding it for other language. And hidding it in the template.css, we can use pseudo selector :lang, but for best compatibility, we use some class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
Example for a help sentence at bottom of the page, in french and english, put this on endpage.pstpl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;fr&amp;quot; lang=&amp;quot;fr&amp;quot;&amp;gt;Pour de l&#039;aide en direct appelez le 000000&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;en&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;For some help, please call 000000&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
and in template.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;.lang-fr .en{display:none}&lt;br /&gt;
.lang-en .fr{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
You can use it to for other sentence in your question before 1.92 ( in 1.92, there are better solutions).&lt;br /&gt;
&lt;br /&gt;
==Change the layout of the survey page== &amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
When editing a template this template can be assigned to a single survey while the survey list page, which is shown at www.yourdomain.org/limesurveyinstallfolder, lists all your surveys.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
To use your current template for this page you have change the according setting at the Global Settings screen; at older versions this change can be done by editing the $defaulttemplate setting at the config file: Copy this setting from config-defaults.php to config.php which overrides config-defaults.php and edit this setting to $defaulttemplate = &#039;yourtemplatename&#039;;&lt;br /&gt;
&lt;br /&gt;
==Import/Export of templates: Mac users== &amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
Mac users, please note: Mac OSX default archive utility may have problems with zip folders &amp;quot;generated on the fly&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
a work around is to unix&#039;es unzip from the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
$ unzip template.zip -d template&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
Archive: template.zip&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
 inflating: template/startpage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
 inflating: ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
or scripts in their mac-compiled counterparts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
http://homepage.mac.com/roger_jolly/software/&lt;br /&gt;
&lt;br /&gt;
==Changing your templates traffic light from red to green== &amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
If you haven&#039;t already, set the admin directory to read/write/execute (777). The files within it, however, may be set to read/execute only (chmod 755).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
GO to file directory ie file manager, find templates directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
1 change permission on eg&amp;quot;vallendar&amp;quot; (or any template of your choice) directory to read 777&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
2 voila! the red traffic light on &amp;quot;vallendar&amp;quot; is now green.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:172--&amp;gt;&lt;br /&gt;
3 NOTE: to restrict access for safety, when finished editing template files, change all templates files back to what they were eg 644&lt;br /&gt;
&lt;br /&gt;
==Replacing the help icon== &amp;lt;!--T:173--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:174--&amp;gt;&lt;br /&gt;
When a question help text is shown then an help.gif image is used from the default template folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:175--&amp;gt;&lt;br /&gt;
You can replace this image by uploading a new help.gif, help.png or help.jpg in your custom template folder. It then will be automatically used instead of the default help icon.&lt;br /&gt;
&lt;br /&gt;
==Replacing an existing logo== &amp;lt;!--T:176--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:177--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Before uploading a new logo always delete the old, existing one!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
1. To edit the logo go to the &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; file which you can find it here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
[[File:t1.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:180--&amp;gt;&lt;br /&gt;
2. Click the search button to find occurrences of logo related styles.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
[[File:2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:182--&amp;gt;&lt;br /&gt;
3. Search for &amp;lt;u&amp;gt;#logo&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:183--&amp;gt;&lt;br /&gt;
[[File:3.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
4. Edit the main style file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:185--&amp;gt;&lt;br /&gt;
You will see something similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:186--&amp;gt;&lt;br /&gt;
[[File:t4.PNG|500px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:187--&amp;gt;&lt;br /&gt;
If you want to change the image just replace logo.gif with another image link. Example: (&amp;lt;u&amp;gt;logo.png&amp;lt;/u&amp;gt; or &amp;lt;u&amp;gt;logo.jpg&amp;lt;/u&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
If you want change the image size adjust width and height (in pixels) like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:189--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;width:100px; height:100px;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding your own logo== &amp;lt;!--T:190--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:191--&amp;gt;&lt;br /&gt;
1. Find and open the &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo; template file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
[[File:5.PNG|200px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:194--&amp;gt;&lt;br /&gt;
2. After the &amp;lt;source lang=&amp;quot;html4strict&amp;quot; &amp;gt;&amp;lt;body ... &amp;gt;&amp;lt;/source&amp;gt; tag add this line to &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;img id=&amp;quot;page_logo&amp;quot; src=&amp;quot;{TEMPLATEURL}logo.png&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:196--&amp;gt;&lt;br /&gt;
3. To add logo go to &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo;, you can find it here (see in screen):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:197--&amp;gt;&lt;br /&gt;
[[File:6.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:198--&amp;gt;&lt;br /&gt;
3.1 Then go to the end of the main &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; style file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:199--&amp;gt;&lt;br /&gt;
3.2 To align the logo add...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:200--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at left side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:201--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:left;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at right side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:right;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:208--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want to center the logo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:209--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   display: block;&lt;br /&gt;
   margin-left: auto;&lt;br /&gt;
   margin-right: auto;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use the same template with different logos== &amp;lt;!--T:214--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:215--&amp;gt;&lt;br /&gt;
If you want to use the same template for all surveys and just want to change the logo for each survey, you can use the {SID} placeholder in the template .pstpl file and thereby refer to different images:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:216--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;{TEMPLATEURL}logoImage-{SID}.png&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the default help to all question (hide_tip)== &amp;lt;!--T:217--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:218--&amp;gt;&lt;br /&gt;
There are 3 solutions to remove the default help:&lt;br /&gt;
# like a [[Advanced question settings#hide_tip|hide_tip attribute]] but for all question and survey.&lt;br /&gt;
# you can remove the {QUESTIONHELP} and is container from the file question.pstl, but it can be a bad idea for screenreader.&lt;br /&gt;
# for the default template and some other, add this at the end of tempate.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:219--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;span.questionhelp{display:none;}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Display custom favicon== &amp;lt;!--T:220--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:221--&amp;gt;&lt;br /&gt;
A favicon is the little icon you see in the browser&#039;s address bar, list of bookmarks or tab. You can display your own icon as follows:&lt;br /&gt;
#Create a favicon - google will find you lots of free favicon generators&lt;br /&gt;
#Name your new favicon &amp;quot;favicon.ico&amp;quot; and place it in your template directory&lt;br /&gt;
#Add the following code to your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; before the &amp;lt;/head&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:222--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;link rel=&amp;quot;icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Different appearance for survey-/question-pages== &amp;lt;!--T:224--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:225--&amp;gt;&lt;br /&gt;
(&#039;&#039;Version 1.91 and newer&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:226--&amp;gt;&lt;br /&gt;
If you want LimeSurvey to change the appearance of every second page (i.e. of even and odd survey pages) you can use &#039;&#039;&#039;.page-odd&#039;&#039;&#039; class in your css file to change the appearance of odd pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:227--&amp;gt;&lt;br /&gt;
example from default template of LimeSurvey 1.91+&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:228--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
.page-odd table.question-group {&lt;br /&gt;
 background-color: #D2F2D3;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:232--&amp;gt;&lt;br /&gt;
To &#039;&#039;&#039;not&#039;&#039;&#039; differentiate even and odd pages at the (default) template find all instances of &#039;&#039;.page-odd&#039;&#039; in template.css and remove those styles.&lt;br /&gt;
&lt;br /&gt;
==Create a vertical separator  border for dual scale array== &amp;lt;!--T:233--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:234--&amp;gt;&lt;br /&gt;
To create a vertical separator border for a dual scale array you can add the following lines to your &#039;&#039;&#039;template.css&#039;&#039;&#039;-file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:235--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
table.question thead td.header_separator,&lt;br /&gt;
table.question tbody td.dual_scale_separator&lt;br /&gt;
{&lt;br /&gt;
   border-right:solid 1px #00A8E1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:242--&amp;gt;&lt;br /&gt;
header_separator is used to adress the separator for the header &amp;quot;td&amp;quot; and &amp;quot;dual_scale_separator&amp;quot; is used to adress the separator column in the dual scale array.&lt;br /&gt;
&lt;br /&gt;
==Hide the survey contact message shown on the start page/survey list== &amp;lt;!--T:243--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:244--&amp;gt;&lt;br /&gt;
To hide the &amp;quot;Please contact ...&amp;quot; message on the start page (with the survey list) you can add the following to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.js&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:245--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:246--&amp;gt;&lt;br /&gt;
$(&#039;#surveycontact&#039;).hide(); //Hides the survey contact message&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:247--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the survey contact message shown on error messages== &amp;lt;!--T:248--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:249--&amp;gt;&lt;br /&gt;
If you want to remove the survey contact message from error messages it&#039;ll be trickier. You can add the following function call to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.css&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:250--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
removeContactAdressFromMessage(); //Removes the survey contact message from error messages&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:253--&amp;gt;&lt;br /&gt;
and add the following function to your *template.js* file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:254--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
function removeContactAdressFromMessage()&lt;br /&gt;
{&lt;br /&gt;
if ($(&#039;#tokenmessage&#039;).length &amp;gt; 0)&lt;br /&gt;
   {&lt;br /&gt;
   var oldMessage = $(&#039;#tokenmessage&#039;).html();&lt;br /&gt;
   var indexContact = oldMessage.indexOf(&#039;Bitte kontaktieren&#039;);&lt;br /&gt;
   var newMessage = oldMessage.substr(0, indexContact);&lt;br /&gt;
   $(&#039;#tokenmessage&#039;).html(newMessage);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:266--&amp;gt;&lt;br /&gt;
It will probably not work for an englisch survey and have to be extended when using for multilingual surveys. But it&#039;s an idea/tip how to solve this.&lt;br /&gt;
&lt;br /&gt;
==How to deal with multilingual question attributes (before version 2.0 at which those were added)== &amp;lt;!--T:267--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:268--&amp;gt;&lt;br /&gt;
If you have a multilingual survey and e. g. want to use a different string for the &amp;quot;other&amp;quot; field, this could only be done for the base language (until this feature was added at LimeSurvey 2.0). To work around this, paste in the field to change the label for &amp;quot;other&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:269--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;en&amp;quot;&amp;gt;New label&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;fr&amp;quot;&amp;gt;Nouveau label&amp;lt;/span&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:270--&amp;gt;&lt;br /&gt;
At the template.css of your template (at /limesurvey/upload/templates/&amp;lt;yourtemplatename&amp;gt;/template.css) add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:271--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;html:lang(en) .fr{display:none}&lt;br /&gt;
html:lang(fr) .en{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=57589</id>
		<title>Theme editor</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=57589"/>
		<updated>2013-10-12T01:55:37Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
LimeSurvey has a basic template and style system providing a theme-like capability found in many browser-based applications.  They are simply termed &#039;&#039;&#039;Templates&#039;&#039;&#039; here.  The Templates allow control over the look and feel of pages during a survey.  A survey administrator can select the template to use for each survey to thus personalize that survey&#039;s look and feel.  Changes to a Template can be as simple as adding a unique logo on the welcome page, changing background colors, or maybe new text colors for specific types of questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
LimeSurvey comes with a set of templates right out of the box. These initial templates are defined by directories within the LimeSurvey installation &amp;quot;templates&amp;quot; directory.  Each template has it&#039;s own directory.  Within the main directory of a template are numerous files: &#039;&#039;&#039;templates (.pstpl)&#039;&#039;&#039;, &#039;&#039;&#039;cascading style sheets (.css)&#039;&#039;&#039;, &#039;&#039;&#039;images&#039;&#039;&#039; (&#039;&#039;&#039;.jpg&#039;&#039;&#039; or &#039;&#039;&#039;.png&#039;&#039;&#039;) and maybe others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Like in other theme-based systems, fragments of HTML code are stored in the .pstpl template files.  These fragments are read in and used to construct the page to display to the end user during the operation of a survey. Often &#039;&#039;&#039;keywords&#039;&#039;&#039; surrounded by curly braces are included in the files that are then replaced with the relevant text.  The following gives an example of a template file content and its result when used in a survey page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&amp;lt;font face=&#039;verdana&#039; color=&#039;red&#039;&amp;gt;{SURVEYNAME}&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;verdana&#039; color=&#039;blue&#039;&amp;gt;&amp;lt;u&amp;gt;{SURVEYDESCRIPTION}&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
One gets a result that looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:278--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&#039;&#039;&#039;&amp;lt;span style=&#039;color:red&#039;&amp;gt;My New Survey&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;u&amp;gt;&amp;lt;span style=&#039;color:#0000ff&#039;&amp;gt;This is a survey written by me to find out what sort of chocolate people like.&amp;lt;/span&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Templates, being HTML code, tend to define the positioning and type of text to be displayed and similar structural features of the page.  They often reference or include other files.  Most reference a common cascading style sheets (CSS) file that defines the font style, color, size, background and similar parameters common to all pages in the survey. Style sheets reference HTML &#039;&#039;&#039;class&#039;&#039;&#039; parameters that are associated with the various types of objects in the HTML code.  This allows the style sheet to describe once how to display each of the many types of text or other objects that may appear in multiple places.  There are unique classes for each question type in LimeSurvey and thus giving detailed control over the appearance of each.  Image files, like logos or special progress-bar constructors, may be referenced as well in the Template file.  Finally, special Keywords in curly braces are replaced with text defined in the Survey for each of its corresponding language translations (for example, the Survey Title or Question Text for each language defined).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
If you create a new custom template, please consider contributing it back to the LimeSurvey community, and make it available to others. With your help, we can grow our repository of templates, surveys, and other ad-ons, to make LimeSurvey even better! See the shared [http://www.limesurvey.org/en/download-limesurvey-design-templates/com_josetta_menu_control_panel/viewcategory/9-survey-design-templates Template Repository]&lt;br /&gt;
&lt;br /&gt;
=Creating a new Template= &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
To be able to create a new template (or edit an existing template), you need Template Editing user permission in LimeSurvey as well as permission to manipulate the files in the underlying operating system hosting your LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note of Warning:&#039;&#039;&#039; As template changes can affect all surveys in an installation, changes should be limited to those skilled in understanding general concepts in the code base. Templates are an advanced feature that can take some experimentation to get correct if you are not familiar with HTML code methods.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
The preferred way to create a new template is through the Template Editor (see below) via the web Admin interface. Some people may like to work directly with template files so that they can use their favorite text editor instead of the web interface. In this case, still use the Template Editor to first create your new template. This will create a new base template with all the files you need in the LimeSurvey_web_root/upload/templates/your_new_template directory. From there you can use your text editor to manually adjust the template files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Permissions Note:&#039;&#039;&#039; on unix/linux systems, these template files will be owned by the group and user who the web server is running as (may be &amp;quot;www&amp;quot; for some systems). So make sure you have access to edit these files, and when you save them make sure they don&#039;t change ownership, so you can still use the web Template Editing interface if needed&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Template files may seem complex to understand at first. You have to likely understand HTML code, possibly Styles and Style Sheets, and have access to the underlying LimeSurvey installation files if the template files and directories are not editable. Copy an existing template to a new directory to play around with the content. This may help make the concept clearer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
A number of the &#039;public&#039; elements of LimeSurvey can be adjusted by a series of templates. This section provides a very brief explanation of these templates.&lt;br /&gt;
&lt;br /&gt;
=The LimeSurvey Template Editor= &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
To ease the understanding and quick update of a Template, LimeSurvey provides a &#039;&#039;&#039;Template Editor&#039;&#039;&#039; in the main &#039;&#039;&#039;administrative&#039;&#039;&#039; toolbar of the application.  This Template Editor is only available to users given the privilege in the User Security settings.  A template effects all surveys and can render a survey inoperable if not constructed properly.  So Template editing is thought best restricted to a very limited, knowledgeable set of users.  Having permission to enter the Template Editor is not enough though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
The LimeSurvey Template Editor allows you to edit the contents of your templates online. Start the Template Editor by clicking on the &amp;quot;Template Editor&amp;quot; icon [[File:templates.png]] in the LimeSurvey Administration toolbar (Templates). The main screen is similar to the LimeSurvey Survey Administration screen. It allows you to select the template to edit/view. Once this has been selected you can then select from one of the different public survey pages. You are then presented with a list of the template files that make up that particular page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:279--&amp;gt;&lt;br /&gt;
[[File:Template-editor-2013-7-10_11_38_16.png|center]]&lt;br /&gt;
&lt;br /&gt;
==The Template Menu== &amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:280--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Edit Icon:&#039;&#039;&#039; The &amp;quot;edit&amp;quot; icon indicates whether or not the template is editable. A blurred out icon indicates that the template is read only; a clickable icon indicates you may make modifications. To change the icon from blurred to clear, you have to modify the template&#039;s permissions.&lt;br /&gt;
*&#039;&#039;&#039;Import Template:&#039;&#039;&#039; Allows you to import a template.&lt;br /&gt;
*&#039;&#039;&#039;Export Template:&#039;&#039;&#039; Allows you to export the current template to a .zip-File.&lt;br /&gt;
*&#039;&#039;&#039;Copy Template:&#039;&#039;&#039; Allows you to make a new template by copying the current one.&lt;br /&gt;
*&#039;&#039;&#039;Rename this template:&#039;&#039;&#039; Allows you to change the name of the template.  Generally used after copying an existing template or importing a template by manipulating the underlying directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
The &amp;quot;Screen&amp;quot; drop-down list on the right allows you to choose which particular survey page you are currently looking at.&lt;br /&gt;
&lt;br /&gt;
==Import/Export/Copy a Template== &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
When you &#039;&#039;&#039;export &#039;&#039;&#039;a template, this will create a zip-file archive with all the files your template consists of (.pstpl files, images, css files, ...). You can simply &#039;&#039;&#039;import &#039;&#039;&#039;the exported zip-file at other LimeSurvey systems by using the import feature or you can manually copy the archive to another installation and extract it into the corresponding template directory there. If you copy the template in the same installation, you will need to rename the folder to create another named copy of that template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
If the file and directory permissions are open for the LimeSurvey application to write, then you can use the programs &#039;&#039;&#039;copy &#039;&#039;&#039;and rename features to make a local copy of a template.&lt;br /&gt;
&lt;br /&gt;
==Page Structure / Template Use== &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;The Welcome Page:&#039;&#039;&#039; startpage.pstpl, welcome.pstpl, privacy.pstpl,  navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Questions Pages:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, startgroup.pstpl, groupdescription.pstpl, question.pstpl, endgroup.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Submit Page:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, submit.pstpl, (privacy.pstpl), navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Final Page:&#039;&#039;&#039; startpage.pstpl, assessment.pstpl, completed.pstpl, endpage.pstpl&lt;br /&gt;
&lt;br /&gt;
==Template Files== &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
The following template files are used to produce your public survey and must exist in any new template folder you create:&lt;br /&gt;
*&#039;&#039;&#039;startpage.pstpl:&#039;&#039;&#039; Produces the start of each html page. It starts at the &amp;quot;&amp;lt;head&amp;gt;&amp;quot; tag, and should not contain the &amp;quot;&amp;lt;html&amp;gt;&amp;quot; tag. This &#039;very beginning&#039; of a standard html page is written by the scripts. Please ensure that your startpage.pstpl files contains a &amp;lt;body&amp;gt; tag, even though many browsers do not require strict adherence to the W3 HTML stanards, the LimeSurvey script needs to find a &amp;lt;body&amp;gt; tag, to run certain javascript elements. It is not expected that many &#039;keywords&#039; will be used in the startpage.pstpl file, however you may wish to put the {SURVEYNAME} into the title. The startpage.pstpl file can contain code that ends in the corresponding endpage.pstpl file, so you can start a table in this file and close the table in the endpage.pstpl file. The startpage.pstpl and endpage.pstpl files wrap around every possible page used by LimeSurvey.&lt;br /&gt;
*&#039;&#039;&#039;survey.pstpl:&#039;&#039;&#039; This template is the second used on most pages, and provides a space to put the survey name and description. This template does not have a corresponding &#039;closing&#039; template, and subsequently you should close all tags opened in this template file (ie: don&#039;t leave a table open here because there is nowhere else to close it)&lt;br /&gt;
*&#039;&#039;&#039;welcome.pstpl:&#039;&#039;&#039; This template is only used in the welcome screen (which is also on the main page for &#039;all in one&#039; surveys). You can use this to print out the welcome text, and other information that should be provided in the introduction. Like the &#039;survey.pstpl&#039; file, there is no corresponding &#039;closing&#039; template, so all tags opened in this template file should be closed as well.&lt;br /&gt;
*&#039;&#039;&#039;startgroup.pstpl:&#039;&#039;&#039; This template can provide a &#039;summary&#039; wrap around for questions within a group. It has a matching &#039;endgroup.pstpl&#039; template that can be used to close any opened tags in this file, so you can open a table within this.&lt;br /&gt;
*&#039;&#039;&#039;groupdescription.pstpl:&#039;&#039;&#039; This template file is used to display a description of a group. It is separate to the startgroup.pstpl file because in a &amp;quot;question by question&amp;quot; survey it will be displayed on its own unique page in between groups, whereas in a &amp;quot;group by group&amp;quot; or &amp;quot;all in one&amp;quot; survey it provides a header to the subsequent questions. groupdescription.pstpl does not have a corresponding &#039;closing&#039; template file, so all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question.pstpl:&#039;&#039;&#039; This file contains the question, answer and help text sections of your survey, and in the &amp;quot;group by group&amp;quot; and &amp;quot;all in one&amp;quot; surveys this template is cycled repeatedly with each question. There is no corresponding closing file for this and all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question_start.pstpl:&#039;&#039;&#039; This file contains the individual elements found at the start of a question. It is included within &#039;question.pstpl&#039; via the {QUESTION} keyword. It is intended to allow template designers more control over the layout of a question. This template sits outside the normal templating system and &#039;&#039;&#039;was superseeded (as of LS1.87)&#039;&#039;&#039;. All keywords from this template are now available directly in question.pstpl. NOTE: templates using question_start.pstpl will still work at least for a couple more versions of LS 1.x&lt;br /&gt;
*&#039;&#039;&#039;submit.pstpl (and privacy.pstpl):&#039;&#039;&#039; This page is the penultimate page for all types of survey (except the &amp;quot;all in one&amp;quot; type) where the participant is given an option to review questions before submitting their responses. It provides privacy information where a survey is anonymous, which it extracts from the &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039; file.&lt;br /&gt;
*&#039;&#039;&#039;completed.pstpl:&#039;&#039;&#039; This page is displayed as the final page when the survey responses have been saved and the survey is over. It can be used to display a &amp;quot;forwarding link&amp;quot; as set in the survey setup.&lt;br /&gt;
*&#039;&#039;&#039;endgroup.pstpl:&#039;&#039;&#039; This file closes the group, and can be used to close off any tags opened in the startgroup.pstpl file&lt;br /&gt;
*&#039;&#039;&#039;navigator.pstpl:&#039;&#039;&#039; This file contains the buttons that navigate through the survey, &amp;quot;next&amp;quot;, &amp;quot;prev&amp;quot;, &amp;quot;last&amp;quot;, &amp;quot;submit&amp;quot;, &amp;quot;save so far&amp;quot;  and the &amp;quot;clear all&amp;quot; link. It is used in all pages except the completed page.&lt;br /&gt;
*&#039;&#039;&#039;printanswers.pstpl:&#039;&#039;&#039; This file has the HTML wrapper for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_group.pstpl:&#039;&#039;&#039; This file is the same as startgroup.pstpl endgroup.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_question.pstpl:&#039;&#039;&#039; This file is the same as question.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_survey.pstpl:&#039;&#039;&#039; This file is the same as survey.pstpl but for the print version of the survey.&lt;br /&gt;
&lt;br /&gt;
== CSS and Javascript== &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Two files are allways used for template : template.css for css and template.js for javascript.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATECSS}:&#039;&#039;&#039; Add lines for default css, template.css and template-rtl.css for rtl language.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATEJS}:&#039;&#039;&#039; Add lines for default javascript files, template.js and all js files needed for LimeSurvey.&lt;br /&gt;
&lt;br /&gt;
=== Replacing default css or javascript=== &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Some question use specific files for javascript or css. You can use your own files. All files used in your survey included in ./scripts or in .//styles-public can be replaced, just put a file with the same name in your template.&lt;br /&gt;
&lt;br /&gt;
==Other Template Files== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
The &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;invitationemail.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;reminderemail.pstpl&#039;&#039;&#039; and &#039;&#039;&#039;confirmationemail.pstpl&#039;&#039;&#039; are no longer used by LimeSurvey and defaults are instead set in the applicable language files. The email messages can now be edited on a survey by survey basis.&lt;br /&gt;
&lt;br /&gt;
==Standard Pages== &amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
There are ten standard pages that a survey participant may see in the course of taking or accessing the LimeSurvey application.  Each is constructed from a number of common &#039;&#039;&#039;Template&#039;&#039;&#039; files from the &#039;&#039;&#039;Template&#039;&#039;&#039; specified in the survey&#039;s settings.  The table below indicates which template files are used in constructing each of these pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!  &#039;&#039;&#039;Survey Pages:&#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039;Template Files&#039;&#039;&#039;!!Survey&amp;lt;br /&amp;gt;List!!Welcome!!Question!!Completed!!Clear All!!Register!!Load!!Save!!Print&amp;lt;br /&amp;gt;Answers!!Print&amp;lt;br /&amp;gt;Survey&lt;br /&gt;
|-&lt;br /&gt;
|SurveyList||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Welcome|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Privacy|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Navigator|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Survey|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|StartGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|GroupDescription|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Question&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|EndGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Assessment|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Completed|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|ClearAll|| || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Register|| || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Load|| || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||&lt;br /&gt;
|-&lt;br /&gt;
|Save|| || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| ||&lt;br /&gt;
|-&lt;br /&gt;
|PrintAnswers|| || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||&lt;br /&gt;
|-&lt;br /&gt;
|Print Survey || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Group || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Question || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|StartPage&amp;lt;br /&amp;gt;EndPage&amp;lt;br /&amp;gt;Template.css||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In versions 1.90 and up this replaces question.pstpl AND question_start.pstpl. If you are using an old custom template, you need to add the following line to the beginning of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div {QUESTION_ESSENTIALS} class=&amp;quot;{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;And then add the corresponding closing tag to the end of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In version 1.91 and earlier, LimeSurvey js files are not included by the template. In version 2, &#039;&#039;&#039;you have to use {TEMPLATEJS} in your one of your template file&#039;&#039;&#039; to add the link to the js file. You can add it in startpage.pstpl or in endpage.pstpl. You can remove the {TEMPLATEURL}/template.js line and you have to replace with {TEMPLATEJS} to update a personal template.&lt;br /&gt;
&lt;br /&gt;
==The File Control Section== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
In the &amp;quot;file control&amp;quot; window on the left, you can click on one of the template files that is used to compile the page. The HTML code for that file will then appear in the &amp;quot;Now editing&amp;quot; window in the center. If the template is editable (determined by directory permissions) you can then make any changes and save them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
The &amp;quot;Other Files&amp;quot; window shows a list of all other files in the template directory. You can use the right side to &#039;&#039;&#039;upload and select image files (your pics, logos,...) or other files needed to create your template&#039;&#039;&#039;. Note: Instead of a link directly to each picture in your template you can use the field string {TEMPLATEURL}.  So instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;/limesurvey/templates/yourtemplate/mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
You can use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;{TEMPLATEURL}mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
A &amp;quot;sample&amp;quot; of the template page you are editing will be visible at the bottom of the screen. There is no way to to delete a template from the template editor. This must be done by accessing the underlying directory and deleting the file there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; The shipped templates cannot be edited using the Template Editor and should never be changed. If you want to modify them, create a copy first and modify the copy.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Location of template files== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
LimeSurvey stores each of the &#039;standard&#039; templates in their own distinct sub-directory within the /templates directory that is kept in the public directory with the other LimeSurvey public files. Customized user templates are stored in the /upload/templates directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
To create a new template, use the according icon in the template editor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
There should ALWAYS be a &amp;quot;default&amp;quot; directory in the templates directory. This template is used by default and as a fall-back if a template folder doesn&#039;t exist, or can&#039;t be found. The &amp;quot;default&amp;quot; directory comes with the package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
You can use any image files that you upload into the template management area with syntax like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;{TEMPLATEURL}filename.xyz&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Styling questions with CSS= &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
Styling of questions in CSS has become much easier. Each question type now has a unique class. Mandatory question&#039;s also have an additional mandatory class. For example, for a non-mandatory question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
and if the question is mandatory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
and if the question is mandatory but the user didn&#039;t answer it or if there is validation on a question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
and if the question has validation applied but the user hasn&#039;t answered correctly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question6&amp;quot; class=&amp;quot;text-short input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Global classes for question part== &amp;lt;!--T:273--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:274--&amp;gt;&lt;br /&gt;
These classes are used for each question type. Some question types use only one or two class, but others can use much more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:281--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable alternance&amp;quot;&lt;br /&gt;
|+ Global classes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Class name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Part&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Question type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Examples&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Note&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question&lt;br /&gt;
| All question block&lt;br /&gt;
| All question type&lt;br /&gt;
|&amp;amp;lt;p class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;ul class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;question&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .subquestions-list&lt;br /&gt;
| List of subquestion&lt;br /&gt;
| Multi choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;subquestions-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;subquestions-list&amp;quot;&amp;gt;&lt;br /&gt;
| .questions-list is used too&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answers-list&lt;br /&gt;
| List of answers&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;answers-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;answers-list&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answer-item&lt;br /&gt;
| The answer part: one answer&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;answer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;answer-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .noanswer-item&lt;br /&gt;
| The answer part for no answer&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;noanswer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
| No answer is an answer too, then have double class noanswer-item and answer-item&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question-item&lt;br /&gt;
| The question part: one question&lt;br /&gt;
| Multi text question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;question-item&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;question-item&amp;quot;&amp;gt;&lt;br /&gt;
| Some answer are question too, then we have a lot of class=&amp;quot;question-item answer-item&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-list&lt;br /&gt;
| A list of checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;checkbox-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;checkbox-list&amp;quot;&amp;gt;&lt;br /&gt;
| Some question type have multi list class: like checkbox with comment : class=&amp;quot;checkbox-list text-list&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-item&lt;br /&gt;
| The answer part with a checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;checkbox-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;checkbox-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-list&lt;br /&gt;
| A list of radio item&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;radio-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;radio-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-item&lt;br /&gt;
| The answer part with a radio&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;radio-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;radio-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-list&lt;br /&gt;
| A list of text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-item&lt;br /&gt;
| The answer part of a text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;text-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;text-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-list&lt;br /&gt;
| A list of text input with numeric only answer&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-item&lt;br /&gt;
| The answer part of a numeric input&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;numeric-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;numeric-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-list&lt;br /&gt;
| A list of select&lt;br /&gt;
| Array numbers, Dual scale array (select)&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;select-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-item&lt;br /&gt;
| The answer part of a select&lt;br /&gt;
| Array numbers, Dual scale array (select), single choice with select&lt;br /&gt;
| &amp;amp;lt;p class=&amp;quot;select-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;select-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .hide&lt;br /&gt;
| Used for accessibility: hidden with css but read by screenreader&lt;br /&gt;
| Short text question&lt;br /&gt;
| &amp;amp;lt;label class=&amp;quot;hide&amp;quot;&amp;gt;&lt;br /&gt;
| Can be used for other purpose&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .dontread&lt;br /&gt;
| Used for accessibility: not be read by screenreader&lt;br /&gt;
| Array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;dontread&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox&lt;br /&gt;
| input[type=checkbox]&lt;br /&gt;
| Question with checkbox&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;checkbox&amp;quot; class=&amp;quot;checkbox&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio&lt;br /&gt;
| input[type=radio]&lt;br /&gt;
| Question with radio&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;radio&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text&lt;br /&gt;
| input[type=text]&lt;br /&gt;
| Question with input text, or textarea&lt;br /&gt;
| &amp;amp;lt;textarea class=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answertext&lt;br /&gt;
| Array question type&lt;br /&gt;
| Answer part of array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;answertext&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .col-answers&lt;br /&gt;
| Array question type&lt;br /&gt;
| Column of answers&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .array1 .array2&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for line&lt;br /&gt;
| &amp;amp;lt;tr class=&amp;quot;array1&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Some example of question part with classes=== &amp;lt;!--T:275--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:276--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;text-short question type:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;question answer-item text-item &amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label class=&amp;quot;hide label&amp;quot; for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Answer&amp;lt;/label&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;50&amp;quot; class=&amp;quot;text  empty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:277--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Multiple short text&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul class=&amp;quot;subquestions-list questions-list text-list&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li class=&amp;quot;question-item answer-item text-item&amp;quot; id=&amp;quot;javatbdSGQA&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Some example subquestion&amp;lt;/label&amp;gt;&lt;br /&gt;
     &amp;lt;span&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;20&amp;quot; class=&amp;quot;text empty&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:282--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Array question type&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;question subquestion-list questions-list &amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;caption class=&amp;quot;hide read&amp;quot;&amp;gt;Some explanation for accessibility.&amp;lt;/caption&amp;gt;&lt;br /&gt;
	&amp;lt;colgroup class=&amp;quot;col-responses&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;50%&amp;quot; class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;25%&amp;quot; class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;13.3%&amp;quot; class=&amp;quot;col-no-answer even&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/colgroup&amp;gt;&lt;br /&gt;
	&amp;lt;thead&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array1 dontread&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;No answer&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/thead&amp;gt;&lt;br /&gt;
	&amp;lt;tbody&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array2 answers-list radio-list&amp;quot; id=&amp;quot;javatbdSGQ&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;20%&amp;quot; class=&amp;quot;answertext&amp;quot;&amp;gt;Some example subquestion&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer_cell_001 answer-item radio-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;1&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;1&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer-item radio-item noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;No answer&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The full list of question classes== &amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Question Type&#039;&#039;&#039;||&#039;&#039;&#039;Question Class&#039;&#039;&#039;||&#039;&#039;&#039;Question ID&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|5 point choice||.choice-5-pt-radio||5&lt;br /&gt;
|-&lt;br /&gt;
|Array (10 point choice)||.array-10-pt||B&lt;br /&gt;
|-&lt;br /&gt;
|Array (5 point choice)||.array-5-pt||A&lt;br /&gt;
|-&lt;br /&gt;
|Array (Flexible Labels) dual scale||.array-flexible-duel-scale ||1&lt;br /&gt;
|-&lt;br /&gt;
|Array (Increase, Same, Decrease)||.array-increase-same-decrease||E&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Numbers)||.array-multi-flexi ||:&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Text)||.array-multi-flexi-text||;&lt;br /&gt;
|-&lt;br /&gt;
|Array (Yes/No/Uncertain)||.array-yes-uncertain-no||C&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels)||.array-flexible-row ||F&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels) by column||.array-flexible-column||H&lt;br /&gt;
|-&lt;br /&gt;
|Boilerplate question||.boilerplate||X&lt;br /&gt;
|-&lt;br /&gt;
|Date||.date||D&lt;br /&gt;
|-&lt;br /&gt;
|Gender||.gender||G&lt;br /&gt;
|-&lt;br /&gt;
|Huge free text||.text-huge||U&lt;br /&gt;
|-&lt;br /&gt;
|Language switch||.language||I&lt;br /&gt;
|-&lt;br /&gt;
|List (dropdown)||.list-dropdown||!&lt;br /&gt;
|-&lt;br /&gt;
|List (radio)||.list-radio||L&lt;br /&gt;
|-&lt;br /&gt;
|List with comment||.list-with-comment||O&lt;br /&gt;
|-&lt;br /&gt;
|Long free text||.text-long||T&lt;br /&gt;
|-&lt;br /&gt;
|Multiple numerical input||.numeric-multi||K&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options||.multiple-opt||M&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options with comments||.multiple-opt-comments||P&lt;br /&gt;
|-&lt;br /&gt;
|Multiple short text||.multiple-short-txt||Q&lt;br /&gt;
|-&lt;br /&gt;
|Numerical input||.numeric||N&lt;br /&gt;
|-&lt;br /&gt;
|Ranking||.ranking||R&lt;br /&gt;
|-&lt;br /&gt;
|Short free text||.text-short||S&lt;br /&gt;
|-&lt;br /&gt;
|Yes/No||.yes-no||Y&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The full list of validation classes== &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Note:  Prior to 1.92, only .mandatory and .input-error classes were available.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
These apply to the help and/or validation tip messages so that each type can be individually styled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
The .hide-tip option and .input-error options, by default, interact so that you can have validation tips start hidden, but appear when there validation errors, and disappear again when those errors are rectified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
All of these are designed to eliminate the need for pop-up alert messages.  Instead, tips can appear/disappear as needed, and are color-coded to indicate whether the answers pass the validation criteria.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
Furthermore, when you first visit a page that has unmet validation criteria, you can color-code the tips in a pleasing color to show which validation criteria have not been med; then re-display the page using a harsher color if the person submits the page with lingering validation errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Purpose&#039;&#039;&#039;||&#039;&#039;&#039;CSS Class&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Mandatory||.mandatory||the question is mandatory&lt;br /&gt;
|-&lt;br /&gt;
|User input error||.input-error||the question had at least one validation error&lt;br /&gt;
|-&lt;br /&gt;
|Hide Tip||.hide-tip||added if you use the hide_tip option&lt;br /&gt;
|-&lt;br /&gt;
|Num answers||.em_num_answers||for for min_answers and max_answers&lt;br /&gt;
|-&lt;br /&gt;
|Value range||.em_value_range||for min/max_num_value_n and multiflexible_min/max&lt;br /&gt;
|-&lt;br /&gt;
|Sum range||.em_sum_range||for min/max/equals_num_value&lt;br /&gt;
|-&lt;br /&gt;
|Regex validation||.em_regex_validation||for regular-expression validation of the question&lt;br /&gt;
|-&lt;br /&gt;
|Question-level validation function||.em_q_fn_validation||for the em_validation_q option&lt;br /&gt;
|-&lt;br /&gt;
|Subquestion-level validation function||.em_sq_fn_validation||for the em_validation_sq option&lt;br /&gt;
|-&lt;br /&gt;
|Other comment mandatory||.em_other_comment_mandatory||for other_comment_mandatory option - shows when &amp;quot;other&amp;quot; is selected but associated comment is missing.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Importing styles into your custom template== &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
The custom question styles are near the bottom of each template&#039;s CSS file and start with:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;/* --------------------------- START: Question styles  ------------------------------ */&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
If you&#039;re styling your own custom template, you should be able to copy everything after the above from templates/default/template.css (for tables based layouts) or /templates/limespired/template.css (for CSS based layouts) into your own style sheet without any impact on your other styles.&lt;br /&gt;
&lt;br /&gt;
==Internet Explorer conditional style sheets== &amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
Because of the marked discrepancies in rendering between IE6, IE7 and most other browsers, there are special IE conditional style sheets included for each template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_all-versions.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if lt IE 7]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_older-than-7.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8]&amp;gt;&lt;br /&gt;
		&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}ie_fix_8.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
You should include the above code within your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; and copies of both the IE style sheets from either /templates/default/ or /templates/limespired for Tables base layout and CSS based layout respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; If you copy the styles into your own style sheet you will almost certainly need to tweak them.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alternative solution for Internet explorer=== &amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
You can put conditional class for body in startpage.pstpl, and use this class in your template.css. This method is used in citronade template. Adding a js / no-js class to to have javascript / no javascript system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;!--[if lt IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie6 ielt7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie8 ielt9  no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 9 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if gt IE 9]&amp;gt;&amp;lt;!--&amp;gt;&amp;lt;body id=&amp;quot;body&amp;quot; class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} no-js&amp;quot;&amp;gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;script type=&#039;text/javascript&#039;&amp;gt;/*&amp;lt;![CDATA[*/(function(H){ H.className=H.className.replace(/\bno-js\b/,&#039;js&#039;) })(document.getElementsByTagName(&#039;body&#039;)[0]);/*]]&amp;gt;*/&amp;lt;/script&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
And in template.css use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;.ie6{/*specific for internet explorer 6*/}&lt;br /&gt;
.ielt8{/*specific for internet explorer 6 and 7*/}&lt;br /&gt;
.ie{/*specific for all internet explorer */}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Right-to-Left (RTL) Languages and justify== &amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
The text editor within LimeSurvey is able to format RTL Text. However, the editor itself shows the RTL language in a left to right format when justified.  This is just an editor display issue. The RTL and justified question or text will display correctly from right to left, even when justified, in your survey or on preview.&lt;br /&gt;
&lt;br /&gt;
==Keywords== &amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
Keywords within a template file get replaced by the current survey information. They are surrounded by curly brackets, for example: {SURVEYNAME}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
The following strings will be replaced by LimeSurvey when parsing the template file and presenting it to survey users. These field strings will work on almost every template except for the &#039;Completed Page&#039;. (Most of these strings can be found in the common.php file. If it&#039;s not there, look in the index.php file.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
!&#039;&#039;&#039;Keyword&#039;&#039;&#039;!!&#039;&#039;&#039;Template files&#039;&#039;&#039;!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||All Files||The survey title&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||All Files||The survey description&lt;br /&gt;
|-&lt;br /&gt;
|{WELCOME}||All files (mainly for welcome.pstpl)||The survey &#039;welcome&#039; text&lt;br /&gt;
|-&lt;br /&gt;
|{PERCENTCOMPLETE}||survey.pstpl||A small graph showing the percentage of the survey completed&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPNAME}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group name&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPDESCRIPTION}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group description&lt;br /&gt;
|-&lt;br /&gt;
|{NUMBEROFQUESTIONS}||welcome.pstpl||Displays the total number of questions in the survey (just the number)&lt;br /&gt;
|-&lt;br /&gt;
|{THEREAREXQUESTIONS}||welcome.pstpl||Displays the sentence &amp;quot;There are X questions in this survey&amp;quot; - from the relevant language file. The X is replaced with the number of questions. Note that this will also work appropriately for singular or plural. If there is only 1 question, it will print &amp;quot;There is 1 question in this survey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|{CHECKJAVASCRIPT}||All files (mainly for welcome.pstpl)||Warning message when end-user browser have javascript disabled&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION}||Question.pstpl||(&#039;&#039;&#039;Has been superseeded but the {QUESTION_...} keywords as of LS1.87&#039;&#039;&#039;) Displays the current question text (The format of {QUESTION} can customised by editing &#039;question_start.pstpl&#039;) Use the following: {QUESTION_TEXT}, {QUESTION_MANDATORY}, {QUESTION_HELP}, {QUESTION_MAN_MESSAGE}, {QUESTION_VALID_MESSAGE} and {QUESTION_INPUT_ERROR_CLASS} and appropriate wrapping HTML instead of {QUESTION}&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWER}||question.pstpl, print_question.pstpl||presents the answer form for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{SGQ}||question.pstpl, question text||Can be used in the question text itself, to reference the input field of the question dynamically by displaying the Survey-Group-Question id for the current question. (as of svn build 9755)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTIONHELP}||question.pstpl, print_question.pstpl||Displays help text (predefined tip for question type) for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CLASS}||question.pstpl, print_question.pstpl||unique class for each question type. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CODE}||question.pstpl, print_question.pstpl||Displays the current question code&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ESSENTIALS}||question.pstpl||the question ID and (if a question is conditional), &#039;style=&amp;quot;display:none;&amp;quot;&#039;. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_HELP}||question.pstp, question_start.pstpl||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TYPE_HELP}||print_question.pstp||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_INPUT_ERROR_CLASS}||question.pstp, question_start.pstpl||Provides a class if there was user input error&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ID}||print_question.pstp||Provides a unique ID for each question to allow styling for specific questions&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TEXT}||question.pstp, print_question.pstp, question_start.pstpl||Displays the text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MANDATORY}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_CLASS}||question.pstpl, print_question.pstpl||class if a question is mandatory. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_NUMBER}||print_question.pstpl||Incremental count of questions.&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_VALID_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated valid help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_SCENARIO}||print_question.pstp||Prints out the &#039;scenario&#039; text for conditional questions.&lt;br /&gt;
|-&lt;br /&gt;
|{NAVIGATOR}||navigator.pstpl||Displays navigation buttons (next, prev, last)&lt;br /&gt;
|-&lt;br /&gt;
|{CLEARALL}||All files (but intended for navigator.pstpl)||Displays the &amp;quot;Exit and Clear Results&amp;quot; link&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITBUTTON}||submit.pstpl||Displays the final submit button&lt;br /&gt;
|-&lt;br /&gt;
|{COMPLETED}||completed.pstpl||Displays the &#039;completed&#039; message for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{URL}||completed.pstpl||Displays the survey &#039;url&#039; and &#039;url text&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACY}||submit.pstpl||Displays privacy information when survey is anonymous&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACYMESSAGE}||privacy.pstpl||The privacy message is shown if you set your survey to be anonymous. [[Translating LimeSurvey|The text can be edited/translated]] in the language files. This can also be changed manually by editing the privacy.pstpl template you wish to use.&lt;br /&gt;
|-&lt;br /&gt;
|{TEMPLATEURL}||All Files||The URL to the current template location (useful for referencing image files in your template)&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITCOMPLETE}||endpage.pstpl||The statement (from the language files) that tells the user they have completed the survey, and to press the &amp;quot;Submit&amp;quot; button&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITREVIEW}||survey.pstpl||The statement (from the language files) that tells the user they can review/change the answers they have made by clicking &amp;quot;&amp;lt;&amp;lt; prev&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users first name from the tokens table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users last name from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:EMAIL}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users email from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_1 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_2 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERSCLEARED}||Preferably in navigator.pstpl||The &amp;quot;Answers Cleared&amp;quot; statement from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{RESTART}||clearall.pstpl||URL to restart the survey&lt;br /&gt;
|-&lt;br /&gt;
|{CLOSEWINDOW}||All Files (Preferably in navigator.pstpl)||URL to close current window&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERERROR}||register.pstpl||Shows any error messages in the register page (ie: &amp;quot;You must include an email address&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE1}||register.pstpl||The statement &amp;quot;You must be registered to complete this survey&amp;quot; from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE2}||register.pstpl||Details about registering from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERFORM}||register.pstpl||The actual form for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{SAVE}||Works suitable on navigator.pstpl||Displays the &#039;Save your responses so far&#039; button to offer the user to save and come back later to continue the survey. If the Save option is deactivated in the survey properties the tag will not be shown and ignored.&lt;br /&gt;
|-&lt;br /&gt;
|{LANGUAGECHANGER}||survey.pstpl||Displays a switch in multilingual surveys to change the question.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Input/Buttons== &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
Each &amp;quot;input&amp;quot; type in a survey has been given its own class name, so that you can add CSS to your &amp;quot;startpage.pstpl&amp;quot; file, and have some control over the appearance of form buttons and inputs. These class names are as follows:&lt;br /&gt;
*&#039;&#039;&#039;submit&#039;&#039;&#039; (Submit Buttons)&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; (Text Inputs - for short free text, date and numerical type)&lt;br /&gt;
*&#039;&#039;&#039;answertext&#039;&#039;&#039; (Text of answers)&lt;br /&gt;
*&#039;&#039;&#039;radio&#039;&#039;&#039; (Radio Buttons)&lt;br /&gt;
*&#039;&#039;&#039;checkbox&#039;&#039;&#039; (Check Boxes)&lt;br /&gt;
*&#039;&#039;&#039;select&#039;&#039;&#039; (Select / List Boxes)&lt;br /&gt;
*&#039;&#039;&#039;textarea&#039;&#039;&#039; (Large text inputs - for long free text)&lt;br /&gt;
*&#039;&#039;&#039;clearall&#039;&#039;&#039; (The &amp;quot;Exit and Clear Survey&amp;quot; link)&lt;br /&gt;
*&#039;&#039;&#039;rank&#039;&#039;&#039; (The rank style question. Doesn&#039;t set the colour of the select box or the text boxes (these are set by relevant section above) but does allow changing of background colour, text colour and size etc for the rest of the ranking question)&lt;br /&gt;
*&#039;&#039;&#039;graph&#039;&#039;&#039; (The &amp;quot;percentage completed&amp;quot; graph table)&lt;br /&gt;
*&#039;&#039;&#039;innergraph&#039;&#039;&#039; (The table inside the graph table - this contains the 0% and 100% text. Use this for changing the size of this text)&lt;br /&gt;
*&#039;&#039;&#039;question&#039;&#039;&#039; (General settings for any question that is displayed within a table. Generally you should use this to make sure that their font size and colour is the same as you have used elsewhere as a default)&lt;br /&gt;
*&#039;&#039;&#039;mandatory&#039;&#039;&#039;  (Mandatory questions)&lt;br /&gt;
*&#039;&#039;&#039;input-error&#039;&#039;&#039; (User input error - for if a user has made a mistake with a mandatory question or question with validation)&lt;br /&gt;
*&#039;&#039;&#039;array1&#039;&#039;&#039; and &#039;&#039;&#039;array2&#039;&#039;&#039; (These two styles are cycled when presenting the range of answers for an array type question. This allows you to set an alternating background colour for these question types. &#039;&#039;&#039;Array1&#039;&#039;&#039; is also used for the column headings in these question types)&lt;br /&gt;
*&#039;&#039;&#039;errormandatory&#039;&#039;&#039; (Sets the colour and style of the &amp;quot;This question is mandatory&amp;quot; error message)&lt;br /&gt;
*&#039;&#039;&#039;warningjs&#039;&#039;&#039; (Sets the colour and style of the warning message displayed if the participant&#039;s browser has javascript disabled)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
There are also some elements that can be accessed using the ID of the element (&#039;&#039;&#039;#ID&#039;&#039;&#039; in CSS):&lt;br /&gt;
*&#039;&#039;&#039;surveycontact&#039;&#039;&#039; (The contact message shown on the start page)&lt;br /&gt;
*&#039;&#039;&#039;tokenmessage&#039;&#039;&#039; (used for messages inside the survey, e.g. the session expired error message)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
An example of using these classes with style sheets can be found in the &amp;quot;bubblegum&amp;quot; template that comes with the LimeSurvey application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
Because you can edit all the HTML aspects, there&#039;s no reason to surround your templates with a &amp;lt;div class=&#039;new_name&#039;&amp;gt; and then define a css for that new_name class.&lt;br /&gt;
&lt;br /&gt;
==Styling the progress bar== &amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Before version 1.87:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
The chart.jpg file is a simple one pixel image file which is used to create the progress bar image in the &#039;PERCENTCOMPLETE&#039; table. If the file does not exist, LimeSurvey will use the default &#039;maroon&#039; coloured image in the public directory. If you want to create a bar to match your own colour scheme, then you should save the color in this file. Remember it should be a &#039;&#039;&#039;JPEG&#039;&#039;&#039; file, 1 pixel x 1 pixel, in the colour desired.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
The progress bar appearance can be modified with CSS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
To change the background colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-header {&lt;br /&gt;
 background-color: #3300FF;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
To change the border colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-content,&lt;br /&gt;
#progress-wrapper .ui-widget-header {&lt;br /&gt;
 border: 1px solid #FF0000;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advanced Features Available to Developers== &amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
Starting with version 0.99, LimeSurvey has integrated some user-made patches that allow for some special changes.  These very advanced features generally require changes to the underlying code base of LimeSurvey and should be done carefully so as not to introduce security holes.&lt;br /&gt;
&lt;br /&gt;
===Basic CMS Integration support=== &amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Deprecated: This function is not available anymore in version 2.0 or later&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
To be able to integrate LimeSurvey into another CMS, use the following options in &#039;&#039;&#039;config.php&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
// Set $embedded to true and specify the header and footer functions if the survey is to be displayed embedded in a CMS&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$embedded = false;&lt;br /&gt;
$embedded_inc = &amp;quot;&amp;quot;;               // path to the header to include if any&lt;br /&gt;
$embedded_headerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteHeader for geeklog&lt;br /&gt;
$embedded_footerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteFooter for geeklog&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:133--&amp;gt;&lt;br /&gt;
Set &#039;&#039;&#039;$embedded = true;&#039;&#039;&#039; to enable CMS-embedding. By using the &#039;&#039;&#039;$embedded_inc&#039;&#039;&#039; variable one can include their own &#039;&#039;&#039;.php&#039;&#039;&#039; files.  By setting &#039;&#039;&#039;$embedded_headerfunc&#039;&#039;&#039; or &#039;&#039;&#039;$embedded_footerfunc&#039;&#039;&#039;, one can call functions from within included files that output the relevant headers or footers instead of LimeSurveys default ones.&lt;br /&gt;
&lt;br /&gt;
===Support for your own Javascript functions=== &amp;lt;!--T:134--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:135--&amp;gt;&lt;br /&gt;
Some users may need to run Javascript on the survey pages, but calling &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; in the BODY element made it impossible to do so.  This call has been replaced with a small JavaScript function in the HEAD that sniffs for the existence of &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; and &#039;&#039;&#039;template_onload()&#039;&#039;&#039; before calling each.  This way a template author can create their own &#039;&#039;&#039;template_onload()&#039;&#039;&#039; function in the HEAD that replaces the default one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:136--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
*Disable XSS filter - in Global settings -&amp;gt; Security, set &amp;quot;Filter HTML for XSS&amp;quot; to No.&lt;br /&gt;
*Enter your script in the source of a question or group description.&lt;br /&gt;
*There are more details in the [[Workarounds: Manipulating a survey at runtime using Javascript#How to use Script (eg. JavaScript etc.) in LimeSurvey?|workaround section]].&lt;br /&gt;
&lt;br /&gt;
=Videos on Templates= &amp;lt;!--T:137--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
This video will demonstrate the basic and advanced template functions that are available to all LimeSurvey users. This includes changing the appearance of certain forms and inserting custom graphics. Additionally, it will thoroughly walk you through on how to edit and preview specific page templates, importing/exporting templates, modify appearance of questions in the CSS, customizing survey description page, and completed page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
[http://youtu.be/Uk3FQyDTIY0 LimeSurvey training video - template customization]&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; Tricks= &amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Some language specific element== &amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
If you want to have some langage specific sentence in a survey, for example an help at end of each page, you can add in a .pstl file a sentence and hidding it for other langage. And hidding it in the template.css, we can use psuedo selector :lang, but for best compatibility, we use some class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
Example for a help sentence at bottom of the page, in french an english, put this on endpage.pstpl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;fr&amp;quot; lang=&amp;quot;fr&amp;quot;&amp;gt;Pour de l&#039;aide en direct appelez le 000000&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;en&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;For some help, please call 000000&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
and in template.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;.lang-fr .en{display:none}&lt;br /&gt;
.lang-en .fr{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
You can use it to for other sentence in your question before 1.92 ( in 1.92, there are better solutions).&lt;br /&gt;
&lt;br /&gt;
==Change the layout of the survey page== &amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
When editing a template this template can be assigned to a single survey while the survey list page, which is shown at www.yourdomain.org/limesurveyinstallfolder, lists all your surveys.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
To use your current template for this page you have change the according setting at the Global Settings screen; at older versions this change can be done by editing the $defaulttemplate setting at the config file: Copy this setting from config-defaults.php to config.php which overrides config-defaults.php and edit this setting to $defaulttemplate = &#039;yourtemplatename&#039;;&lt;br /&gt;
&lt;br /&gt;
==Import/Export of templates: Mac users== &amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
Mac users, please note: Mac OSX default archive utility may have problems with zip folders &amp;quot;generated on the fly&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
a work around is to unix&#039;es unzip from the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
$ unzip template.zip -d template&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
Archive: template.zip&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
 inflating: template/startpage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
 inflating: ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
or scripts in their mac-compiled counterparts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
http://homepage.mac.com/roger_jolly/software/&lt;br /&gt;
&lt;br /&gt;
==Changing your templates traffic light from red to green== &amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
If you haven&#039;t already, set the admin directory to read/write/execute (777). The files within it, however, may be set to read/execute only (chmod 755).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
GO to file directory ie file manager, find templates directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
1 change permission on eg&amp;quot;vallendar&amp;quot; (or any template of your choice) directory to read 777&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
2 voila! the red traffic light on &amp;quot;vallendar&amp;quot; is now green.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:172--&amp;gt;&lt;br /&gt;
3 NOTE: to restrict access for safety, when finished editing template files, change all templates files back to what they were eg 644&lt;br /&gt;
&lt;br /&gt;
==Replacing the help icon== &amp;lt;!--T:173--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:174--&amp;gt;&lt;br /&gt;
When a question help text is shown then an help.gif image is used from the default template folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:175--&amp;gt;&lt;br /&gt;
You can replace this image by uploading a new help.gif, help.png or help.jpg in your custom template folder. It then will be automatically used instead of the default help icon.&lt;br /&gt;
&lt;br /&gt;
==Replacing an existing logo== &amp;lt;!--T:176--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:177--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Before uploading a new logo always delete the old, existing one!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
1. To edit the logo go to the &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; file which you can find it here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
[[File:t1.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:180--&amp;gt;&lt;br /&gt;
2. Click the search button to find occurrences of logo related styles.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
[[File:2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:182--&amp;gt;&lt;br /&gt;
3. Search for &amp;lt;u&amp;gt;#logo&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:183--&amp;gt;&lt;br /&gt;
[[File:3.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
4. Edit the main style file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:185--&amp;gt;&lt;br /&gt;
You will see something similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:186--&amp;gt;&lt;br /&gt;
[[File:t4.PNG|500px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:187--&amp;gt;&lt;br /&gt;
If you want to change the image just replace logo.gif with another image link. Example: (&amp;lt;u&amp;gt;logo.png&amp;lt;/u&amp;gt; or &amp;lt;u&amp;gt;logo.jpg&amp;lt;/u&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
If you want change the image size adjust width and height (in pixels) like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:189--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;width:100px; height:100px;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding your own logo== &amp;lt;!--T:190--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:191--&amp;gt;&lt;br /&gt;
1. Find and open the &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo; template file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
[[File:5.PNG|200px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:194--&amp;gt;&lt;br /&gt;
2. After the &amp;lt;source lang=&amp;quot;html4strict&amp;quot; &amp;gt;&amp;lt;body ... &amp;gt;&amp;lt;/source&amp;gt; tag add this line to &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;img id=&amp;quot;page_logo&amp;quot; src=&amp;quot;{TEMPLATEURL}logo.png&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:196--&amp;gt;&lt;br /&gt;
3. To add logo go to &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo;, you can find it here (see in screen):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:197--&amp;gt;&lt;br /&gt;
[[File:6.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:198--&amp;gt;&lt;br /&gt;
3.1 Then go to the end of the main &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; style file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:199--&amp;gt;&lt;br /&gt;
3.2 To align the logo add...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:200--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at left side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:201--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:left;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at right side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:right;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:208--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want to center the logo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:209--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   display: block;&lt;br /&gt;
   margin-left: auto;&lt;br /&gt;
   margin-right: auto;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use the same template with different logos== &amp;lt;!--T:214--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:215--&amp;gt;&lt;br /&gt;
If you want to use the same template for all surveys and just want to change the logo for each survey, you can use the {SID} placeholder in the template .pstpl file and thereby refer to different images:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:216--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;{TEMPLATEURL}logoImage-{SID}.png&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the default help to all question (hide_tip)== &amp;lt;!--T:217--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:218--&amp;gt;&lt;br /&gt;
There are 3 solutions to remove the default help:&lt;br /&gt;
# like a [[Advanced question settings#hide_tip|hide_tip attribute]] but for all question and survey.&lt;br /&gt;
# you can remove the {QUESTIONHELP} and is container from the file question.pstl, but it can be a bad idea for screenreader.&lt;br /&gt;
# for the default template and some other, add this at the end of tempate.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:219--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;span.questionhelp{display:none;}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Display custom favicon== &amp;lt;!--T:220--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:221--&amp;gt;&lt;br /&gt;
A favicon is the little icon you see in the browser&#039;s address bar, list of bookmarks or tab. You can display your own icon as follows:&lt;br /&gt;
#Create a favicon - google will find you lots of free favicon generators&lt;br /&gt;
#Name your new favicon &amp;quot;favicon.ico&amp;quot; and place it in your template directory&lt;br /&gt;
#Add the following code to your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; before the &amp;lt;/head&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:222--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;link rel=&amp;quot;icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Different appearance for survey-/question-pages== &amp;lt;!--T:224--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:225--&amp;gt;&lt;br /&gt;
(&#039;&#039;Version 1.91 and newer&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:226--&amp;gt;&lt;br /&gt;
If you want LimeSurvey to change the appearance of every second page (i.e. of even and odd survey pages) you can use &#039;&#039;&#039;.page-odd&#039;&#039;&#039; class in your css file to change the appearance of odd pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:227--&amp;gt;&lt;br /&gt;
example from default template of LimeSurvey 1.91+&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:228--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
.page-odd table.question-group {&lt;br /&gt;
 background-color: #D2F2D3;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:232--&amp;gt;&lt;br /&gt;
To &#039;&#039;&#039;not&#039;&#039;&#039; differentiate even and odd pages at the (default) template find all instances of &#039;&#039;.page-odd&#039;&#039; in template.css and remove those styles.&lt;br /&gt;
&lt;br /&gt;
==Create a vertical separator  border for dual scale array== &amp;lt;!--T:233--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:234--&amp;gt;&lt;br /&gt;
To create a vertical separator border for a dual scale array you can add the following lines to your &#039;&#039;&#039;template.css&#039;&#039;&#039;-file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:235--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
table.question thead td.header_separator,&lt;br /&gt;
table.question tbody td.dual_scale_separator&lt;br /&gt;
{&lt;br /&gt;
   border-right:solid 1px #00A8E1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:242--&amp;gt;&lt;br /&gt;
header_separator is used to adress the separator for the header &amp;quot;td&amp;quot; and &amp;quot;dual_scale_separator&amp;quot; is used to adress the separator column in the dual scale array.&lt;br /&gt;
&lt;br /&gt;
==Hide the survey contact message shown on the start page/survey list== &amp;lt;!--T:243--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:244--&amp;gt;&lt;br /&gt;
To hide the &amp;quot;Please contact ...&amp;quot; message on the start page (with the survey list) you can add the following to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.js&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:245--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:246--&amp;gt;&lt;br /&gt;
$(&#039;#surveycontact&#039;).hide(); //Hides the survey contact message&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:247--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the survey contact message shown on error messages== &amp;lt;!--T:248--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:249--&amp;gt;&lt;br /&gt;
If you want to remove the survey contact message from error messages it&#039;ll be trickier. You can add the following function call to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.css&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:250--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
removeContactAdressFromMessage(); //Removes the survey contact message from error messages&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:253--&amp;gt;&lt;br /&gt;
and add the following function to your *template.js* file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:254--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
function removeContactAdressFromMessage()&lt;br /&gt;
{&lt;br /&gt;
if ($(&#039;#tokenmessage&#039;).length &amp;gt; 0)&lt;br /&gt;
   {&lt;br /&gt;
   var oldMessage = $(&#039;#tokenmessage&#039;).html();&lt;br /&gt;
   var indexContact = oldMessage.indexOf(&#039;Bitte kontaktieren&#039;);&lt;br /&gt;
   var newMessage = oldMessage.substr(0, indexContact);&lt;br /&gt;
   $(&#039;#tokenmessage&#039;).html(newMessage);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:266--&amp;gt;&lt;br /&gt;
It will probably not work for an englisch survey and have to be extended when using for multilingual surveys. But it&#039;s an idea/tip how to solve this.&lt;br /&gt;
&lt;br /&gt;
==How to deal with multilingual question attributes (before version 2.0 at which those were added)== &amp;lt;!--T:267--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:268--&amp;gt;&lt;br /&gt;
If you have a multilingual survey and e. g. want to use a different string for the &amp;quot;other&amp;quot; field, this could only be done for the base language (until this feature was added at LimeSurvey 2.0). To work around this, paste in the field to change the label for &amp;quot;other&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:269--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;en&amp;quot;&amp;gt;New label&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;fr&amp;quot;&amp;gt;Nouveau label&amp;lt;/span&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:270--&amp;gt;&lt;br /&gt;
At the template.css of your template (at /limesurvey/upload/templates/&amp;lt;yourtemplatename&amp;gt;/template.css) add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:271--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;html:lang(en) .fr{display:none}&lt;br /&gt;
html:lang(fr) .en{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=57588</id>
		<title>Theme editor</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=57588"/>
		<updated>2013-10-12T01:47:17Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
LimeSurvey has a basic template and style system providing a theme-like capability found in many browser-based applications.  They are simply termed &#039;&#039;&#039;Templates&#039;&#039;&#039; here.  The Templates allow control over the look and feel of pages during a survey.  A survey administrator can select the template to use for each survey to thus personalize that survey&#039;s look and feel.  Changes to a Template can be as simple as adding a unique logo on the welcome page, changing background colors, or maybe new text colors for specific types of questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
LimeSurvey comes with a set of templates right out of the box. These initial templates are defined by directories within the LimeSurvey installation &amp;quot;templates&amp;quot; directory.  Each template has it&#039;s own directory.  Within the main directory of a template are numerous files: &#039;&#039;&#039;templates (.pstpl)&#039;&#039;&#039;, &#039;&#039;&#039;cascading style sheets (.css)&#039;&#039;&#039;, &#039;&#039;&#039;images&#039;&#039;&#039; (&#039;&#039;&#039;.jpg&#039;&#039;&#039; or &#039;&#039;&#039;.png&#039;&#039;&#039;) and maybe others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Like in other theme-based systems, fragments of HTML code are stored in the .pstpl template files.  These fragments are read in and used to construct the page to display to the end user during the operation of a survey. Often &#039;&#039;&#039;keywords&#039;&#039;&#039; surrounded by curly braces are included in the files that are then replaced with the relevant text.  The following gives an example of a template file content and its result when used in a survey page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&amp;lt;font face=&#039;verdana&#039; color=&#039;red&#039;&amp;gt;{SURVEYNAME}&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;verdana&#039; color=&#039;blue&#039;&amp;gt;&amp;lt;u&amp;gt;{SURVEYDESCRIPTION}&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
One gets a result that looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:278--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&#039;&#039;&#039;&amp;lt;span style=&#039;color:red&#039;&amp;gt;My New Survey&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;u&amp;gt;&amp;lt;span style=&#039;color:#0000ff&#039;&amp;gt;This is a survey written by me to find out what sort of chocolate people like.&amp;lt;/span&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Templates, being HTML code, tend to define the positioning and type of text to be displayed and similar structural features of the page.  They often reference or include other files.  Most reference a common cascading style sheets (CSS) file that defines the font style, color, size, background and similar parameters common to all pages in the survey. Style sheets reference HTML &#039;&#039;&#039;class&#039;&#039;&#039; parameters that are associated with the various types of objects in the HTML code.  This allows the style sheet to describe once how to display each of the many types of text or other objects that may appear in multiple places.  There are unique classes for each question type in LimeSurvey and thus giving detailed control over the appearance of each.  Image files, like logos or special progress-bar constructors, may be referenced as well in the Template file.  Finally, special Keywords in curly braces are replaced with text defined in the Survey for each of its corresponding language translations (for example, the Survey Title or Question Text for each language defined).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
If you create a new custom template, please consider contributing it back to the LimeSurvey community, and make it available to others. With your help, we can grow our repository of templates, surveys, and other ad-ons, to make LimeSurvey even better! See the shared [http://www.limesurvey.org/en/download-limesurvey-design-templates/com_josetta_menu_control_panel/viewcategory/9-survey-design-templates Template Repository]&lt;br /&gt;
&lt;br /&gt;
=Creating a new Template= &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
To be able to create a new template (or edit an existing template), you need Template Editing user permission in LimeSurvey as well as permission to manipulate the files in the underlying operating system hosting your LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note of Warning:&#039;&#039;&#039; As template changes can affect all surveys in an installation, changes should be limited to those skilled in understanding general concepts in the code base. Templates are an advanced feature that can take some experimentation to get correct if you are not familiar with HTML code methods.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
The preferred way to create a new template is through the Template Editor (see below) via the web Admin interface. Some people may like to work directly with template files so that they can use their favorite text editor instead of the web interface. In this case, still use the Template Editor to first create your new template. This will create a new base template with all the files you need in the LimeSurvey_web_root/upload/templates/your_new_template directory. From there you can use your text editor to manually adjust the template files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Permissions Note:&#039;&#039;&#039; on unix/linux systems, these template files will be owned by the group and user who the web server is running as (may be &amp;quot;www&amp;quot; for some systems). So make sure you have access to edit these files, and when you save them make sure they don&#039;t change ownership, so you can still use the web Template Editing interface if needed&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Template files may seem complex to understand at first. You have to likely understand HTML code, possibly Styles and Style Sheets, and have access to the underlying LimeSurvey installation files if the template files and directories are not editable. Copy an existing template to a new directory to play around with the content. This may help make the concept clearer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
A number of the &#039;public&#039; elements of LimeSurvey can be adjusted by a series of templates. This section provides a very brief explanation of these templates.&lt;br /&gt;
&lt;br /&gt;
=The LimeSurvey Template Editor= &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
To ease the understanding and quick update of a Template, LimeSurvey provides a &#039;&#039;&#039;Template Editor&#039;&#039;&#039; in the main &#039;&#039;&#039;administrative&#039;&#039;&#039; toolbar of the application.  This Template Editor is only available to users given the privilege in the User Security settings.  A template effects all surveys and can render a survey inoperable if not constructed properly.  So Template editing is thought best restricted to a very limited, knowledgeable set of users.  Having permission to enter the Template Editor is not enough though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
The LimeSurvey Template Editor allows you to edit the contents of your templates online. Start the Template Editor by clicking on the &amp;quot;Template Editor&amp;quot; icon [[File:templates.png]] in the LimeSurvey Administration toolbar (Templates). The main screen is similar to the LimeSurvey Survey Administration screen. It allows you to select the template to edit/view. Once this has been selected you can then select from one of the different public survey pages. You are then presented with a list of the template files that make up that particular page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:279--&amp;gt;&lt;br /&gt;
[[File:Template-editor-2013-7-10_11_38_16.png|center]]&lt;br /&gt;
&lt;br /&gt;
==The Template Menu== &amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:280--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Edit Icon:&#039;&#039;&#039; The &amp;quot;edit&amp;quot; icon indicates whether or not the template is editable. A blurred out icon indicates that the template is read only; a clickable icon indicates you may make modifications. To change the icon from blurred to clear, you have to modify the template&#039;s permissions.&lt;br /&gt;
*&#039;&#039;&#039;Import Template:&#039;&#039;&#039; Allows you to import a template.&lt;br /&gt;
*&#039;&#039;&#039;Export Template:&#039;&#039;&#039; Allows you to export the current template to a .zip-File.&lt;br /&gt;
*&#039;&#039;&#039;Copy Template:&#039;&#039;&#039; Allows you to make a new template by copying the current one.&lt;br /&gt;
*&#039;&#039;&#039;Rename this template:&#039;&#039;&#039; Allows you to change the name of the template.  Generally used after copying an existing template or importing a template by manipulating the underlying directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
The &amp;quot;Screen&amp;quot; drop-down list on the right allows you to choose which particular survey page you are currently looking at.&lt;br /&gt;
&lt;br /&gt;
==Import/Export/Copy a Template== &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
When you &#039;&#039;&#039;export &#039;&#039;&#039;a template, this will create a zip-file archive with all the files your template consists of (.pstpl files, images, css files, ...). You can simply &#039;&#039;&#039;import &#039;&#039;&#039;the exported zip-file at other LimeSurvey systems by using the import feature or you can manually copy the archive to another installation and extract it into the corresponding template directory there. If you copy the template in the same installation, you will need to rename the folder to create another named copy of that template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
If the file and directory permissions are open for the LimeSurvey application to write, then you can use the programs &#039;&#039;&#039;copy &#039;&#039;&#039;and rename features to make a local copy of a template.&lt;br /&gt;
&lt;br /&gt;
==Page Structure / Template Use== &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;The Welcome Page:&#039;&#039;&#039; startpage.pstpl, welcome.pstpl, privacy.pstpl,  navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Questions Pages:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, startgroup.pstpl, groupdescription.pstpl, question.pstpl, endgroup.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Submit Page:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, submit.pstpl, (privacy.pstpl), navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Final Page:&#039;&#039;&#039; startpage.pstpl, assessment.pstpl, completed.pstpl, endpage.pstpl&lt;br /&gt;
&lt;br /&gt;
==Template Files== &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
The following template files are used to produce your public survey and must exist in any new template folder you create:&lt;br /&gt;
*&#039;&#039;&#039;startpage.pstpl:&#039;&#039;&#039; Produces the start of each html page. It starts at the &amp;quot;&amp;lt;head&amp;gt;&amp;quot; tag, and should not contain the &amp;quot;&amp;lt;html&amp;gt;&amp;quot; tag. This &#039;very beginning&#039; of a standard html page is written by the scripts. Please ensure that your startpage.pstpl files contains a &amp;lt;body&amp;gt; tag, even though many browsers do not require strict adherence to the W3 HTML stanards, the LimeSurvey script needs to find a &amp;lt;body&amp;gt; tag, to run certain javascript elements. It is not expected that many &#039;keywords&#039; will be used in the startpage.pstpl file, however you may wish to put the {SURVEYNAME} into the title. The startpage.pstpl file can contain code that ends in the corresponding endpage.pstpl file, so you can start a table in this file and close the table in the endpage.pstpl file. The startpage.pstpl and endpage.pstpl files wrap around every possible page used by LimeSurvey.&lt;br /&gt;
*&#039;&#039;&#039;survey.pstpl:&#039;&#039;&#039; This template is the second used on most pages, and provides a space to put the survey name and description. This template does not have a corresponding &#039;closing&#039; template, and subsequently you should close all tags opened in this template file (ie: don&#039;t leave a table open here because there is nowhere else to close it)&lt;br /&gt;
*&#039;&#039;&#039;welcome.pstpl:&#039;&#039;&#039; This template is only used in the welcome screen (which is also on the main page for &#039;all in one&#039; surveys). You can use this to print out the welcome text, and other information that should be provided in the introduction. Like the &#039;survey.pstpl&#039; file, there is no corresponding &#039;closing&#039; template, so all tags opened in this template file should be closed as well.&lt;br /&gt;
*&#039;&#039;&#039;startgroup.pstpl:&#039;&#039;&#039; This template can provide a &#039;summary&#039; wrap around for questions within a group. It has a matching &#039;endgroup.pstpl&#039; template that can be used to close any opened tags in this file, so you can open a table within this.&lt;br /&gt;
*&#039;&#039;&#039;groupdescription.pstpl:&#039;&#039;&#039; This template file is used to display a description of a group. It is separate to the startgroup.pstpl file because in a &amp;quot;question by question&amp;quot; survey it will be displayed on its own unique page in between groups, whereas in a &amp;quot;group by group&amp;quot; or &amp;quot;all in one&amp;quot; survey it provides a header to the subsequent questions. groupdescription.pstpl does not have a corresponding &#039;closing&#039; template file, so all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question.pstpl:&#039;&#039;&#039; This file contains the question, answer and help text sections of your survey, and in the &amp;quot;group by group&amp;quot; and &amp;quot;all in one&amp;quot; surveys this template is cycled repeatedly with each question. There is no corresponding closing file for this and all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question_start.pstpl:&#039;&#039;&#039; This file contains the individual elements found at the start of a question. It is included within &#039;question.pstpl&#039; via the {QUESTION} keyword. It is intended to allow template designers more control over the layout of a question. This template sits outside the normal templating system and &#039;&#039;&#039;was superseeded (as of LS1.87)&#039;&#039;&#039;. All keywords from this template are now available directly in question.pstpl. NOTE: templates using question_start.pstpl will still work at least for a couple more versions of LS 1.x&lt;br /&gt;
*&#039;&#039;&#039;submit.pstpl (and privacy.pstpl):&#039;&#039;&#039; This page is the penultimate page for all types of survey (except the &amp;quot;all in one&amp;quot; type) where the participant is given an option to review questions before submitting their responses. It provides privacy information where a survey is anonymous, which it extracts from the &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039; file.&lt;br /&gt;
*&#039;&#039;&#039;completed.pstpl:&#039;&#039;&#039; This page is displayed as the final page when the survey responses have been saved and the survey is over. It can be used to display a &amp;quot;forwarding link&amp;quot; as set in the survey setup.&lt;br /&gt;
*&#039;&#039;&#039;endgroup.pstpl:&#039;&#039;&#039; This file closes the group, and can be used to close off any tags opened in the startgroup.pstpl file&lt;br /&gt;
*&#039;&#039;&#039;navigator.pstpl:&#039;&#039;&#039; This file contains the buttons that navigate through the survey, &amp;quot;next&amp;quot;, &amp;quot;prev&amp;quot;, &amp;quot;last&amp;quot;, &amp;quot;submit&amp;quot;, &amp;quot;save so far&amp;quot;  and the &amp;quot;clear all&amp;quot; link. It is used in all pages except the completed page.&lt;br /&gt;
*&#039;&#039;&#039;printanswers.pstpl:&#039;&#039;&#039; This file has the HTML wrapper for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_group.pstpl:&#039;&#039;&#039; This file is the same as startgroup.pstpl endgroup.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_question.pstpl:&#039;&#039;&#039; This file is the same as question.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_survey.pstpl:&#039;&#039;&#039; This file is the same as survey.pstpl but for the print version of the survey.&lt;br /&gt;
&lt;br /&gt;
== CSS and Javascript== &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Two files are allways used for template : template.css for css and template.js for javascript.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATECSS}:&#039;&#039;&#039; Add lines for default css, template.css and template-rtl.css for rtl language.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATEJS}:&#039;&#039;&#039; Add lines for default javascript files, template.js and all js files needed for LimeSurvey.&lt;br /&gt;
&lt;br /&gt;
=== Replacing default css or javascript=== &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Some question use specific files for javascript or css. You can use your own files. All files used in your survey included in ./scripts or in .//styles-public can be replaced, just put a file with the same name in your template.&lt;br /&gt;
&lt;br /&gt;
==Other Template Files== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
The &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;invitationemail.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;reminderemail.pstpl&#039;&#039;&#039; and &#039;&#039;&#039;confirmationemail.pstpl&#039;&#039;&#039; are no longer used by LimeSurvey and defaults are instead set in the applicable language files. The email messages can now be edited on a survey by survey basis.&lt;br /&gt;
&lt;br /&gt;
==Standard Pages== &amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
There are ten standard pages that a survey participant may see in the course of taking or accessing the LimeSurvey application.  Each is constructed from a number of common &#039;&#039;&#039;Template&#039;&#039;&#039; files from the &#039;&#039;&#039;Template&#039;&#039;&#039; specified in the survey&#039;s settings.  The table below indicates which template files are used in constructing each of these pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!  &#039;&#039;&#039;Survey Pages:&#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039;Template Files&#039;&#039;&#039;!!Survey&amp;lt;br /&amp;gt;List!!Welcome!!Question!!Completed!!Clear All!!Register!!Load!!Save!!Print&amp;lt;br /&amp;gt;Answers!!Print&amp;lt;br /&amp;gt;Survey&lt;br /&gt;
|-&lt;br /&gt;
|SurveyList||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Welcome|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Privacy|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Navigator|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Survey|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|StartGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|GroupDescription|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Question&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|EndGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Assessment|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Completed|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|ClearAll|| || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Register|| || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Load|| || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||&lt;br /&gt;
|-&lt;br /&gt;
|Save|| || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| ||&lt;br /&gt;
|-&lt;br /&gt;
|PrintAnswers|| || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||&lt;br /&gt;
|-&lt;br /&gt;
|Print Survey || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Group || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Question || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|StartPage&amp;lt;br /&amp;gt;EndPage&amp;lt;br /&amp;gt;Template.css||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In versions 1.90 and up this replaces question.pstpl AND question_start.pstpl. If you are using an old custom template, you need to add the following line to the beginning of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div {QUESTION_ESSENTIALS} class=&amp;quot;{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;And then add the corresponding closing tag to the end of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In version 1.91 and earlier, LimeSurvey js files are not included by the template. In version 2, &#039;&#039;&#039;you have to use {TEMPLATEJS} in your one of your template file&#039;&#039;&#039; to add the link to the js file. You can add it in startpage.pstpl or in endpage.pstpl. You can remove the {TEMPLATEURL}/template.js line and you have to replace with {TEMPLATEJS} to update a personal template.&lt;br /&gt;
&lt;br /&gt;
==The File Control Section== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
In the &amp;quot;file control&amp;quot; window on the left, you can click on one of the template files that is used to compile the page. The HTML code for that file will then appear in the &amp;quot;Now editing&amp;quot; window in the center. If the template is editable (determined by directory permissions) you can then make any changes and save them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
The &amp;quot;Other Files&amp;quot; window shows a list of all other files in the template directory. You can use the right side to &#039;&#039;&#039;upload and select image files (your pics, logos,...) or other files needed to create your template&#039;&#039;&#039;. Note: Instead of a link directly to each picture in your template you can use the field string {TEMPLATEURL}.  So instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;/limesurvey/templates/yourtemplate/mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
You can use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;{TEMPLATEURL}mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
A &amp;quot;sample&amp;quot; of the template page you are editing will be visible at the bottom of the screen. There is no way to to delete a template from the template editor. This must be done by accessing the underlying directory and deleting the file there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; The shipped templates cannot be edited using the Template Editor and should never be changed. If you want to modify them, create a copy first and modify the copy.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Location of template files== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
LimeSurvey stores each of the &#039;standard&#039; templates in their own distinct sub-directory within the /templates directory that is kept in the public directory with the other LimeSurvey public files. Customized user templates are stored in the /upload/templates directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
To create a new template, use the according icon in the template editor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
There should ALWAYS be a &amp;quot;default&amp;quot; directory in the templates directory. This template is used by default and as a fall-back if a template folder doesn&#039;t exist, or can&#039;t be found. The &amp;quot;default&amp;quot; directory comes with the package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
You can use any image files that you upload into the template management area with syntax like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;{TEMPLATEURL}filename.xyz&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Styling questions with CSS= &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
Styling of questions in CSS has become much easier. Each question type now has a unique class. Mandatory question&#039;s also have an additional mandatory class. For example, for a non-mandatory question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
and if the question is mandatory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
and if the question is mandatory but the user didn&#039;t answer it or if there is validation on a question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
and if the question has validation applied but the user hasn&#039;t answered correctly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question6&amp;quot; class=&amp;quot;text-short input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Global classes for question part== &amp;lt;!--T:273--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:274--&amp;gt;&lt;br /&gt;
These classes are used for each question type. Some question types use only one or two class, but others can use much more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:281--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable alternance&amp;quot;&lt;br /&gt;
|+ Global classes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Class name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Part&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Question type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Examples&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Note&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question&lt;br /&gt;
| All question block&lt;br /&gt;
| All question type&lt;br /&gt;
|&amp;amp;lt;p class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;ul class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;question&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .subquestions-list&lt;br /&gt;
| List of subquestion&lt;br /&gt;
| Multi choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;subquestions-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;subquestions-list&amp;quot;&amp;gt;&lt;br /&gt;
| .questions-list is used too&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answers-list&lt;br /&gt;
| List of answers&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;answers-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;answers-list&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answer-item&lt;br /&gt;
| The answer part: one answer&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;answer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;answer-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .noanswer-item&lt;br /&gt;
| The answer part for no answer&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;noanswer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
| No answer is an answer too, then have double class noanswer-item and answer-item&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question-item&lt;br /&gt;
| The question part: one question&lt;br /&gt;
| Multi text question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;question-item&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;question-item&amp;quot;&amp;gt;&lt;br /&gt;
| Some answer are question too, then we have a lot of class=&amp;quot;question-item answer-item&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-list&lt;br /&gt;
| A list of checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;checkbox-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;checkbox-list&amp;quot;&amp;gt;&lt;br /&gt;
| Some question type have multi list class: like checkbox with comment : class=&amp;quot;checkbox-list text-list&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-item&lt;br /&gt;
| The answer part with a checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;checkbox-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;checkbox-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-list&lt;br /&gt;
| A list of radio item&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;radio-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;radio-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-item&lt;br /&gt;
| The answer part with a radio&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;radio-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;radio-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-list&lt;br /&gt;
| A list of text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-item&lt;br /&gt;
| The answer part of a text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;text-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;text-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-list&lt;br /&gt;
| A list of text input with numeric only answer&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-item&lt;br /&gt;
| The answer part of a numeric input&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;numeric-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;numeric-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-list&lt;br /&gt;
| A list of select&lt;br /&gt;
| Array numbers, Dual scale array (select)&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;select-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-item&lt;br /&gt;
| The answer part of a select&lt;br /&gt;
| Array numbers, Dual scale array (select), single choice with select&lt;br /&gt;
| &amp;amp;lt;p class=&amp;quot;select-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;select-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .hide&lt;br /&gt;
| Used for accessibility: hidden with css but read by screenreader&lt;br /&gt;
| Short text question&lt;br /&gt;
| &amp;amp;lt;label class=&amp;quot;hide&amp;quot;&amp;gt;&lt;br /&gt;
| Can be used for other purpose&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .dontread&lt;br /&gt;
| Used for accessibility: not be read by screenreader&lt;br /&gt;
| Array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;dontread&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox&lt;br /&gt;
| input[type=checkbox]&lt;br /&gt;
| Question with checkbox&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;checkbox&amp;quot; class=&amp;quot;checkbox&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio&lt;br /&gt;
| input[type=radio]&lt;br /&gt;
| Question with radio&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;radio&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text&lt;br /&gt;
| input[type=text]&lt;br /&gt;
| Question with input text, or textarea&lt;br /&gt;
| &amp;amp;lt;textarea class=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answertext&lt;br /&gt;
| Array question type&lt;br /&gt;
| Answer part of array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;answertext&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .col-answers&lt;br /&gt;
| Array question type&lt;br /&gt;
| Column of answers&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .array1 .array2&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for line&lt;br /&gt;
| &amp;amp;lt;tr class=&amp;quot;array1&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Some example of question part with classes=== &amp;lt;!--T:275--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:276--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;text-short question type:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;question answer-item text-item &amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label class=&amp;quot;hide label&amp;quot; for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Answer&amp;lt;/label&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;50&amp;quot; class=&amp;quot;text  empty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:277--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Multiple short text&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul class=&amp;quot;subquestions-list questions-list text-list&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li class=&amp;quot;question-item answer-item text-item&amp;quot; id=&amp;quot;javatbdSGQA&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Some example subquestion&amp;lt;/label&amp;gt;&lt;br /&gt;
     &amp;lt;span&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;20&amp;quot; class=&amp;quot;text empty&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:282--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Array question type&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;question subquestion-list questions-list &amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;caption class=&amp;quot;hide read&amp;quot;&amp;gt;Some explanation for accessibility.&amp;lt;/caption&amp;gt;&lt;br /&gt;
	&amp;lt;colgroup class=&amp;quot;col-responses&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;50%&amp;quot; class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;25%&amp;quot; class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;13.3%&amp;quot; class=&amp;quot;col-no-answer even&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/colgroup&amp;gt;&lt;br /&gt;
	&amp;lt;thead&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array1 dontread&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;No answer&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/thead&amp;gt;&lt;br /&gt;
	&amp;lt;tbody&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array2 answers-list radio-list&amp;quot; id=&amp;quot;javatbdSGQ&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;20%&amp;quot; class=&amp;quot;answertext&amp;quot;&amp;gt;Some example subquestion&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer_cell_001 answer-item radio-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;1&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;1&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer-item radio-item noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;No answer&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The full list of question classes== &amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Question Type&#039;&#039;&#039;||&#039;&#039;&#039;Question Class&#039;&#039;&#039;||&#039;&#039;&#039;Question ID&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|5 point choice||.choice-5-pt-radio||5&lt;br /&gt;
|-&lt;br /&gt;
|Array (10 point choice)||.array-10-pt||B&lt;br /&gt;
|-&lt;br /&gt;
|Array (5 point choice)||.array-5-pt||A&lt;br /&gt;
|-&lt;br /&gt;
|Array (Flexible Labels) dual scale||.array-flexible-duel-scale ||1&lt;br /&gt;
|-&lt;br /&gt;
|Array (Increase, Same, Decrease)||.array-increase-same-decrease||E&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Numbers)||.array-multi-flexi ||:&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Text)||.array-multi-flexi-text||;&lt;br /&gt;
|-&lt;br /&gt;
|Array (Yes/No/Uncertain)||.array-yes-uncertain-no||C&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels)||.array-flexible-row ||F&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels) by column||.array-flexible-column||H&lt;br /&gt;
|-&lt;br /&gt;
|Boilerplate question||.boilerplate||X&lt;br /&gt;
|-&lt;br /&gt;
|Date||.date||D&lt;br /&gt;
|-&lt;br /&gt;
|Gender||.gender||G&lt;br /&gt;
|-&lt;br /&gt;
|Huge free text||.text-huge||U&lt;br /&gt;
|-&lt;br /&gt;
|Language switch||.language||I&lt;br /&gt;
|-&lt;br /&gt;
|List (dropdown)||.list-dropdown||!&lt;br /&gt;
|-&lt;br /&gt;
|List (radio)||.list-radio||L&lt;br /&gt;
|-&lt;br /&gt;
|List with comment||.list-with-comment||O&lt;br /&gt;
|-&lt;br /&gt;
|Long free text||.text-long||T&lt;br /&gt;
|-&lt;br /&gt;
|Multiple numerical input||.numeric-multi||K&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options||.multiple-opt||M&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options with comments||.multiple-opt-comments||P&lt;br /&gt;
|-&lt;br /&gt;
|Multiple short text||.multiple-short-txt||Q&lt;br /&gt;
|-&lt;br /&gt;
|Numerical input||.numeric||N&lt;br /&gt;
|-&lt;br /&gt;
|Ranking||.ranking||R&lt;br /&gt;
|-&lt;br /&gt;
|Short free text||.text-short||S&lt;br /&gt;
|-&lt;br /&gt;
|Yes/No||.yes-no||Y&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The full list of validation classes== &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Note:  Prior to 1.92, only .mandatory and .input-error classes were available.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
These apply to the help and/or validation tip messages so that each type can be individually styled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
The .hide-tip option and .input-error options, by default, interact so that you can have validation tips start hidden, but appear when there validation errors, and disappear again when those errors are rectified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
All of these are designed to eliminate the need for pop-up alert messages.  Instead, tips can appear/disappear as needed, and are color-coded to indicate whether the answers pass the validation criteria.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
Furthermore, when you first visit a page that has unmet validation criteria, you can color-code the tips in a pleasing color to show which validation criteria have not been med; then re-display the page using a harsher color if the person submits the page with lingering validation errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Purpose&#039;&#039;&#039;||&#039;&#039;&#039;CSS Class&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Mandatory||.mandatory||the question is mandatory&lt;br /&gt;
|-&lt;br /&gt;
|User input error||.input-error||the question had at least one validation error&lt;br /&gt;
|-&lt;br /&gt;
|Hide Tip||.hide-tip||added if you use the hide_tip option&lt;br /&gt;
|-&lt;br /&gt;
|Num answers||.em_num_answers||for for min_answers and max_answers&lt;br /&gt;
|-&lt;br /&gt;
|Value range||.em_value_range||for min/max_num_value_n and multiflexible_min/max&lt;br /&gt;
|-&lt;br /&gt;
|Sum range||.em_sum_range||for min/max/equals_num_value&lt;br /&gt;
|-&lt;br /&gt;
|Regex validation||.em_regex_validation||for regular-expression validation of the question&lt;br /&gt;
|-&lt;br /&gt;
|Question-level validation function||.em_q_fn_validation||for the em_validation_q option&lt;br /&gt;
|-&lt;br /&gt;
|Subquestion-level validation function||.em_sq_fn_validation||for the em_validation_sq option&lt;br /&gt;
|-&lt;br /&gt;
|Other comment mandatory||.em_other_comment_mandatory||for other_comment_mandatory option - shows when &amp;quot;other&amp;quot; is selected but associated comment is missing.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Importing styles into your custom template== &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
The custom question styles are near the bottom of each template&#039;s CSS file and start with:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;/* --------------------------- START: Question styles  ------------------------------ */&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
If you&#039;re styling your own custom template, You should be able to copy everything after the above from templates/default/template.css (for tables based layouts) or /templates/limespired/template.css (for CSS based layouts) into your own style sheet without any impact on your other styles.&lt;br /&gt;
&lt;br /&gt;
==Internet Explorer conditional style sheets== &amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
Because of the marked discrepancies in rendering between IE6, IE7 and most other browsers, there are special IE conditional style sheets included for each template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_all-versions.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if lt IE 7]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_older-than-7.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8]&amp;gt;&lt;br /&gt;
		&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}ie_fix_8.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
You should include the above code within your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; and copies of both the IE style sheets from either /templates/default/ or /templates/limespired for Tables base layout and CSS based layout respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; If you copy the styles into your own style sheet you will almost certainly need to tweak them.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alternative solution for Internet explorer=== &amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
You can put conditional class for body in startpage.pstpl, and use this class in your template.css. This method is used in citronade template. Adding a js / no-js class to to have javascript / no javascript system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;!--[if lt IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie6 ielt7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie8 ielt9  no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 9 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if gt IE 9]&amp;gt;&amp;lt;!--&amp;gt;&amp;lt;body id=&amp;quot;body&amp;quot; class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} no-js&amp;quot;&amp;gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;script type=&#039;text/javascript&#039;&amp;gt;/*&amp;lt;![CDATA[*/(function(H){ H.className=H.className.replace(/\bno-js\b/,&#039;js&#039;) })(document.getElementsByTagName(&#039;body&#039;)[0]);/*]]&amp;gt;*/&amp;lt;/script&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
And in template.css use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;.ie6{/*specific for internet explorer 6*/}&lt;br /&gt;
.ielt8{/*specific for internet explorer 6 and 7*/}&lt;br /&gt;
.ie{/*specific for all internet explorer */}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Right-to-Left (RTL) Languages and justify== &amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
The text editor within LimeSurvey is able to format RTL Text. However, the editor itself shows the RTL language in a left to right format when justified.  This is just an editor display issue. The RTL and justified question or text will display correctly from right to left, even when justified, in your survey or on preview.&lt;br /&gt;
&lt;br /&gt;
==Keywords== &amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
Keywords within a template file get replaced by the current survey information. They are surrounded by curly brackets, for example: {SURVEYNAME}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
The following strings will be replaced by LimeSurvey when parsing the template file and presenting it to survey users. These field strings will work on almost every template except for the &#039;Completed Page&#039;. (Most of these strings can be found in the common.php file. If it&#039;s not there, look in the index.php file.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
!&#039;&#039;&#039;Keyword&#039;&#039;&#039;!!&#039;&#039;&#039;Template files&#039;&#039;&#039;!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||All Files||The survey title&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||All Files||The survey description&lt;br /&gt;
|-&lt;br /&gt;
|{WELCOME}||All files (mainly for welcome.pstpl)||The survey &#039;welcome&#039; text&lt;br /&gt;
|-&lt;br /&gt;
|{PERCENTCOMPLETE}||survey.pstpl||A small graph showing the percentage of the survey completed&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPNAME}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group name&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPDESCRIPTION}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group description&lt;br /&gt;
|-&lt;br /&gt;
|{NUMBEROFQUESTIONS}||welcome.pstpl||Displays the total number of questions in the survey (just the number)&lt;br /&gt;
|-&lt;br /&gt;
|{THEREAREXQUESTIONS}||welcome.pstpl||Displays the sentence &amp;quot;There are X questions in this survey&amp;quot; - from the relevant language file. The X is replaced with the number of questions. Note that this will also work appropriately for singular or plural. If there is only 1 question, it will print &amp;quot;There is 1 question in this survey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|{CHECKJAVASCRIPT}||All files (mainly for welcome.pstpl)||Warning message when end-user browser have javascript disabled&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION}||Question.pstpl||(&#039;&#039;&#039;Has been superseeded but the {QUESTION_...} keywords as of LS1.87&#039;&#039;&#039;) Displays the current question text (The format of {QUESTION} can customised by editing &#039;question_start.pstpl&#039;) Use the following: {QUESTION_TEXT}, {QUESTION_MANDATORY}, {QUESTION_HELP}, {QUESTION_MAN_MESSAGE}, {QUESTION_VALID_MESSAGE} and {QUESTION_INPUT_ERROR_CLASS} and appropriate wrapping HTML instead of {QUESTION}&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWER}||question.pstpl, print_question.pstpl||presents the answer form for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{SGQ}||question.pstpl, question text||Can be used in the question text itself, to reference the input field of the question dynamically by displaying the Survey-Group-Question id for the current question. (as of svn build 9755)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTIONHELP}||question.pstpl, print_question.pstpl||Displays help text (predefined tip for question type) for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CLASS}||question.pstpl, print_question.pstpl||unique class for each question type. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CODE}||question.pstpl, print_question.pstpl||Displays the current question code&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ESSENTIALS}||question.pstpl||the question ID and (if a question is conditional), &#039;style=&amp;quot;display:none;&amp;quot;&#039;. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_HELP}||question.pstp, question_start.pstpl||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TYPE_HELP}||print_question.pstp||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_INPUT_ERROR_CLASS}||question.pstp, question_start.pstpl||Provides a class if there was user input error&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ID}||print_question.pstp||Provides a unique ID for each question to allow styling for specific questions&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TEXT}||question.pstp, print_question.pstp, question_start.pstpl||Displays the text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MANDATORY}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_CLASS}||question.pstpl, print_question.pstpl||class if a question is mandatory. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_NUMBER}||print_question.pstpl||Incremental count of questions.&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_VALID_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated valid help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_SCENARIO}||print_question.pstp||Prints out the &#039;scenario&#039; text for conditional questions.&lt;br /&gt;
|-&lt;br /&gt;
|{NAVIGATOR}||navigator.pstpl||Displays navigation buttons (next, prev, last)&lt;br /&gt;
|-&lt;br /&gt;
|{CLEARALL}||All files (but intended for navigator.pstpl)||Displays the &amp;quot;Exit and Clear Results&amp;quot; link&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITBUTTON}||submit.pstpl||Displays the final submit button&lt;br /&gt;
|-&lt;br /&gt;
|{COMPLETED}||completed.pstpl||Displays the &#039;completed&#039; message for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{URL}||completed.pstpl||Displays the survey &#039;url&#039; and &#039;url text&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACY}||submit.pstpl||Displays privacy information when survey is anonymous&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACYMESSAGE}||privacy.pstpl||The privacy message is shown if you set your survey to be anonymous. [[Translating LimeSurvey|The text can be edited/translated]] in the language files. This can also be changed manually by editing the privacy.pstpl template you wish to use.&lt;br /&gt;
|-&lt;br /&gt;
|{TEMPLATEURL}||All Files||The URL to the current template location (useful for referencing image files in your template)&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITCOMPLETE}||endpage.pstpl||The statement (from the language files) that tells the user they have completed the survey, and to press the &amp;quot;Submit&amp;quot; button&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITREVIEW}||survey.pstpl||The statement (from the language files) that tells the user they can review/change the answers they have made by clicking &amp;quot;&amp;lt;&amp;lt; prev&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users first name from the tokens table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users last name from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:EMAIL}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users email from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_1 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_2 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERSCLEARED}||Preferably in navigator.pstpl||The &amp;quot;Answers Cleared&amp;quot; statement from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{RESTART}||clearall.pstpl||URL to restart the survey&lt;br /&gt;
|-&lt;br /&gt;
|{CLOSEWINDOW}||All Files (Preferably in navigator.pstpl)||URL to close current window&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERERROR}||register.pstpl||Shows any error messages in the register page (ie: &amp;quot;You must include an email address&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE1}||register.pstpl||The statement &amp;quot;You must be registered to complete this survey&amp;quot; from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE2}||register.pstpl||Details about registering from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERFORM}||register.pstpl||The actual form for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{SAVE}||Works suitable on navigator.pstpl||Displays the &#039;Save your responses so far&#039; button to offer the user to save and come back later to continue the survey. If the Save option is deactivated in the survey properties the tag will not be shown and ignored.&lt;br /&gt;
|-&lt;br /&gt;
|{LANGUAGECHANGER}||survey.pstpl||Displays a switch in multilingual surveys to change the question.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Input/Buttons== &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
Each &amp;quot;input&amp;quot; type in a survey has been given its own class name, so that you can add CSS to your &amp;quot;startpage.pstpl&amp;quot; file, and have some control over the appearance of form buttons and inputs. These class names are as follows:&lt;br /&gt;
*&#039;&#039;&#039;submit&#039;&#039;&#039; (Submit Buttons)&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; (Text Inputs - for short free text, date and numerical type)&lt;br /&gt;
*&#039;&#039;&#039;answertext&#039;&#039;&#039; (Text of answers)&lt;br /&gt;
*&#039;&#039;&#039;radio&#039;&#039;&#039; (Radio Buttons)&lt;br /&gt;
*&#039;&#039;&#039;checkbox&#039;&#039;&#039; (Check Boxes)&lt;br /&gt;
*&#039;&#039;&#039;select&#039;&#039;&#039; (Select / List Boxes)&lt;br /&gt;
*&#039;&#039;&#039;textarea&#039;&#039;&#039; (Large text inputs - for long free text)&lt;br /&gt;
*&#039;&#039;&#039;clearall&#039;&#039;&#039; (The &amp;quot;Exit and Clear Survey&amp;quot; link)&lt;br /&gt;
*&#039;&#039;&#039;rank&#039;&#039;&#039; (The rank style question. Doesn&#039;t set the colour of the select box or the text boxes (these are set by relevant section above) but does allow changing of background colour, text colour and size etc for the rest of the ranking question)&lt;br /&gt;
*&#039;&#039;&#039;graph&#039;&#039;&#039; (The &amp;quot;percentage completed&amp;quot; graph table)&lt;br /&gt;
*&#039;&#039;&#039;innergraph&#039;&#039;&#039; (The table inside the graph table - this contains the 0% and 100% text. Use this for changing the size of this text)&lt;br /&gt;
*&#039;&#039;&#039;question&#039;&#039;&#039; (General settings for any question that is displayed within a table. Generally you should use this to make sure that their font size and colour is the same as you have used elsewhere as a default)&lt;br /&gt;
*&#039;&#039;&#039;mandatory&#039;&#039;&#039;  (Mandatory questions)&lt;br /&gt;
*&#039;&#039;&#039;input-error&#039;&#039;&#039; (User input error - for if a user has made a mistake with a mandatory question or question with validation)&lt;br /&gt;
*&#039;&#039;&#039;array1&#039;&#039;&#039; and &#039;&#039;&#039;array2&#039;&#039;&#039; (These two styles are cycled when presenting the range of answers for an array type question. This allows you to set an alternating background colour for these question types. &#039;&#039;&#039;Array1&#039;&#039;&#039; is also used for the column headings in these question types)&lt;br /&gt;
*&#039;&#039;&#039;errormandatory&#039;&#039;&#039; (Sets the colour and style of the &amp;quot;This question is mandatory&amp;quot; error message)&lt;br /&gt;
*&#039;&#039;&#039;warningjs&#039;&#039;&#039; (Sets the colour and style of the warning message displayed if the participant&#039;s browser has javascript disabled)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
There are also some elements that can be accessed using the ID of the element (&#039;&#039;&#039;#ID&#039;&#039;&#039; in CSS):&lt;br /&gt;
*&#039;&#039;&#039;surveycontact&#039;&#039;&#039; (The contact message shown on the start page)&lt;br /&gt;
*&#039;&#039;&#039;tokenmessage&#039;&#039;&#039; (used for messages inside the survey, e.g. the session expired error message)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
An example of using these classes with style sheets can be found in the &amp;quot;bubblegum&amp;quot; template that comes with the LimeSurvey application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
Because you can edit all the HTML aspects, there&#039;s no reason to surround your templates with a &amp;lt;div class=&#039;new_name&#039;&amp;gt; and then define a css for that new_name class.&lt;br /&gt;
&lt;br /&gt;
==Styling the progress bar== &amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Before version 1.87:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
The chart.jpg file is a simple one pixel image file which is used to create the progress bar image in the &#039;PERCENTCOMPLETE&#039; table. If the file does not exist, LimeSurvey will use the default &#039;maroon&#039; coloured image in the public directory. If you want to create a bar to match your own colour scheme, then you should save the color in this file. Remember it should be a &#039;&#039;&#039;JPEG&#039;&#039;&#039; file, 1 pixel x 1 pixel, in the colour desired.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
The progress bar appearance can be modified with CSS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
To change the background colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-header {&lt;br /&gt;
 background-color: #3300FF;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
To change the border colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-content,&lt;br /&gt;
#progress-wrapper .ui-widget-header {&lt;br /&gt;
 border: 1px solid #FF0000;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advanced Features Available to Developers== &amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
Starting with version 0.99, LimeSurvey has integrated some user-made patches that allow for some special changes.  These very advanced features generally require changes to the underlying code base of LimeSurvey and should be done carefully so as not to introduce security holes.&lt;br /&gt;
&lt;br /&gt;
===Basic CMS Integration support=== &amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Deprecated: This function is not available anymore in version 2.0 or later&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
To be able to integrate LimeSurvey into another CMS, use the following options in &#039;&#039;&#039;config.php&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
// Set $embedded to true and specify the header and footer functions if the survey is to be displayed embedded in a CMS&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$embedded = false;&lt;br /&gt;
$embedded_inc = &amp;quot;&amp;quot;;               // path to the header to include if any&lt;br /&gt;
$embedded_headerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteHeader for geeklog&lt;br /&gt;
$embedded_footerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteFooter for geeklog&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:133--&amp;gt;&lt;br /&gt;
Set &#039;&#039;&#039;$embedded = true;&#039;&#039;&#039; to enable CMS-embedding. By using the &#039;&#039;&#039;$embedded_inc&#039;&#039;&#039; variable one can include their own &#039;&#039;&#039;.php&#039;&#039;&#039; files.  By setting &#039;&#039;&#039;$embedded_headerfunc&#039;&#039;&#039; or &#039;&#039;&#039;$embedded_footerfunc&#039;&#039;&#039;, one can call functions from within included files that output the relevant headers or footers instead of LimeSurveys default ones.&lt;br /&gt;
&lt;br /&gt;
===Support for your own Javascript functions=== &amp;lt;!--T:134--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:135--&amp;gt;&lt;br /&gt;
Some users may need to run Javascript on the survey pages, but calling &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; in the BODY element made it impossible to do so.  This call has been replaced with a small JavaScript function in the HEAD that sniffs for the existence of &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; and &#039;&#039;&#039;template_onload()&#039;&#039;&#039; before calling each.  This way a template author can create their own &#039;&#039;&#039;template_onload()&#039;&#039;&#039; function in the HEAD that replaces the default one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:136--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
*Disable XSS filter - in Global settings -&amp;gt; Security, set &amp;quot;Filter HTML for XSS&amp;quot; to No.&lt;br /&gt;
*Enter your script in the source of a question or group description.&lt;br /&gt;
*There are more details in the [[Workarounds: Manipulating a survey at runtime using Javascript#How to use Script (eg. JavaScript etc.) in LimeSurvey?|workaround section]].&lt;br /&gt;
&lt;br /&gt;
=Videos on Templates= &amp;lt;!--T:137--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
This video will demonstrate the basic and advanced template functions that are available to all LimeSurvey users. This includes changing the appearance of certain forms and inserting custom graphics. Additionally, it will thoroughly walk you through on how to edit and preview specific page templates, importing/exporting templates, modify appearance of questions in the CSS, customizing survey description page, and completed page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
[http://youtu.be/Uk3FQyDTIY0 LimeSurvey training video - template customization]&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; Tricks= &amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Some language specific element== &amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
If you want to have some langage specific sentence in a survey, for example an help at end of each page, you can add in a .pstl file a sentence and hidding it for other langage. And hidding it in the template.css, we can use psuedo selector :lang, but for best compatibility, we use some class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
Example for a help sentence at bottom of the page, in french an english, put this on endpage.pstpl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;fr&amp;quot; lang=&amp;quot;fr&amp;quot;&amp;gt;Pour de l&#039;aide en direct appelez le 000000&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;en&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;For some help, please call 000000&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
and in template.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;.lang-fr .en{display:none}&lt;br /&gt;
.lang-en .fr{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
You can use it to for other sentence in your question before 1.92 ( in 1.92, there are better solutions).&lt;br /&gt;
&lt;br /&gt;
==Change the layout of the survey page== &amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
When editing a template this template can be assigned to a single survey while the survey list page, which is shown at www.yourdomain.org/limesurveyinstallfolder, lists all your surveys.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
To use your current template for this page you have change the according setting at the Global Settings screen; at older versions this change can be done by editing the $defaulttemplate setting at the config file: Copy this setting from config-defaults.php to config.php which overrides config-defaults.php and edit this setting to $defaulttemplate = &#039;yourtemplatename&#039;;&lt;br /&gt;
&lt;br /&gt;
==Import/Export of templates: Mac users== &amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
Mac users, please note: Mac OSX default archive utility may have problems with zip folders &amp;quot;generated on the fly&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
a work around is to unix&#039;es unzip from the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
$ unzip template.zip -d template&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
Archive: template.zip&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
 inflating: template/startpage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
 inflating: ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
or scripts in their mac-compiled counterparts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
http://homepage.mac.com/roger_jolly/software/&lt;br /&gt;
&lt;br /&gt;
==Changing your templates traffic light from red to green== &amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
If you haven&#039;t already, set the admin directory to read/write/execute (777). The files within it, however, may be set to read/execute only (chmod 755).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
GO to file directory ie file manager, find templates directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
1 change permission on eg&amp;quot;vallendar&amp;quot; (or any template of your choice) directory to read 777&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
2 voila! the red traffic light on &amp;quot;vallendar&amp;quot; is now green.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:172--&amp;gt;&lt;br /&gt;
3 NOTE: to restrict access for safety, when finished editing template files, change all templates files back to what they were eg 644&lt;br /&gt;
&lt;br /&gt;
==Replacing the help icon== &amp;lt;!--T:173--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:174--&amp;gt;&lt;br /&gt;
When a question help text is shown then an help.gif image is used from the default template folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:175--&amp;gt;&lt;br /&gt;
You can replace this image by uploading a new help.gif, help.png or help.jpg in your custom template folder. It then will be automatically used instead of the default help icon.&lt;br /&gt;
&lt;br /&gt;
==Replacing an existing logo== &amp;lt;!--T:176--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:177--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Before uploading a new logo always delete the old, existing one!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
1. To edit the logo go to the &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; file which you can find it here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
[[File:t1.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:180--&amp;gt;&lt;br /&gt;
2. Click the search button to find occurrences of logo related styles.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
[[File:2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:182--&amp;gt;&lt;br /&gt;
3. Search for &amp;lt;u&amp;gt;#logo&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:183--&amp;gt;&lt;br /&gt;
[[File:3.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
4. Edit the main style file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:185--&amp;gt;&lt;br /&gt;
You will see something similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:186--&amp;gt;&lt;br /&gt;
[[File:t4.PNG|500px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:187--&amp;gt;&lt;br /&gt;
If you want to change the image just replace logo.gif with another image link. Example: (&amp;lt;u&amp;gt;logo.png&amp;lt;/u&amp;gt; or &amp;lt;u&amp;gt;logo.jpg&amp;lt;/u&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
If you want change the image size adjust width and height (in pixels) like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:189--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;width:100px; height:100px;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding your own logo== &amp;lt;!--T:190--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:191--&amp;gt;&lt;br /&gt;
1. Find and open the &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo; template file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
[[File:5.PNG|200px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:194--&amp;gt;&lt;br /&gt;
2. After the &amp;lt;source lang=&amp;quot;html4strict&amp;quot; &amp;gt;&amp;lt;body ... &amp;gt;&amp;lt;/source&amp;gt; tag add this line to &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;img id=&amp;quot;page_logo&amp;quot; src=&amp;quot;{TEMPLATEURL}logo.png&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:196--&amp;gt;&lt;br /&gt;
3. To add logo go to &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo;, you can find it here (see in screen):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:197--&amp;gt;&lt;br /&gt;
[[File:6.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:198--&amp;gt;&lt;br /&gt;
3.1 Then go to the end of the main &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; style file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:199--&amp;gt;&lt;br /&gt;
3.2 To align the logo add...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:200--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at left side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:201--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:left;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at right side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:right;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:208--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want to center the logo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:209--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   display: block;&lt;br /&gt;
   margin-left: auto;&lt;br /&gt;
   margin-right: auto;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use the same template with different logos== &amp;lt;!--T:214--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:215--&amp;gt;&lt;br /&gt;
If you want to use the same template for all surveys and just want to change the logo for each survey, you can use the {SID} placeholder in the template .pstpl file and thereby refer to different images:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:216--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;{TEMPLATEURL}logoImage-{SID}.png&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the default help to all question (hide_tip)== &amp;lt;!--T:217--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:218--&amp;gt;&lt;br /&gt;
There are 3 solutions to remove the default help:&lt;br /&gt;
# like a [[Advanced question settings#hide_tip|hide_tip attribute]] but for all question and survey.&lt;br /&gt;
# you can remove the {QUESTIONHELP} and is container from the file question.pstl, but it can be a bad idea for screenreader.&lt;br /&gt;
# for the default template and some other, add this at the end of tempate.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:219--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;span.questionhelp{display:none;}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Display custom favicon== &amp;lt;!--T:220--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:221--&amp;gt;&lt;br /&gt;
A favicon is the little icon you see in the browser&#039;s address bar, list of bookmarks or tab. You can display your own icon as follows:&lt;br /&gt;
#Create a favicon - google will find you lots of free favicon generators&lt;br /&gt;
#Name your new favicon &amp;quot;favicon.ico&amp;quot; and place it in your template directory&lt;br /&gt;
#Add the following code to your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; before the &amp;lt;/head&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:222--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;link rel=&amp;quot;icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Different appearance for survey-/question-pages== &amp;lt;!--T:224--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:225--&amp;gt;&lt;br /&gt;
(&#039;&#039;Version 1.91 and newer&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:226--&amp;gt;&lt;br /&gt;
If you want LimeSurvey to change the appearance of every second page (i.e. of even and odd survey pages) you can use &#039;&#039;&#039;.page-odd&#039;&#039;&#039; class in your css file to change the appearance of odd pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:227--&amp;gt;&lt;br /&gt;
example from default template of LimeSurvey 1.91+&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:228--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
.page-odd table.question-group {&lt;br /&gt;
 background-color: #D2F2D3;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:232--&amp;gt;&lt;br /&gt;
To &#039;&#039;&#039;not&#039;&#039;&#039; differentiate even and odd pages at the (default) template find all instances of &#039;&#039;.page-odd&#039;&#039; in template.css and remove those styles.&lt;br /&gt;
&lt;br /&gt;
==Create a vertical separator  border for dual scale array== &amp;lt;!--T:233--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:234--&amp;gt;&lt;br /&gt;
To create a vertical separator border for a dual scale array you can add the following lines to your &#039;&#039;&#039;template.css&#039;&#039;&#039;-file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:235--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
table.question thead td.header_separator,&lt;br /&gt;
table.question tbody td.dual_scale_separator&lt;br /&gt;
{&lt;br /&gt;
   border-right:solid 1px #00A8E1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:242--&amp;gt;&lt;br /&gt;
header_separator is used to adress the separator for the header &amp;quot;td&amp;quot; and &amp;quot;dual_scale_separator&amp;quot; is used to adress the separator column in the dual scale array.&lt;br /&gt;
&lt;br /&gt;
==Hide the survey contact message shown on the start page/survey list== &amp;lt;!--T:243--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:244--&amp;gt;&lt;br /&gt;
To hide the &amp;quot;Please contact ...&amp;quot; message on the start page (with the survey list) you can add the following to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.js&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:245--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:246--&amp;gt;&lt;br /&gt;
$(&#039;#surveycontact&#039;).hide(); //Hides the survey contact message&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:247--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the survey contact message shown on error messages== &amp;lt;!--T:248--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:249--&amp;gt;&lt;br /&gt;
If you want to remove the survey contact message from error messages it&#039;ll be trickier. You can add the following function call to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.css&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:250--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
removeContactAdressFromMessage(); //Removes the survey contact message from error messages&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:253--&amp;gt;&lt;br /&gt;
and add the following function to your *template.js* file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:254--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
function removeContactAdressFromMessage()&lt;br /&gt;
{&lt;br /&gt;
if ($(&#039;#tokenmessage&#039;).length &amp;gt; 0)&lt;br /&gt;
   {&lt;br /&gt;
   var oldMessage = $(&#039;#tokenmessage&#039;).html();&lt;br /&gt;
   var indexContact = oldMessage.indexOf(&#039;Bitte kontaktieren&#039;);&lt;br /&gt;
   var newMessage = oldMessage.substr(0, indexContact);&lt;br /&gt;
   $(&#039;#tokenmessage&#039;).html(newMessage);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:266--&amp;gt;&lt;br /&gt;
It will probably not work for an englisch survey and have to be extended when using for multilingual surveys. But it&#039;s an idea/tip how to solve this.&lt;br /&gt;
&lt;br /&gt;
==How to deal with multilingual question attributes (before version 2.0 at which those were added)== &amp;lt;!--T:267--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:268--&amp;gt;&lt;br /&gt;
If you have a multilingual survey and e. g. want to use a different string for the &amp;quot;other&amp;quot; field, this could only be done for the base language (until this feature was added at LimeSurvey 2.0). To work around this, paste in the field to change the label for &amp;quot;other&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:269--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;en&amp;quot;&amp;gt;New label&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;fr&amp;quot;&amp;gt;Nouveau label&amp;lt;/span&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:270--&amp;gt;&lt;br /&gt;
At the template.css of your template (at /limesurvey/upload/templates/&amp;lt;yourtemplatename&amp;gt;/template.css) add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:271--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;html:lang(en) .fr{display:none}&lt;br /&gt;
html:lang(fr) .en{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=57587</id>
		<title>Theme editor</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=57587"/>
		<updated>2013-10-12T01:36:28Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
LimeSurvey has a basic template and style system providing a theme-like capability found in many browser-based applications.  They are simply termed &#039;&#039;&#039;Templates&#039;&#039;&#039; here.  The Templates allow control over the look and feel of pages during a survey.  A survey administrator can select the template to use for each survey to thus personalize that survey&#039;s look and feel.  Changes to a Template can be as simple as adding a unique logo on the welcome page, changing background colors, or maybe new text colors for specific types of questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
LimeSurvey comes with a set of templates right out of the box. These initial templates are defined by directories within the LimeSurvey installation &amp;quot;templates&amp;quot; directory.  Each template has it&#039;s own directory.  Within the main directory of a template are numerous files: &#039;&#039;&#039;templates (.pstpl)&#039;&#039;&#039;, &#039;&#039;&#039;cascading style sheets (.css)&#039;&#039;&#039;, &#039;&#039;&#039;images&#039;&#039;&#039; (&#039;&#039;&#039;.jpg&#039;&#039;&#039; or &#039;&#039;&#039;.png&#039;&#039;&#039;) and maybe others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Like in other theme-based systems, fragments of HTML code are stored in the .pstpl template files.  These fragments are read in and used to construct the page to display to the end user during the operation of a survey. Often &#039;&#039;&#039;keywords&#039;&#039;&#039; surrounded by curly braces are included in the files that are then replaced with the relevant text.  The following gives an example of a template file content and its result when used in a survey page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&amp;lt;font face=&#039;verdana&#039; color=&#039;red&#039;&amp;gt;{SURVEYNAME}&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;verdana&#039; color=&#039;blue&#039;&amp;gt;&amp;lt;u&amp;gt;{SURVEYDESCRIPTION}&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
One gets a result that looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:278--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&#039;&#039;&#039;&amp;lt;span style=&#039;color:red&#039;&amp;gt;My New Survey&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;u&amp;gt;&amp;lt;span style=&#039;color:#0000ff&#039;&amp;gt;This is a survey written by me to find out what sort of chocolate people like.&amp;lt;/span&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Templates, being HTML code, tend to define the positioning and type of text to be displayed and similar structural features of the page.  They often reference or include other files.  Most reference a common cascading style sheets (CSS) file that defines the font style, color, size, background and similar parameters common to all pages in the survey. Style sheets reference HTML &#039;&#039;&#039;class&#039;&#039;&#039; parameters that are associated with the various types of objects in the HTML code.  This allows the style sheet to describe once how to display each of the many types of text or other objects that may appear in multiple places.  There are unique classes for each question type in LimeSurvey and thus giving detailed control over the appearance of each.  Image files, like logos or special progress-bar constructors, may be referenced as well in the Template file.  Finally, special Keywords in curly braces are replaced with text defined in the Survey for each of its corresponding language translations (for example, the Survey Title or Question Text for each language defined).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
If you create a new custom template, please consider contributing it back to the LimeSurvey community, and make it available to others. With your help, we can grow our repository of templates, surveys, and other ad-ons, to make LimeSurvey even better! See the shared [http://www.limesurvey.org/en/download-limesurvey-design-templates/com_josetta_menu_control_panel/viewcategory/9-survey-design-templates Template Repository]&lt;br /&gt;
&lt;br /&gt;
=Creating a new Template= &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
To be able to create a new template (or edit an existing template), you need Template Editing user permission in LimeSurvey as well as permission to manipulate the files in the underlying operating system hosting your LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note of Warning:&#039;&#039;&#039; As template changes can affect all surveys in an installation, changes should be limited to those skilled in understanding general concepts in the code base. Templates are an advanced feature that can take some experimentation to get correct if you are not familiar with HTML code methods.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
The preferred way to create a new template is through the Template Editor (see below) via the web Admin interface. Some people may like to work directly with template files so that they can use their favorite text editor instead of the web interface. In this case, still use the Template Editor to first create your new template. This will create a new base template with all the files you need in the LimeSurvey_web_root/upload/templates/your_new_template directory. From there you can use your text editor to manually adjust the template files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Permissions Note:&#039;&#039;&#039; on unix/linux systems, these template files will be owned by the group and user who the web server is running as (may be &amp;quot;www&amp;quot; for some systems). So make sure you have access to edit these files, and when you save them make sure they don&#039;t change ownership, so you can still use the web Template Editing interface if needed&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
Template files may seem complex to understand at first. You have to likely understand HTML code, possibly Styles and Style Sheets, and have access to the underlying LimeSurvey installation files if the template files and directories are not editable. Copy an existing template to a new directory to play around with the content. This may help make the concept clearer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
A number of the &#039;public&#039; elements of LimeSurvey can be adjusted by a series of templates. This section provides a very brief explanation of these templates.&lt;br /&gt;
&lt;br /&gt;
=The LimeSurvey Template Editor= &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
To ease the understanding and quick update of a Template, LimeSurvey provides a &#039;&#039;&#039;Template Editor&#039;&#039;&#039; in the main &#039;&#039;&#039;administrative&#039;&#039;&#039; toolbar of the application.  This Template Editor is only available to users given the privilege in the User Security settings.  A template effects all surveys and can render a survey inoperable if not constructed properly.  So Template editing is thought best restricted to a very limited, knowledgeable set of users.  Having permission to enter the Template Editor is not enough though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
The LimeSurvey Template Editor allows you to edit the contents of your templates online. Start the Template Editor by clicking on the &amp;quot;Template Editor&amp;quot; icon [[File:templates.png]] in the LimeSurvey Administration toolbar (Templates). The main screen is similar to the LimeSurvey Survey Administration screen. It allows you to select the template to edit/view. Once this has been selected you can then select from one of the different public survey pages. You are then presented with a list of the template files that make up that particular page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:279--&amp;gt;&lt;br /&gt;
[[File:Template-editor-2013-7-10_11_38_16.png|center]]&lt;br /&gt;
&lt;br /&gt;
==The Template Menu== &amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:280--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Edit Icon:&#039;&#039;&#039; The &amp;quot;edit&amp;quot; icon indicates whether or not the template is editable. A blurred out icon indicates that the template is read only; a clickable icon indicates you may make modifications. To change the icon from blurred to clear, you have to modify the template&#039;s permissions.&lt;br /&gt;
*&#039;&#039;&#039;Import Template:&#039;&#039;&#039; Allows you to import a template.&lt;br /&gt;
*&#039;&#039;&#039;Export Template:&#039;&#039;&#039; Allows you to export the current template to a .zip-File.&lt;br /&gt;
*&#039;&#039;&#039;Copy Template:&#039;&#039;&#039; Allows you to make a new template by copying the current one.&lt;br /&gt;
*&#039;&#039;&#039;Rename this template:&#039;&#039;&#039; Allows you to change the name of the template.  Generally used after copying an existing template or importing a template by manipulating the underlying directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
The &amp;quot;Screen&amp;quot; drop-down list on the right allows you to choose which particular survey page you are currently looking at.&lt;br /&gt;
&lt;br /&gt;
==Import/Export/Copy a Template== &amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
When you &#039;&#039;&#039;export &#039;&#039;&#039;a template, this will create a zip-file archive with all the files your template consists of (.pstpl files, images, css files, ...). You can simply &#039;&#039;&#039;import &#039;&#039;&#039;the exported zip-file at other LimeSurvey systems by using the import feature or you can manually copy the archive to another installation and extract it into the corresponding template directory there. If you copy the template in the same installation, you will need to rename the folder to create another named copy of that template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
If the file and directory permissions are open for the LimeSurvey application to write, then you can use the programs &#039;&#039;&#039;copy &#039;&#039;&#039;and rename features to make a local copy of a template.&lt;br /&gt;
&lt;br /&gt;
==Page Structure / Template Use== &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;The Welcome Page:&#039;&#039;&#039; startpage.pstpl, welcome.pstpl, privacy.pstpl,  navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Questions Pages:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, startgroup.pstpl, groupdescription.pstpl, question.pstpl, endgroup.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Submit Page:&#039;&#039;&#039; startpage.pstpl, survey.pstpl, submit.pstpl, (privacy.pstpl), navigator.pstpl, endpage.pstpl&lt;br /&gt;
*&#039;&#039;&#039;The Final Page:&#039;&#039;&#039; startpage.pstpl, assessment.pstpl, completed.pstpl, endpage.pstpl&lt;br /&gt;
&lt;br /&gt;
==Template Files== &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
The following template files are used to produce your public survey and must exist in any new template folder you create:&lt;br /&gt;
*&#039;&#039;&#039;startpage.pstpl:&#039;&#039;&#039; Produces the start of each html page. It starts at the &amp;quot;&amp;lt;head&amp;gt;&amp;quot; tag, and should not contain the &amp;quot;&amp;lt;html&amp;gt;&amp;quot; tag. This &#039;very beginning&#039; of a standard html page is written by the scripts. Please ensure that your startpage.pstpl files contains a &amp;lt;body&amp;gt; tag, even though many browsers do not require strict adherence to the W3 HTML stanards, the LimeSurvey script needs to find a &amp;lt;body&amp;gt; tag, to run certain javascript elements. It is not expected that many &#039;keywords&#039; will be used in the startpage.pstpl file, however you may wish to put the {SURVEYNAME} into the title. The startpage.pstpl file can contain code that ends in the corresponding endpage.pstpl file, so you can start a table in this file and close the table in the endpage.pstpl file. The startpage.pstpl and endpage.pstpl files wrap around every possible page used by LimeSurvey.&lt;br /&gt;
*&#039;&#039;&#039;survey.pstpl:&#039;&#039;&#039; This template is the second used on most pages, and provides a space to put the survey name and description. This template does not have a corresponding &#039;closing&#039; template, and subsequently you should close all tags opened in this template file (ie: don&#039;t leave a table open here because there is nowhere else to close it)&lt;br /&gt;
*&#039;&#039;&#039;welcome.pstpl:&#039;&#039;&#039; This template is only used in the welcome screen (which is also on the main page for &#039;all in one&#039; surveys). You can use this to print out the welcome text, and other information that should be provided in the introduction. Like the &#039;survey.pstpl&#039; file, there is no corresponding &#039;closing&#039; template, so all tags opened in this template file should be closed as well.&lt;br /&gt;
*&#039;&#039;&#039;startgroup.pstpl:&#039;&#039;&#039; This template can provide a &#039;summary&#039; wrap around for questions within a group. It has a matching &#039;endgroup.pstpl&#039; template that can be used to close any opened tags in this file, so you can open a table within this.&lt;br /&gt;
*&#039;&#039;&#039;groupdescription.pstpl:&#039;&#039;&#039; This template file is used to display a description of a group. It is separate to the startgroup.pstpl file because in a &amp;quot;question by question&amp;quot; survey it will be displayed on its own unique page in between groups, whereas in a &amp;quot;group by group&amp;quot; or &amp;quot;all in one&amp;quot; survey it provides a header to the subsequent questions. groupdescription.pstpl does not have a corresponding &#039;closing&#039; template file, so all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question.pstpl:&#039;&#039;&#039; This file contains the question, answer and help text sections of your survey, and in the &amp;quot;group by group&amp;quot; and &amp;quot;all in one&amp;quot; surveys this template is cycled repeatedly with each question. There is no corresponding closing file for this and all tags should be closed.&lt;br /&gt;
*&#039;&#039;&#039;question_start.pstpl:&#039;&#039;&#039; This file contains the individual elements found at the start of a question. It is included within &#039;question.pstpl&#039; via the {QUESTION} keyword. It is intended to allow template designers more control over the layout of a question. This template sits outside the normal templating system and &#039;&#039;&#039;was superseeded (as of LS1.87)&#039;&#039;&#039;. All keywords from this template are now available directly in question.pstpl. NOTE: templates using question_start.pstpl will still work at least for a couple more versions of LS 1.x&lt;br /&gt;
*&#039;&#039;&#039;submit.pstpl (and privacy.pstpl):&#039;&#039;&#039; This page is the penultimate page for all types of survey (except the &amp;quot;all in one&amp;quot; type) where the participant is given an option to review questions before submitting their responses. It provides privacy information where a survey is anonymous, which it extracts from the &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039; file.&lt;br /&gt;
*&#039;&#039;&#039;completed.pstpl:&#039;&#039;&#039; This page is displayed as the final page when the survey responses have been saved and the survey is over. It can be used to display a &amp;quot;forwarding link&amp;quot; as set in the survey setup.&lt;br /&gt;
*&#039;&#039;&#039;endgroup.pstpl:&#039;&#039;&#039; This file closes the group, and can be used to close off any tags opened in the startgroup.pstpl file&lt;br /&gt;
*&#039;&#039;&#039;navigator.pstpl:&#039;&#039;&#039; This file contains the buttons that navigate through the survey, &amp;quot;next&amp;quot;, &amp;quot;prev&amp;quot;, &amp;quot;last&amp;quot;, &amp;quot;submit&amp;quot;, &amp;quot;save so far&amp;quot;  and the &amp;quot;clear all&amp;quot; link. It is used in all pages except the completed page.&lt;br /&gt;
*&#039;&#039;&#039;printanswers.pstpl:&#039;&#039;&#039; This file has the HTML wrapper for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_group.pstpl:&#039;&#039;&#039; This file is the same as startgroup.pstpl endgroup.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_question.pstpl:&#039;&#039;&#039; This file is the same as question.pstpl but for the print version of the survey.&lt;br /&gt;
*&#039;&#039;&#039;print_survey.pstpl:&#039;&#039;&#039; This file is the same as survey.pstpl but for the print version of the survey.&lt;br /&gt;
&lt;br /&gt;
== CSS and Javascript== &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Two files are allways used for template : template.css for css and template.js for javascript.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATECSS}:&#039;&#039;&#039; Add lines for default css, template.css and template-rtl.css for rtl language.&lt;br /&gt;
*&#039;&#039;&#039;{TEMPLATEJS}:&#039;&#039;&#039; Add lines for default javascript files, template.js and all js files needed for LimeSurvey.&lt;br /&gt;
&lt;br /&gt;
=== Replacing default css or javascript=== &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Some question use specific files for javascript or css. You can use your own files. All files used in your survey included in ./scripts or in .//styles-public can be replaced, just put a file with the same name in your template.&lt;br /&gt;
&lt;br /&gt;
==Other Template Files== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
The &#039;&#039;&#039;privacy.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;invitationemail.pstpl&#039;&#039;&#039;, &#039;&#039;&#039;reminderemail.pstpl&#039;&#039;&#039; and &#039;&#039;&#039;confirmationemail.pstpl&#039;&#039;&#039; are no longer used by LimeSurvey and defaults are instead set in the applicable language files. The email messages can now be edited on a survey by survey basis.&lt;br /&gt;
&lt;br /&gt;
==Standard Pages== &amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
There are ten standard pages that a survey participant may see in the course of taking or accessing the LimeSurvey application.  Each is constructed from a number of common &#039;&#039;&#039;Template&#039;&#039;&#039; files from the &#039;&#039;&#039;Template&#039;&#039;&#039; specified in the survey&#039;s settings.  The table below indicates which template files are used in constructing each of these pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!  &#039;&#039;&#039;Survey Pages:&#039;&#039;&#039;&amp;lt;br /&amp;gt;&#039;&#039;&#039;Template Files&#039;&#039;&#039;!!Survey&amp;lt;br /&amp;gt;List!!Welcome!!Question!!Completed!!Clear All!!Register!!Load!!Save!!Print&amp;lt;br /&amp;gt;Answers!!Print&amp;lt;br /&amp;gt;Survey&lt;br /&gt;
|-&lt;br /&gt;
|SurveyList||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Welcome|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Privacy|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Navigator|| ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Survey|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|StartGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|GroupDescription|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Question&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|EndGroup|| || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Assessment|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Completed|| || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|ClearAll|| || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Register|| || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || || ||&lt;br /&gt;
|-&lt;br /&gt;
|Load|| || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| || ||&lt;br /&gt;
|-&lt;br /&gt;
|Save|| || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| ||&lt;br /&gt;
|-&lt;br /&gt;
|PrintAnswers|| || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||&lt;br /&gt;
|-&lt;br /&gt;
|Print Survey || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Group || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|Print Question || || || || || || || || || ||align=&amp;quot;center&amp;quot; | [[File:check.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|StartPage&amp;lt;br /&amp;gt;EndPage&amp;lt;br /&amp;gt;Template.css||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]||align=&amp;quot;center&amp;quot; | [[File:check.gif]]|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In versions 1.90 and up this replaces question.pstpl AND question_start.pstpl. If you are using an old custom template, you need to add the following line to the beginning of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div {QUESTION_ESSENTIALS} class=&amp;quot;{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;And then add the corresponding closing tag to the end of question.pstpl:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;/span&amp;gt;NOTE: In version 1.91 and earlier, LimeSurvey js files are not included by the template. In version 2, &#039;&#039;&#039;you have to use {TEMPLATEJS} in your one of your template file&#039;&#039;&#039; to add the link to the js file. You can add it in startpage.pstpl or in endpage.pstpl. You can remove the {TEMPLATEURL}/template.js line and you have to replace with {TEMPLATEJS} to update a personal template.&lt;br /&gt;
&lt;br /&gt;
==The File Control Section== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
In the &amp;quot;file control&amp;quot; window on the left, you can click on one of the template files that is used to compile the page. The HTML code for that file will then appear in the &amp;quot;Now editing&amp;quot; window in the center. If the template is editable (determined by directory permissions) you can then make any changes and save them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
The &amp;quot;Other Files&amp;quot; window shows a list of all other files in the template directory. You can use the right side to &#039;&#039;&#039;upload and select image files (your pics, logos,...) or other files needed to create your template&#039;&#039;&#039;. Note: Instead of a link directly to each picture in your template you can use the field string {TEMPLATEURL}.  So instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;/limesurvey/templates/yourtemplate/mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
You can use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;{TEMPLATEURL}mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
A &amp;quot;sample&amp;quot; of the template page you are editing will be visible at the bottom of the screen. There is no way to to delete a template from the template editor. This must be done by accessing the underlying directory and deleting the file there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; The shipped templates cannot be edited using the Template Editor and should never be changed. If you want to modify them, create a copy first and modify the copy.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Location of template files== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
LimeSurvey stores each of the &#039;standard&#039; templates in their own distinct sub-directory within the /templates directory that is kept in the public directory with the other LimeSurvey public files. Customized user templates are stored in the /upload/templates directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
To create a new template, use the according icon in the template editor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
There should ALWAYS be a &amp;quot;default&amp;quot; directory in the templates directory. This template is used by default and as a fall-back if a template folder doesn&#039;t exist, or can&#039;t be found. The &amp;quot;default&amp;quot; directory comes with the package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
You can use any image files that you upload into the template management area with syntax like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;{TEMPLATEURL}filename.xyz&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Styling questions with CSS= &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
Styling of questions in CSS has become much easier. Each question type now has a unique class. Mandatory question&#039;s also have an additional mandatory class. For example, for a non-mandatory question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
and if the question is mandatory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
and if the question is mandatory but the user didn&#039;t answer it or if there is validation on a question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question5&amp;quot; class=&amp;quot;gender mandatory input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
and if the question has validation applied but the user hasn&#039;t answered correctly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;question6&amp;quot; class=&amp;quot;text-short input-error&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Global classes for question part== &amp;lt;!--T:273--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:274--&amp;gt;&lt;br /&gt;
This class are used for each question type. Some question type use only one or two class, but other can use much more.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:281--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable alternance&amp;quot;&lt;br /&gt;
|+ Global classes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Class name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Part&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Question type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Examples&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Note&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question&lt;br /&gt;
| All question block&lt;br /&gt;
| All question type&lt;br /&gt;
|&amp;amp;lt;p class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;ul class=&amp;quot;question&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;question&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .subquestions-list&lt;br /&gt;
| List of subquestion&lt;br /&gt;
| Multi choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;subquestions-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;subquestions-list&amp;quot;&amp;gt;&lt;br /&gt;
| .questions-list is used too&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answers-list&lt;br /&gt;
| List of answers&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;answers-list&amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;answers-list&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answer-item&lt;br /&gt;
| The answer part: one answer&lt;br /&gt;
| Single choice question, array question type, Multi input text question&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;answer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;answer-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .noanswer-item&lt;br /&gt;
| The answer part for no answer&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;noanswer-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
| No answer is an answer too, then have double class noanswer-item and answer-item&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .question-item&lt;br /&gt;
| The question part: one question&lt;br /&gt;
| Multi text question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;question-item&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;question-item&amp;quot;&amp;gt;&lt;br /&gt;
| Some answer are question too, then we have a lot of class=&amp;quot;question-item answer-item&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-list&lt;br /&gt;
| A list of checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;checkbox-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;checkbox-list&amp;quot;&amp;gt;&lt;br /&gt;
| Some question type have multi list class: like checkbox with comment : class=&amp;quot;checkbox-list text-list&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox-item&lt;br /&gt;
| The answer part with a checkbox&lt;br /&gt;
| Multi choice question, array number (checkbox) question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;checkbox-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;checkbox-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-list&lt;br /&gt;
| A list of radio item&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;radio-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;radio-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio-item&lt;br /&gt;
| The answer part with a radio&lt;br /&gt;
| Single choice question, array question type&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;radio-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;radio-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-list&lt;br /&gt;
| A list of text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text-item&lt;br /&gt;
| The answer part of a text input&lt;br /&gt;
| Multi text question type, array of text&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;text-item&amp;quot;&amp;gt;, &amp;lt;td class=&amp;quot;text-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-list&lt;br /&gt;
| A list of text input with numeric only answer&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;, &amp;amp;lt;tr class=&amp;quot;text-list numeric-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .numeric-item&lt;br /&gt;
| The answer part of a numeric input&lt;br /&gt;
| Multi numeric question type, array of number&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;numeric-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;numeric-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-list&lt;br /&gt;
| A list of select&lt;br /&gt;
| Array numbers, Dual scale array (select)&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;select-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-item&lt;br /&gt;
| The answer part of a select&lt;br /&gt;
| Array numbers, Dual scale array (select), single choice with select&lt;br /&gt;
| &amp;amp;lt;p class=&amp;quot;select-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;select-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .hide&lt;br /&gt;
| Used for accessibility: hidden with css but read by screenreader&lt;br /&gt;
| Short text question&lt;br /&gt;
| &amp;amp;lt;label class=&amp;quot;hide&amp;quot;&amp;gt;&lt;br /&gt;
| Can be used for other purpose&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .dontread&lt;br /&gt;
| Used for accessibility: not be read by screenreader&lt;br /&gt;
| Array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;dontread&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox&lt;br /&gt;
| input[type=checkbox]&lt;br /&gt;
| Question with checkbox&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;checkbox&amp;quot; class=&amp;quot;checkbox&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .radio&lt;br /&gt;
| input[type=radio]&lt;br /&gt;
| Question with radio&lt;br /&gt;
| &amp;amp;lt;input type=&amp;quot;radio&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
| With modern browser: not needed but some old browser need this&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .text&lt;br /&gt;
| input[type=text]&lt;br /&gt;
| Question with input text, or textarea&lt;br /&gt;
| &amp;amp;lt;textarea class=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .answertext&lt;br /&gt;
| Array question type&lt;br /&gt;
| Answer part of array question type&lt;br /&gt;
| &amp;amp;lt;th class=&amp;quot;answertext&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .col-answers&lt;br /&gt;
| Array question type&lt;br /&gt;
| Column of answers&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .odd .even&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for column&lt;br /&gt;
| &amp;amp;lt;col class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .array1 .array2&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for line&lt;br /&gt;
| &amp;amp;lt;tr class=&amp;quot;array1&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Some example of question part with classes=== &amp;lt;!--T:275--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:276--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;text-short question type:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;question answer-item text-item &amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;label class=&amp;quot;hide label&amp;quot; for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Answer&amp;lt;/label&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;50&amp;quot; class=&amp;quot;text  empty&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:277--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Multiple short text&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul class=&amp;quot;subquestions-list questions-list text-list&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li class=&amp;quot;question-item answer-item text-item&amp;quot; id=&amp;quot;javatbdSGQA&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;answerSGQA&amp;quot;&amp;gt;Some example subquestion&amp;lt;/label&amp;gt;&lt;br /&gt;
     &amp;lt;span&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; size=&amp;quot;20&amp;quot; class=&amp;quot;text empty&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:282--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Array question type&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;question subquestion-list questions-list &amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;caption class=&amp;quot;hide read&amp;quot;&amp;gt;Some explanation for accessibility.&amp;lt;/caption&amp;gt;&lt;br /&gt;
	&amp;lt;colgroup class=&amp;quot;col-responses&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;50%&amp;quot; class=&amp;quot;col-answers&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;25%&amp;quot; class=&amp;quot;odd&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;col width=&amp;quot;13.3%&amp;quot; class=&amp;quot;col-no-answer even&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/colgroup&amp;gt;&lt;br /&gt;
	&amp;lt;thead&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array1 dontread&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th&amp;gt;No answer&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/thead&amp;gt;&lt;br /&gt;
	&amp;lt;tbody&amp;gt;&lt;br /&gt;
		&amp;lt;tr class=&amp;quot;array2 answers-list radio-list&amp;quot; id=&amp;quot;javatbdSGQ&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;20%&amp;quot; class=&amp;quot;answertext&amp;quot;&amp;gt;Some example subquestion&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer_cell_001 answer-item radio-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;1&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;1&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td class=&amp;quot;answer-item radio-item noanswer-item&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;label for=&amp;quot;answerSGQA&amp;quot; class=&amp;quot;hide read&amp;quot;&amp;gt;No answer&amp;lt;/label&amp;gt;&lt;br /&gt;
				&amp;lt;input type=&amp;quot;radio&amp;quot; value=&amp;quot;&amp;quot; id=&amp;quot;answerSGQA&amp;quot; name=&amp;quot;SGQA&amp;quot; class=&amp;quot;radio&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/tbody&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The full list of question classes== &amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Question Type&#039;&#039;&#039;||&#039;&#039;&#039;Question Class&#039;&#039;&#039;||&#039;&#039;&#039;Question ID&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|5 point choice||.choice-5-pt-radio||5&lt;br /&gt;
|-&lt;br /&gt;
|Array (10 point choice)||.array-10-pt||B&lt;br /&gt;
|-&lt;br /&gt;
|Array (5 point choice)||.array-5-pt||A&lt;br /&gt;
|-&lt;br /&gt;
|Array (Flexible Labels) dual scale||.array-flexible-duel-scale ||1&lt;br /&gt;
|-&lt;br /&gt;
|Array (Increase, Same, Decrease)||.array-increase-same-decrease||E&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Numbers)||.array-multi-flexi ||:&lt;br /&gt;
|-&lt;br /&gt;
|Array (Multi Flexible) (Text)||.array-multi-flexi-text||;&lt;br /&gt;
|-&lt;br /&gt;
|Array (Yes/No/Uncertain)||.array-yes-uncertain-no||C&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels)||.array-flexible-row ||F&lt;br /&gt;
|-&lt;br /&gt;
|Array (flexible labels) by column||.array-flexible-column||H&lt;br /&gt;
|-&lt;br /&gt;
|Boilerplate question||.boilerplate||X&lt;br /&gt;
|-&lt;br /&gt;
|Date||.date||D&lt;br /&gt;
|-&lt;br /&gt;
|Gender||.gender||G&lt;br /&gt;
|-&lt;br /&gt;
|Huge free text||.text-huge||U&lt;br /&gt;
|-&lt;br /&gt;
|Language switch||.language||I&lt;br /&gt;
|-&lt;br /&gt;
|List (dropdown)||.list-dropdown||!&lt;br /&gt;
|-&lt;br /&gt;
|List (radio)||.list-radio||L&lt;br /&gt;
|-&lt;br /&gt;
|List with comment||.list-with-comment||O&lt;br /&gt;
|-&lt;br /&gt;
|Long free text||.text-long||T&lt;br /&gt;
|-&lt;br /&gt;
|Multiple numerical input||.numeric-multi||K&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options||.multiple-opt||M&lt;br /&gt;
|-&lt;br /&gt;
|Multiple options with comments||.multiple-opt-comments||P&lt;br /&gt;
|-&lt;br /&gt;
|Multiple short text||.multiple-short-txt||Q&lt;br /&gt;
|-&lt;br /&gt;
|Numerical input||.numeric||N&lt;br /&gt;
|-&lt;br /&gt;
|Ranking||.ranking||R&lt;br /&gt;
|-&lt;br /&gt;
|Short free text||.text-short||S&lt;br /&gt;
|-&lt;br /&gt;
|Yes/No||.yes-no||Y&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The full list of validation classes== &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Note:  Prior to 1.92, only .mandatory and .input-error classes were available.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
These apply to the help and/or validation tip messages so that each type can be individually styled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
The .hide-tip option and .input-error options, by default, interact so that you can have validation tips start hidden, but appear when there validation errors, and disappear again when those errors are rectified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
All of these are designed to eliminate the need for pop-up alert messages.  Instead, tips can appear/disappear as needed, and are color-coded to indicate whether the answers pass the validation criteria.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
Furthermore, when you first visit a page that has unmet validation criteria, you can color-code the tips in a pleasing color to show which validation criteria have not been med; then re-display the page using a harsher color if the person submits the page with lingering validation errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|&#039;&#039;&#039;Purpose&#039;&#039;&#039;||&#039;&#039;&#039;CSS Class&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Mandatory||.mandatory||the question is mandatory&lt;br /&gt;
|-&lt;br /&gt;
|User input error||.input-error||the question had at least one validation error&lt;br /&gt;
|-&lt;br /&gt;
|Hide Tip||.hide-tip||added if you use the hide_tip option&lt;br /&gt;
|-&lt;br /&gt;
|Num answers||.em_num_answers||for for min_answers and max_answers&lt;br /&gt;
|-&lt;br /&gt;
|Value range||.em_value_range||for min/max_num_value_n and multiflexible_min/max&lt;br /&gt;
|-&lt;br /&gt;
|Sum range||.em_sum_range||for min/max/equals_num_value&lt;br /&gt;
|-&lt;br /&gt;
|Regex validation||.em_regex_validation||for regular-expression validation of the question&lt;br /&gt;
|-&lt;br /&gt;
|Question-level validation function||.em_q_fn_validation||for the em_validation_q option&lt;br /&gt;
|-&lt;br /&gt;
|Subquestion-level validation function||.em_sq_fn_validation||for the em_validation_sq option&lt;br /&gt;
|-&lt;br /&gt;
|Other comment mandatory||.em_other_comment_mandatory||for other_comment_mandatory option - shows when &amp;quot;other&amp;quot; is selected but associated comment is missing.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Importing styles into your custom template== &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
The custom question styles are near the bottom of each template&#039;s CSS file and start with:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;/* --------------------------- START: Question styles  ------------------------------ */&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
If you&#039;re styling your own custom template, You should be able to copy everything after the above from templates/default/template.css (for tables based layouts) or /templates/limespired/template.css (for CSS based layouts) into your own style sheet without any impact on your other styles.&lt;br /&gt;
&lt;br /&gt;
==Internet Explorer conditional style sheets== &amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
Because of the marked discrepancies in rendering between IE6, IE7 and most other browsers, there are special IE conditional style sheets included for each template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_all-versions.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if lt IE 7]&amp;gt;&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}IE_fix_older-than-7.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8]&amp;gt;&lt;br /&gt;
		&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;{TEMPLATEURL}ie_fix_8.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
You should include the above code within your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; and copies of both the IE style sheets from either /templates/default/ or /templates/limespired for Tables base layout and CSS based layout respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; If you copy the styles into your own style sheet you will almost certainly need to tweak them.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alternative solution for Internet explorer=== &amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
You can put conditional class for body in startpage.pstpl, and use this class in your template.css. This method is used in citronade template. Adding a js / no-js class to to have javascript / no javascript system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;!--[if lt IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie6 ielt7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 7 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie7 ielt8 ielt9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 8 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie8 ielt9  no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if IE 9 ]&amp;gt; &amp;lt;body class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} ie ie9 no-js&amp;quot;&amp;gt; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;!--[if gt IE 9]&amp;gt;&amp;lt;!--&amp;gt;&amp;lt;body id=&amp;quot;body&amp;quot; class=&amp;quot;lang-{SURVEYLANGUAGE} {SURVEYFORMAT} no-js&amp;quot;&amp;gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&lt;br /&gt;
&amp;lt;script type=&#039;text/javascript&#039;&amp;gt;/*&amp;lt;![CDATA[*/(function(H){ H.className=H.className.replace(/\bno-js\b/,&#039;js&#039;) })(document.getElementsByTagName(&#039;body&#039;)[0]);/*]]&amp;gt;*/&amp;lt;/script&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
And in template.css use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;.ie6{/*specific for internet explorer 6*/}&lt;br /&gt;
.ielt8{/*specific for internet explorer 6 and 7*/}&lt;br /&gt;
.ie{/*specific for all internet explorer */}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Right-to-Left (RTL) Languages and justify== &amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
The text editor within LimeSurvey is able to format RTL Text. However, the editor itself shows the RTL language in a left to right format when justified.  This is just an editor display issue. The RTL and justified question or text will display correctly from right to left, even when justified, in your survey or on preview.&lt;br /&gt;
&lt;br /&gt;
==Keywords== &amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
Keywords within a template file get replaced by the current survey information. They are surrounded by curly brackets, for example: {SURVEYNAME}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
The following strings will be replaced by LimeSurvey when parsing the template file and presenting it to survey users. These field strings will work on almost every template except for the &#039;Completed Page&#039;. (Most of these strings can be found in the common.php file. If it&#039;s not there, look in the index.php file.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
{|class=wikitable&lt;br /&gt;
!&#039;&#039;&#039;Keyword&#039;&#039;&#039;!!&#039;&#039;&#039;Template files&#039;&#039;&#039;!!&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||All Files||The survey title&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||All Files||The survey description&lt;br /&gt;
|-&lt;br /&gt;
|{WELCOME}||All files (mainly for welcome.pstpl)||The survey &#039;welcome&#039; text&lt;br /&gt;
|-&lt;br /&gt;
|{PERCENTCOMPLETE}||survey.pstpl||A small graph showing the percentage of the survey completed&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPNAME}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group name&lt;br /&gt;
|-&lt;br /&gt;
|{GROUPDESCRIPTION}||startgroup.pstpl, groupdescription.pstpl, endgroup.pstpl||Displays the current group description&lt;br /&gt;
|-&lt;br /&gt;
|{NUMBEROFQUESTIONS}||welcome.pstpl||Displays the total number of questions in the survey (just the number)&lt;br /&gt;
|-&lt;br /&gt;
|{THEREAREXQUESTIONS}||welcome.pstpl||Displays the sentence &amp;quot;There are X questions in this survey&amp;quot; - from the relevant language file. The X is replaced with the number of questions. Note that this will also work appropriately for singular or plural. If there is only 1 question, it will print &amp;quot;There is 1 question in this survey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|{CHECKJAVASCRIPT}||All files (mainly for welcome.pstpl)||Warning message when end-user browser have javascript disabled&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION}||Question.pstpl||(&#039;&#039;&#039;Has been superseeded but the {QUESTION_...} keywords as of LS1.87&#039;&#039;&#039;) Displays the current question text (The format of {QUESTION} can customised by editing &#039;question_start.pstpl&#039;) Use the following: {QUESTION_TEXT}, {QUESTION_MANDATORY}, {QUESTION_HELP}, {QUESTION_MAN_MESSAGE}, {QUESTION_VALID_MESSAGE} and {QUESTION_INPUT_ERROR_CLASS} and appropriate wrapping HTML instead of {QUESTION}&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWER}||question.pstpl, print_question.pstpl||presents the answer form for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{SGQ}||question.pstpl, question text||Can be used in the question text itself, to reference the input field of the question dynamically by displaying the Survey-Group-Question id for the current question. (as of svn build 9755)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTIONHELP}||question.pstpl, print_question.pstpl||Displays help text (predefined tip for question type) for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CLASS}||question.pstpl, print_question.pstpl||unique class for each question type. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_CODE}||question.pstpl, print_question.pstpl||Displays the current question code&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ESSENTIALS}||question.pstpl||the question ID and (if a question is conditional), &#039;style=&amp;quot;display:none;&amp;quot;&#039;. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_HELP}||question.pstp, question_start.pstpl||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TYPE_HELP}||print_question.pstp||Displays the user defined help text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_INPUT_ERROR_CLASS}||question.pstp, question_start.pstpl||Provides a class if there was user input error&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_ID}||print_question.pstp||Provides a unique ID for each question to allow styling for specific questions&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_TEXT}||question.pstp, print_question.pstp, question_start.pstpl||Displays the text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MANDATORY}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_CLASS}||question.pstpl, print_question.pstpl||class if a question is mandatory. (To be included in the question&#039;s wrapping tag.)&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_MAN_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated &#039;Mandatory&#039; help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_NUMBER}||print_question.pstpl||Incremental count of questions.&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_VALID_MESSAGE}||question.pstp, print_question.pstp, question_start.pstpl||Displays the translated valid help message text for the current question&lt;br /&gt;
|-&lt;br /&gt;
|{QUESTION_SCENARIO}||print_question.pstp||Prints out the &#039;scenario&#039; text for conditional questions.&lt;br /&gt;
|-&lt;br /&gt;
|{NAVIGATOR}||navigator.pstpl||Displays navigation buttons (next, prev, last)&lt;br /&gt;
|-&lt;br /&gt;
|{CLEARALL}||All files (but intended for navigator.pstpl)||Displays the &amp;quot;Exit and Clear Results&amp;quot; link&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITBUTTON}||submit.pstpl||Displays the final submit button&lt;br /&gt;
|-&lt;br /&gt;
|{COMPLETED}||completed.pstpl||Displays the &#039;completed&#039; message for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{URL}||completed.pstpl||Displays the survey &#039;url&#039; and &#039;url text&#039;&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACY}||submit.pstpl||Displays privacy information when survey is anonymous&lt;br /&gt;
|-&lt;br /&gt;
|{PRIVACYMESSAGE}||privacy.pstpl||The privacy message is shown if you set your survey to be anonymous. [[Translating LimeSurvey|The text can be edited/translated]] in the language files. This can also be changed manually by editing the privacy.pstpl template you wish to use.&lt;br /&gt;
|-&lt;br /&gt;
|{TEMPLATEURL}||All Files||The URL to the current template location (useful for referencing image files in your template)&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITCOMPLETE}||endpage.pstpl||The statement (from the language files) that tells the user they have completed the survey, and to press the &amp;quot;Submit&amp;quot; button&lt;br /&gt;
|-&lt;br /&gt;
|{SUBMITREVIEW}||survey.pstpl||The statement (from the language files) that tells the user they can review/change the answers they have made by clicking &amp;quot;&amp;lt;&amp;lt; prev&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users first name from the tokens table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users last name from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:EMAIL}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users email from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_1 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||All Files||***If survey answers are NOT ANONYMOUS - gets replaced with the users attribute_2 from the tokens table***&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERSCLEARED}||Preferably in navigator.pstpl||The &amp;quot;Answers Cleared&amp;quot; statement from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{RESTART}||clearall.pstpl||URL to restart the survey&lt;br /&gt;
|-&lt;br /&gt;
|{CLOSEWINDOW}||All Files (Preferably in navigator.pstpl)||URL to close current window&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERERROR}||register.pstpl||Shows any error messages in the register page (ie: &amp;quot;You must include an email address&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE1}||register.pstpl||The statement &amp;quot;You must be registered to complete this survey&amp;quot; from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERMESSAGE2}||register.pstpl||Details about registering from the language files&lt;br /&gt;
|-&lt;br /&gt;
|{REGISTERFORM}||register.pstpl||The actual form for registering, will change depending on whether the attribute_1 and attribute_2 fields are set.&lt;br /&gt;
|-&lt;br /&gt;
|{SAVE}||Works suitable on navigator.pstpl||Displays the &#039;Save your responses so far&#039; button to offer the user to save and come back later to continue the survey. If the Save option is deactivated in the survey properties the tag will not be shown and ignored.&lt;br /&gt;
|-&lt;br /&gt;
|{LANGUAGECHANGER}||survey.pstpl||Displays a switch in multilingual surveys to change the question.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Input/Buttons== &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
Each &amp;quot;input&amp;quot; type in a survey has been given its own class name, so that you can add CSS to your &amp;quot;startpage.pstpl&amp;quot; file, and have some control over the appearance of form buttons and inputs. These class names are as follows:&lt;br /&gt;
*&#039;&#039;&#039;submit&#039;&#039;&#039; (Submit Buttons)&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; (Text Inputs - for short free text, date and numerical type)&lt;br /&gt;
*&#039;&#039;&#039;answertext&#039;&#039;&#039; (Text of answers)&lt;br /&gt;
*&#039;&#039;&#039;radio&#039;&#039;&#039; (Radio Buttons)&lt;br /&gt;
*&#039;&#039;&#039;checkbox&#039;&#039;&#039; (Check Boxes)&lt;br /&gt;
*&#039;&#039;&#039;select&#039;&#039;&#039; (Select / List Boxes)&lt;br /&gt;
*&#039;&#039;&#039;textarea&#039;&#039;&#039; (Large text inputs - for long free text)&lt;br /&gt;
*&#039;&#039;&#039;clearall&#039;&#039;&#039; (The &amp;quot;Exit and Clear Survey&amp;quot; link)&lt;br /&gt;
*&#039;&#039;&#039;rank&#039;&#039;&#039; (The rank style question. Doesn&#039;t set the colour of the select box or the text boxes (these are set by relevant section above) but does allow changing of background colour, text colour and size etc for the rest of the ranking question)&lt;br /&gt;
*&#039;&#039;&#039;graph&#039;&#039;&#039; (The &amp;quot;percentage completed&amp;quot; graph table)&lt;br /&gt;
*&#039;&#039;&#039;innergraph&#039;&#039;&#039; (The table inside the graph table - this contains the 0% and 100% text. Use this for changing the size of this text)&lt;br /&gt;
*&#039;&#039;&#039;question&#039;&#039;&#039; (General settings for any question that is displayed within a table. Generally you should use this to make sure that their font size and colour is the same as you have used elsewhere as a default)&lt;br /&gt;
*&#039;&#039;&#039;mandatory&#039;&#039;&#039;  (Mandatory questions)&lt;br /&gt;
*&#039;&#039;&#039;input-error&#039;&#039;&#039; (User input error - for if a user has made a mistake with a mandatory question or question with validation)&lt;br /&gt;
*&#039;&#039;&#039;array1&#039;&#039;&#039; and &#039;&#039;&#039;array2&#039;&#039;&#039; (These two styles are cycled when presenting the range of answers for an array type question. This allows you to set an alternating background colour for these question types. &#039;&#039;&#039;Array1&#039;&#039;&#039; is also used for the column headings in these question types)&lt;br /&gt;
*&#039;&#039;&#039;errormandatory&#039;&#039;&#039; (Sets the colour and style of the &amp;quot;This question is mandatory&amp;quot; error message)&lt;br /&gt;
*&#039;&#039;&#039;warningjs&#039;&#039;&#039; (Sets the colour and style of the warning message displayed if the participant&#039;s browser has javascript disabled)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
There are also some elements that can be accessed using the ID of the element (&#039;&#039;&#039;#ID&#039;&#039;&#039; in CSS):&lt;br /&gt;
*&#039;&#039;&#039;surveycontact&#039;&#039;&#039; (The contact message shown on the start page)&lt;br /&gt;
*&#039;&#039;&#039;tokenmessage&#039;&#039;&#039; (used for messages inside the survey, e.g. the session expired error message)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
An example of using these classes with style sheets can be found in the &amp;quot;bubblegum&amp;quot; template that comes with the LimeSurvey application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
Because you can edit all the HTML aspects, there&#039;s no reason to surround your templates with a &amp;lt;div class=&#039;new_name&#039;&amp;gt; and then define a css for that new_name class.&lt;br /&gt;
&lt;br /&gt;
==Styling the progress bar== &amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Before version 1.87:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
The chart.jpg file is a simple one pixel image file which is used to create the progress bar image in the &#039;PERCENTCOMPLETE&#039; table. If the file does not exist, LimeSurvey will use the default &#039;maroon&#039; coloured image in the public directory. If you want to create a bar to match your own colour scheme, then you should save the color in this file. Remember it should be a &#039;&#039;&#039;JPEG&#039;&#039;&#039; file, 1 pixel x 1 pixel, in the colour desired.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
The progress bar appearance can be modified with CSS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
To change the background colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-header {&lt;br /&gt;
 background-color: #3300FF;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
To change the border colour of the bar, add something like the following to the end of your template.css file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#progress-wrapper .ui-widget-content,&lt;br /&gt;
#progress-wrapper .ui-widget-header {&lt;br /&gt;
 border: 1px solid #FF0000;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Advanced Features Available to Developers== &amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
Starting with version 0.99, LimeSurvey has integrated some user-made patches that allow for some special changes.  These very advanced features generally require changes to the underlying code base of LimeSurvey and should be done carefully so as not to introduce security holes.&lt;br /&gt;
&lt;br /&gt;
===Basic CMS Integration support=== &amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Deprecated: This function is not available anymore in version 2.0 or later&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
To be able to integrate LimeSurvey into another CMS, use the following options in &#039;&#039;&#039;config.php&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
// Set $embedded to true and specify the header and footer functions if the survey is to be displayed embedded in a CMS&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$embedded = false;&lt;br /&gt;
$embedded_inc = &amp;quot;&amp;quot;;               // path to the header to include if any&lt;br /&gt;
$embedded_headerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteHeader for geeklog&lt;br /&gt;
$embedded_footerfunc = &amp;quot;&amp;quot;;        // e.g. COM_siteFooter for geeklog&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:133--&amp;gt;&lt;br /&gt;
Set &#039;&#039;&#039;$embedded = true;&#039;&#039;&#039; to enable CMS-embedding. By using the &#039;&#039;&#039;$embedded_inc&#039;&#039;&#039; variable one can include their own &#039;&#039;&#039;.php&#039;&#039;&#039; files.  By setting &#039;&#039;&#039;$embedded_headerfunc&#039;&#039;&#039; or &#039;&#039;&#039;$embedded_footerfunc&#039;&#039;&#039;, one can call functions from within included files that output the relevant headers or footers instead of LimeSurveys default ones.&lt;br /&gt;
&lt;br /&gt;
===Support for your own Javascript functions=== &amp;lt;!--T:134--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:135--&amp;gt;&lt;br /&gt;
Some users may need to run Javascript on the survey pages, but calling &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; in the BODY element made it impossible to do so.  This call has been replaced with a small JavaScript function in the HEAD that sniffs for the existence of &#039;&#039;&#039;checkconditions()&#039;&#039;&#039; and &#039;&#039;&#039;template_onload()&#039;&#039;&#039; before calling each.  This way a template author can create their own &#039;&#039;&#039;template_onload()&#039;&#039;&#039; function in the HEAD that replaces the default one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:136--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Version 1.87 and newer:&#039;&#039;&#039;&lt;br /&gt;
*Disable XSS filter - in Global settings -&amp;gt; Security, set &amp;quot;Filter HTML for XSS&amp;quot; to No.&lt;br /&gt;
*Enter your script in the source of a question or group description.&lt;br /&gt;
*There are more details in the [[Workarounds: Manipulating a survey at runtime using Javascript#How to use Script (eg. JavaScript etc.) in LimeSurvey?|workaround section]].&lt;br /&gt;
&lt;br /&gt;
=Videos on Templates= &amp;lt;!--T:137--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
This video will demonstrate the basic and advanced template functions that are available to all LimeSurvey users. This includes changing the appearance of certain forms and inserting custom graphics. Additionally, it will thoroughly walk you through on how to edit and preview specific page templates, importing/exporting templates, modify appearance of questions in the CSS, customizing survey description page, and completed page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
[http://youtu.be/Uk3FQyDTIY0 LimeSurvey training video - template customization]&lt;br /&gt;
&lt;br /&gt;
=Tips &amp;amp; Tricks= &amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Some language specific element== &amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
If you want to have some langage specific sentence in a survey, for example an help at end of each page, you can add in a .pstl file a sentence and hidding it for other langage. And hidding it in the template.css, we can use psuedo selector :lang, but for best compatibility, we use some class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
Example for a help sentence at bottom of the page, in french an english, put this on endpage.pstpl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;fr&amp;quot; lang=&amp;quot;fr&amp;quot;&amp;gt;Pour de l&#039;aide en direct appelez le 000000&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;en&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;For some help, please call 000000&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
and in template.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;.lang-fr .en{display:none}&lt;br /&gt;
.lang-en .fr{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
You can use it to for other sentence in your question before 1.92 ( in 1.92, there are better solutions).&lt;br /&gt;
&lt;br /&gt;
==Change the layout of the survey page== &amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
When editing a template this template can be assigned to a single survey while the survey list page, which is shown at www.yourdomain.org/limesurveyinstallfolder, lists all your surveys.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
To use your current template for this page you have change the according setting at the Global Settings screen; at older versions this change can be done by editing the $defaulttemplate setting at the config file: Copy this setting from config-defaults.php to config.php which overrides config-defaults.php and edit this setting to $defaulttemplate = &#039;yourtemplatename&#039;;&lt;br /&gt;
&lt;br /&gt;
==Import/Export of templates: Mac users== &amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
Mac users, please note: Mac OSX default archive utility may have problems with zip folders &amp;quot;generated on the fly&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
a work around is to unix&#039;es unzip from the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
$ unzip template.zip -d template&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
Archive: template.zip&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
 inflating: template/startpage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
 inflating: ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
or scripts in their mac-compiled counterparts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
http://homepage.mac.com/roger_jolly/software/&lt;br /&gt;
&lt;br /&gt;
==Changing your templates traffic light from red to green== &amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
If you haven&#039;t already, set the admin directory to read/write/execute (777). The files within it, however, may be set to read/execute only (chmod 755).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
GO to file directory ie file manager, find templates directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
1 change permission on eg&amp;quot;vallendar&amp;quot; (or any template of your choice) directory to read 777&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
2 voila! the red traffic light on &amp;quot;vallendar&amp;quot; is now green.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:172--&amp;gt;&lt;br /&gt;
3 NOTE: to restrict access for safety, when finished editing template files, change all templates files back to what they were eg 644&lt;br /&gt;
&lt;br /&gt;
==Replacing the help icon== &amp;lt;!--T:173--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:174--&amp;gt;&lt;br /&gt;
When a question help text is shown then an help.gif image is used from the default template folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:175--&amp;gt;&lt;br /&gt;
You can replace this image by uploading a new help.gif, help.png or help.jpg in your custom template folder. It then will be automatically used instead of the default help icon.&lt;br /&gt;
&lt;br /&gt;
==Replacing an existing logo== &amp;lt;!--T:176--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:177--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Before uploading a new logo always delete the old, existing one!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
1. To edit the logo go to the &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; file which you can find it here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
[[File:t1.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:180--&amp;gt;&lt;br /&gt;
2. Click the search button to find occurrences of logo related styles.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
[[File:2.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:182--&amp;gt;&lt;br /&gt;
3. Search for &amp;lt;u&amp;gt;#logo&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:183--&amp;gt;&lt;br /&gt;
[[File:3.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
4. Edit the main style file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:185--&amp;gt;&lt;br /&gt;
You will see something similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:186--&amp;gt;&lt;br /&gt;
[[File:t4.PNG|500px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:187--&amp;gt;&lt;br /&gt;
If you want to change the image just replace logo.gif with another image link. Example: (&amp;lt;u&amp;gt;logo.png&amp;lt;/u&amp;gt; or &amp;lt;u&amp;gt;logo.jpg&amp;lt;/u&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
If you want change the image size adjust width and height (in pixels) like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:189--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;width:100px; height:100px;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding your own logo== &amp;lt;!--T:190--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:191--&amp;gt;&lt;br /&gt;
1. Find and open the &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo; template file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
[[File:5.PNG|200px]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:194--&amp;gt;&lt;br /&gt;
2. After the &amp;lt;source lang=&amp;quot;html4strict&amp;quot; &amp;gt;&amp;lt;body ... &amp;gt;&amp;lt;/source&amp;gt; tag add this line to &amp;amp;bdquo;&amp;lt;u&amp;gt;startpage.pstpl&amp;lt;/u&amp;gt;&amp;amp;rdquo;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;img id=&amp;quot;page_logo&amp;quot; src=&amp;quot;{TEMPLATEURL}logo.png&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:196--&amp;gt;&lt;br /&gt;
3. To add logo go to &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo;, you can find it here (see in screen):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:197--&amp;gt;&lt;br /&gt;
[[File:6.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:198--&amp;gt;&lt;br /&gt;
3.1 Then go to the end of the main &amp;amp;bdquo;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&amp;amp;rdquo; style file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:199--&amp;gt;&lt;br /&gt;
3.2 To align the logo add...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:200--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at left side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:201--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:left;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want the logo to be placed at right side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   float:right;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:208--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;If you want to center the logo&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:209--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;#page_logo{&lt;br /&gt;
   display: block;&lt;br /&gt;
   margin-left: auto;&lt;br /&gt;
   margin-right: auto;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use the same template with different logos== &amp;lt;!--T:214--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:215--&amp;gt;&lt;br /&gt;
If you want to use the same template for all surveys and just want to change the logo for each survey, you can use the {SID} placeholder in the template .pstpl file and thereby refer to different images:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:216--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;{TEMPLATEURL}logoImage-{SID}.png&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the default help to all question (hide_tip)== &amp;lt;!--T:217--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:218--&amp;gt;&lt;br /&gt;
There are 3 solutions to remove the default help:&lt;br /&gt;
# like a [[Advanced question settings#hide_tip|hide_tip attribute]] but for all question and survey.&lt;br /&gt;
# you can remove the {QUESTIONHELP} and is container from the file question.pstl, but it can be a bad idea for screenreader.&lt;br /&gt;
# for the default template and some other, add this at the end of tempate.css&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:219--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;span.questionhelp{display:none;}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Display custom favicon== &amp;lt;!--T:220--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:221--&amp;gt;&lt;br /&gt;
A favicon is the little icon you see in the browser&#039;s address bar, list of bookmarks or tab. You can display your own icon as follows:&lt;br /&gt;
#Create a favicon - google will find you lots of free favicon generators&lt;br /&gt;
#Name your new favicon &amp;quot;favicon.ico&amp;quot; and place it in your template directory&lt;br /&gt;
#Add the following code to your &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; before the &amp;lt;/head&amp;gt; tag&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:222--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;link rel=&amp;quot;icon&amp;quot; href=&amp;quot;{TEMPLATEURL}favicon.ico&amp;quot; type=&amp;quot;image/x-icon&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Different appearance for survey-/question-pages== &amp;lt;!--T:224--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:225--&amp;gt;&lt;br /&gt;
(&#039;&#039;Version 1.91 and newer&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:226--&amp;gt;&lt;br /&gt;
If you want LimeSurvey to change the appearance of every second page (i.e. of even and odd survey pages) you can use &#039;&#039;&#039;.page-odd&#039;&#039;&#039; class in your css file to change the appearance of odd pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:227--&amp;gt;&lt;br /&gt;
example from default template of LimeSurvey 1.91+&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:228--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
.page-odd table.question-group {&lt;br /&gt;
 background-color: #D2F2D3;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:232--&amp;gt;&lt;br /&gt;
To &#039;&#039;&#039;not&#039;&#039;&#039; differentiate even and odd pages at the (default) template find all instances of &#039;&#039;.page-odd&#039;&#039; in template.css and remove those styles.&lt;br /&gt;
&lt;br /&gt;
==Create a vertical separator  border for dual scale array== &amp;lt;!--T:233--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:234--&amp;gt;&lt;br /&gt;
To create a vertical separator border for a dual scale array you can add the following lines to your &#039;&#039;&#039;template.css&#039;&#039;&#039;-file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:235--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
table.question thead td.header_separator,&lt;br /&gt;
table.question tbody td.dual_scale_separator&lt;br /&gt;
{&lt;br /&gt;
   border-right:solid 1px #00A8E1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:242--&amp;gt;&lt;br /&gt;
header_separator is used to adress the separator for the header &amp;quot;td&amp;quot; and &amp;quot;dual_scale_separator&amp;quot; is used to adress the separator column in the dual scale array.&lt;br /&gt;
&lt;br /&gt;
==Hide the survey contact message shown on the start page/survey list== &amp;lt;!--T:243--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:244--&amp;gt;&lt;br /&gt;
To hide the &amp;quot;Please contact ...&amp;quot; message on the start page (with the survey list) you can add the following to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.js&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:245--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:246--&amp;gt;&lt;br /&gt;
$(&#039;#surveycontact&#039;).hide(); //Hides the survey contact message&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:247--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remove the survey contact message shown on error messages== &amp;lt;!--T:248--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:249--&amp;gt;&lt;br /&gt;
If you want to remove the survey contact message from error messages it&#039;ll be trickier. You can add the following function call to the &#039;&#039;&#039;$(document).ready&#039;&#039;&#039; function in the &#039;&#039;&#039;template.css&#039;&#039;&#039; of your used design template:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:250--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
removeContactAdressFromMessage(); //Removes the survey contact message from error messages&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:253--&amp;gt;&lt;br /&gt;
and add the following function to your *template.js* file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:254--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
function removeContactAdressFromMessage()&lt;br /&gt;
{&lt;br /&gt;
if ($(&#039;#tokenmessage&#039;).length &amp;gt; 0)&lt;br /&gt;
   {&lt;br /&gt;
   var oldMessage = $(&#039;#tokenmessage&#039;).html();&lt;br /&gt;
   var indexContact = oldMessage.indexOf(&#039;Bitte kontaktieren&#039;);&lt;br /&gt;
   var newMessage = oldMessage.substr(0, indexContact);&lt;br /&gt;
   $(&#039;#tokenmessage&#039;).html(newMessage);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:266--&amp;gt;&lt;br /&gt;
It will probably not work for an englisch survey and have to be extended when using for multilingual surveys. But it&#039;s an idea/tip how to solve this.&lt;br /&gt;
&lt;br /&gt;
==How to deal with multilingual question attributes (before version 2.0 at which those were added)== &amp;lt;!--T:267--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:268--&amp;gt;&lt;br /&gt;
If you have a multilingual survey and e. g. want to use a different string for the &amp;quot;other&amp;quot; field, this could only be done for the base language (until this feature was added at LimeSurvey 2.0). To work around this, paste in the field to change the label for &amp;quot;other&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:269--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;en&amp;quot;&amp;gt;New label&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;fr&amp;quot;&amp;gt;Nouveau label&amp;lt;/span&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:270--&amp;gt;&lt;br /&gt;
At the template.css of your template (at /limesurvey/upload/templates/&amp;lt;yourtemplatename&amp;gt;/template.css) add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:271--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;html:lang(en) .fr{display:none}&lt;br /&gt;
html:lang(fr) .en{display:none}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Alternatives_to_the_LimeSurvey_import_function&amp;diff=57540</id>
		<title>Alternatives to the LimeSurvey import function</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Alternatives_to_the_LimeSurvey_import_function&amp;diff=57540"/>
		<updated>2013-10-10T21:59:21Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Import using the administration interface= &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
If you have previously exported a survey structure, you can import it from the &amp;quot;Create, import, or copy survey&amp;quot; screen. Click on the import button. Click on the browse button to choose the file, and then click on the button. The import process reads the following formats:&lt;br /&gt;
*.LSA files, .TXT files&lt;br /&gt;
*v1.50 or later .CSV files created by LimeSurvey&lt;br /&gt;
*v1.90 or later .LSS files created by LimeSurvey&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
That way you can import old surveys from previous version. The import &#039;intelligently&#039; re-numbers the survey, group, question, answer and condition IDs so that they all match each other - &#039;&#039;&#039;no existing surveys will be overwritten&#039;&#039;&#039;. See section on [[Exporting a survey structure]] for more information.&lt;br /&gt;
&lt;br /&gt;
=Import using the commandline utility= &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Since version 1.50 it is possible to import surveys from the command line (or shell). To use this functionality you have to have access to the shell and the PHP interpreter has to be configured to allow shell execution of scripts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
This functionality is useful when you have timeout problems with the web version that could happen when you have very long surveys to import.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
To use it, in the shell go to the limesurvey/admin folder and execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
 php cmdline_importsurvey &amp;lt;File to import&amp;gt; &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&amp;lt;user&amp;gt; &amp;lt;password&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
*&amp;lt;File to import&amp;gt; has to be one of the described above&lt;br /&gt;
*&amp;lt;user&amp;gt; has to be a user with the right to create surveys&lt;br /&gt;
*&amp;lt;password&amp;gt; the password for the user &amp;lt;br /&amp;gt;*&amp;lt;user&amp;gt; and &amp;lt;password&amp;gt; are only required if the control access is active&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
If you need to see the parameters you can execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
 php cmdline_importsurvey -h&lt;br /&gt;
&lt;br /&gt;
=Importing surveys from other applications= &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
We are often getting requests to import a survey from other applications or survey providers. The problem is that providers like SurveyMonkey lock you in - it is not possible to export the survey structure from SurveyMonkey, only the response data. So you can see that using non-open proprietary software or providers can be a bad idea in the first place.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=57539</id>
		<title>Expression Manager</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=57539"/>
		<updated>2013-10-10T14:46:46Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt; Note: This feature is only available in LimeSurvey 1.92 or later. &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick Start Tutorial= &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Overview== &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
When customizing your surveys, you typically need a way to specify the following:&lt;br /&gt;
#&#039;&#039;&#039;Navigation/Branching&#039;&#039;&#039; - letting a subject&#039;s answers change the order in which questions are asked&lt;br /&gt;
#&#039;&#039;&#039;Tailoring/Piping&#039;&#039;&#039; - how to phrase the question (such as referring to prior answers, or conjugating sentences based upon the number or gender of your subjects), or how to generate custom reports (like assessment scores or tailored advice).&lt;br /&gt;
#&#039;&#039;&#039;Validation&#039;&#039;&#039; - ensuring that answers pass certain criteria, like min and max values, or matching an input pattern&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Expression Manager (EM) provides an intuitive way to specifying the logic for each of those features.  Nearly anything that you can write as a standard mathematical equation is a valid expression, even if you are calling functions.  EM currently provides access to 70 functions, and can be easily extended to support more.  It also lets you access your variables using human-readable variable names (rather than SGQA names).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
The following sections show the main places where Expression Manager is used&lt;br /&gt;
&lt;br /&gt;
==Relevance (Controlling Navigation/Branching)== &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
Some surveys use &amp;quot;Goto Logic&amp;quot;, such that if you answer Question 1 with option C, then jump to Question 5. This approach is very limiting, since is hard to validate, and easily breaks if you have to re-order questions.  EM uses an Boolean relevance equation to specify all of the conditions under which a question might be valid.  If the question is relevant, then the question is asked, otherwise it is Not Applicable, and the value NULL is stored in the database.  This is similar to what can be done via the Conditions editor, but EM lets you easily specify much more complex and powerful criteria (and lets you use the variable name rather than SGQA naming).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This image shows one way to review the relevance logic for a survey.  It computes Body Mass Index.  The relevance equation is shown in square bracket right after the variable name (which is in green).  So, the relevance of weight, weight_units, height and height_units are all 1, meaning that those questions are always asked.  However, the relevance for BMI is {!is_empty(height) and !is_empty(weight)}, which means that BMI will only be computed if the subject enters a value for both height and weight (thereby avoiding the risk of a divide by zero error).  Also, the Report question is only shown if the subject answers all four main questions (height, height_units, weight, weight_units).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
[[File:tutorial1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
Relevance is shown and editable in the following places:&lt;br /&gt;
&lt;br /&gt;
===Viewing / Editing Question-Level Relevance=== &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
This equation computes the Body Mass Index (BMI).  It is only asked if the person first enters their height and weight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
[[File:tutorial2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
This is the edit screen for the BMI question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
[[File:tutorial3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Note that you do not use the curly braces when you enter a Relevance Equation.&lt;br /&gt;
&lt;br /&gt;
===Viewing / Editing Group-Level Relevance=== &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
This is a sample census survey.  The first page asks how many people live with you and stores that in the &amp;quot;cohabs&amp;quot; variable.  This page is only shown if you have more than one cohabitant (so it is shown for the second person cohabitating with you), and also only shows if you specified how Person One is related to you (p1_rel).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
[[File:tutorial4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
As you can see, the group also has question-level relevance criteria, such that each question only appears once you have answered the question before it (e.g. {!is_empty(p1_sex)}).  EM combines the Group and Question-level relevance for you.  Questions in a group are only asked  if the group as a whole is relevant.  Then, only the subset of questions within the group that are relevant are asked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
Here is the screen for editing the group-level relevance for that question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
[[File:tutorial5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
Note that you do not use the curly braces when you enter a Relevance Equation.&lt;br /&gt;
&lt;br /&gt;
==Tailoring/Piping== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
EM lets you easily do simple and complex conditional tailoring of your questions.  Sometimes you just need simple substitution, like saying, &amp;quot;You said you purchased &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Product].  What did you like best about it?&amp;quot;.  Sometimes you need conditional substitution like &amp;quot;&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Mr./Mrs.] &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;LastName], would you be willing to complete our survey?&amp;quot;.  In this case,  you want to use Mr. or Mrs. based upon the person&#039;s gender.  Other times you need even more complex substitution (such as based upon a mathematical computation).  EM supports each of these types of tailoring/piping.&lt;br /&gt;
&lt;br /&gt;
===Conditional Equations=== &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
The Body Mass Index example shows the ability to compute a person&#039;s BMI, even while letting them enter their height in weight in metric or non-metric units.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
[[File:tailoring7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Here weight_kg is {if(weight_units == &#039;kg&#039;, weight, weight * .453592)}.  This if() function means that if the subject entered the weight using kilograms, use that value, otherwise multiple the entered value (which was in pounds) by .453592 to convert it to kilograms.  The height_m variable uses a similar approach to compute the person&#039;s height in meters, even if he entered his height in inches.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
BMI computes the weight formula as {weight_kg / (height_m * height_m)}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Lastly, the report conditionally tailors the message for the subject, telling him what he entered. (&amp;quot;You said you are 2 meters tall and weight 70 kg.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
Although not well shown in the above image, weight_status uses nested if() statements to categorize the person as underweight to severely obese.  You can see its equation in the Show Logic View&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
[[File:tailoring8.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
From the edit window for this question, you can see two things:&lt;br /&gt;
#Tailoring must surround expressions with Curly Braces&lt;br /&gt;
#Expressions can span multiple lines if, as in this case, you want to make it easier to read the nested conditional logic.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
[[File:tailoring9.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Tailored Questions, Answers, and Reports=== &amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Note: Dynamic tailoring may not work if answer options are made available in select boxes on the same question page. This results from the fact that tailoring inserts a &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt; tag which is not valid inside select options.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
This example shows the BMI report.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
[[File:tailoring10.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
Here is the edit window for the same question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
[[File:tailoring11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
As you can see, anything in curly braces is treated as an expression, so is syntax-highlighted (color coded) in the prior image.  If you had any typos (such as misspelled or undefined variable names or functions), EM would show an error, such as this, showing that height_unit is an undefined variable name (it is actually height_units), and rnd() is an undefined function (the proper function name is round()).  In both cases, the errors are surrounded by a red box to make it easier to spot and fix them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
[[File:tailoring12.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
You can also see that you can quickly create complex reports, such as a table of entered values or tailored advice.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Please remember that all tailoring must surround expressions with Curly Braces, so that LimeSurvey knows which parts of the question are free text and which should be parsed through Expression Manager.&lt;br /&gt;
&lt;br /&gt;
==Validation== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
EM controls how most of the advanced question options work.  These control aspects like min/max numbers of answers; min/max individual values; min/max sum values; and checking that entered values match specified string patterns.  You continue to enter those advanced question options as usual.  However, now any value in one of those fields is considered an expression, so you can have min/max criteria with complex conditional relationships to other questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
In all of these cases, since the advanced question option is always considered an expression, you do not use curly braces when specifying it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
The [[Expression Manager Sample Surveys|Sample Surveys]] pages shows many working examples of using expressions for validations.&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
LimeSurvey 1.92 and later uses the new Expression Manager (EM) module which will let LimeSurvey support more complex branching, assessments, validation, and tailoring.  It will replace how LimeSurvey manages Replacements, Conditions, and Assessments on the back-end.  It will also speed up processing considerably since it eliminates most run-time database reads.  EM was developed by Dr. Thomas White (TMSWhite).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
This wiki page is the definitive reference for Expression Manager syntax and functionality.&lt;br /&gt;
&lt;br /&gt;
==Key Definitions== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Expression&#039;&#039;&#039;:  Anything surrounded by curly braces&lt;br /&gt;
#*As long as there is no white space immediately after the opening brace or before the closing curly brace&lt;br /&gt;
#*The contents of Expressions are evaluted by EM, so they can contain mathematical formulas, functions, and complex string and date processing.&lt;br /&gt;
#&#039;&#039;&#039;Tailoring&#039;&#039;&#039;: Sometimes called &amp;quot;piping&amp;quot;, this is the process of conditionally modifying text&lt;br /&gt;
#*You have access to all &#039;replacement fields&#039;, TOKENs, and INSERTANS values&lt;br /&gt;
#*You also have easier access to questions, answers, and their properties.&lt;br /&gt;
#&#039;&#039;&#039;Relevance&#039;&#039;&#039; Equation:  A new question attribute controlling question visiblity&lt;br /&gt;
#*If there is a relevance equation, then the question is only shown if the relevance evaluates to true.&lt;br /&gt;
#*Internally, all array_filter and array_filter_exclude commands become sub-question-level relevance&lt;br /&gt;
#&#039;&#039;&#039;Equation&#039;&#039;&#039; Question Type:  A new question type that saves calculations or reports to the database&lt;br /&gt;
#*It is like a Boilerplate question, but its contents are saved to the database even if you set &amp;quot;Always Hide this Question&amp;quot;&lt;br /&gt;
#&#039;&#039;&#039;SGQA&#039;&#039;&#039;:  This is how variables are named in LimeSurvey &amp;lt;= 1.91+&lt;br /&gt;
#*Stands for Survey-Group-Question-Answer&lt;br /&gt;
#*SGQA variable names look like 123X5X382X971, and may have sub-question suffixes.&lt;br /&gt;
#*These variable names are specific to the underlying S/Q/G/A database codes, so often need to be changed&lt;br /&gt;
#&#039;&#039;&#039;Question Code&#039;&#039;&#039;:  This is the preferred variable name for EM&lt;br /&gt;
#*This can be a descriptive name indicating the purpose of the question, making it easier to read complex logic&lt;br /&gt;
#*Although not required to be unique in &amp;lt;= 1.91+, it must be unique if you want to use EM&lt;br /&gt;
#*Valid question codes should NOT start with a number, so when using the question code to number your questions, simply use &amp;quot;q1&amp;quot;, or &amp;quot;q1a&amp;quot; or &amp;quot;g1q2&amp;quot;.&lt;br /&gt;
#*This is what currently becomes the variable name if you export data to SPSS or R, so if you do statistical analysis, you probably already made this unique.&lt;br /&gt;
&lt;br /&gt;
==Do I have to use EM?== &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
The short answer is No (but also yes).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
EM is fully backwards-compatible with existing surveys.  So, if you are happy to use Conditions and Assessments in the style that LimeSurvey used in versions &amp;lt;= 1.91+, you can continue to do so.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
However, EM completely replaces how LimeSurvey internally deals with Conditions.  Although you can still use the Conditions Editor to create and manage conditions, LimeSurvey 1.92 will convert those to the equivalent Relevance Equations.  As part of the upgrade, LimeSurvey 1.92 will auto-convert all existing Conditions to Relevance Equations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
This should give you the best of both worlds - you can continue using LimeSurvey as you are used to, but will see the Relevance Equation equivalent so you can gradually migrate to Relevance Equations directly whenever you see fit.&lt;br /&gt;
&lt;br /&gt;
==Can I mix use of Conditions and Relevance?== &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
Yes. You can use the Conditions editor for some questions and the Relevance editor for others.  Conditions are auto-converted to Relevance when you save the question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
Note, we assume that if you are using the Conditions editor, that you want those Conditions to over-write any manually entered Relevance equation.  So, if you have existing Conditions and want to manually edit the Relevance, please delete the Conditions for that question first.  Specifically, copy the generated relevance equation to a text editor, use the Conditions menu to delete all of the conditions for that question (which will also delete the relevance), then edit the question and paste the generated relevance equation from the text editor back into the relevance field for that question (and save the question).  If there is enough demand for deleting conditions without deleting the generated relevance equation, we could add a bulk conversion process.&lt;br /&gt;
&lt;br /&gt;
==How should I choose between Conditions and Relevance?== &amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
Here is a list of pros and cons of each style:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Style!!Pros!!Cons&lt;br /&gt;
|-&lt;br /&gt;
|Conditions||1. Nice GUI for creating simple conditions &amp;lt;br/&amp;gt;2. GUI well documented and understood by support team||1. Only supports simple comparisons and does not AND/OR conditions well &amp;lt;br/&amp;gt;2. Cascading conditions work erratically &amp;lt;br/&amp;gt;3. Slow - database intensive, so can slow down long surveys &amp;lt;br/&amp;gt;4. Some reported problems with re-loading conditions &amp;lt;br/&amp;gt;5. GUI doesn&#039;t scale well when there are dozens, hundreds, or thousands of questions &amp;lt;br/&amp;gt;6. May be slow to convert paper-based surveys since must use SGQA names &amp;lt;br/&amp;gt;7. Often need a programmer to custom-code logic needed for complex branching&lt;br /&gt;
|-&lt;br /&gt;
|Relevance||1. Supports very complex logic, including 80+ functions and math/string operators &amp;lt;br/&amp;gt;2. Perfect support for cascading logic &amp;lt;br/&amp;gt;3. Fast - no extra database calls, so supports 1000+ question surveys &amp;lt;br/&amp;gt;4. No problems with re-loading logic since does not require SGQA codes &amp;lt;br/&amp;gt;5. Syntax-highlighting scales to 1000+ question surveys &amp;lt;br/&amp;gt;6. Easy and fast to use for groups wanting to computerize existing paper-based suveys.  &amp;lt;br/&amp;gt;7. Easily supports semi-structured interviews and epidemiological surveys without needing a programmers||1. No GUI for simple conditions - use syntax-highlighting instead &amp;lt;br/&amp;gt;2. New, so support teams have not mastered EM yet.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
The bottom is that if you are happy with how LimeSurvey 1.91+ works, there is no reason to change what you do.&lt;br /&gt;
&lt;br /&gt;
==What are some other benefits of using EM?== &amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
Here are some of the other reasons you might want to use EM.&lt;br /&gt;
#Calculations - you can create any calculation you can think of:&lt;br /&gt;
#*You have access to all common mathematical operators and functions&lt;br /&gt;
#*You have access to 70+ mathematical, date, and string processing functions&lt;br /&gt;
#*It is fairly easy for developers to add new functions if users need them&lt;br /&gt;
#Storing Calculations to Database&lt;br /&gt;
#*You can now compute simple and complex calculations and/or scale scores AND have them stored in the database without needing JavaScript.&lt;br /&gt;
#*You use the Equation question type to accomplish this.&lt;br /&gt;
#Assessments&lt;br /&gt;
#*You can now create assessments or scale scores from any question type, not just the subset that used to be supported&lt;br /&gt;
#*You can use Tailoring to show running or total assessment scores anywhere needed - even on the same page&lt;br /&gt;
#*You have more control over the reports generated based upon those assessment scores&lt;br /&gt;
#*You can store assessment scores in the database without needing JavaScript&lt;br /&gt;
#*You can hide assessment scores without needing JavaScript or CSS&lt;br /&gt;
#Replacement Fields&lt;br /&gt;
#*Instead of using {INSERTANS:SGQA}, you can just use the Question Code - this makes it easier to read and validate.&lt;br /&gt;
#*This also avoids the common need to edit questions to change the SGQA code to make everything work.&lt;br /&gt;
#Tailoring - you can conditionally display text based upon other values&lt;br /&gt;
#*Use the appropriate title for a subject, like (e.g. &amp;quot;Hello &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Mr./Mrs.] Smith&amp;quot;)&lt;br /&gt;
#*Output gramatically correct sentences based when singular/plural matter:  (e.g. &amp;quot;You have 1 child&amp;quot; vs. &amp;quot;You have 2 children&amp;quot;)&lt;br /&gt;
#*Appropriately conjugate verbs and decline nouns based upon subject&#039;s gender and plurality.&lt;br /&gt;
#New Variable Attributes - you can access the following to do your tailoring:&lt;br /&gt;
#* (no suffix) -  an alias for qcode.code&lt;br /&gt;
#*.code - the selected response code for the question if it is relevant (otherwise blank), or the text value if it is not a coded question&lt;br /&gt;
#*.NAOK - same as .code, but can be part of calculations or lists even if irrelevant&lt;br /&gt;
#*.value - the assessment value for the question if it is relevant (otherwise blank), or the text value if it is not a coded question&lt;br /&gt;
#*.valueNAOK - same as .value, but can be part of calculations or lists even if irrelevant&lt;br /&gt;
#*.shown - the answer as displayed to the user (this is what {INSERTANS:xxx}  does)&lt;br /&gt;
#*.qid - the question ID&lt;br /&gt;
#*.gid - the group ID&lt;br /&gt;
#*.sgqa - the SGQA value for the question&lt;br /&gt;
#*.jsName - the correct javascript variable name for the question, regardless whether defined on this page or another&lt;br /&gt;
#*.qseq - the question sequence (starting from 0)&lt;br /&gt;
#*.gseq - the group sequence (starting from 0)&lt;br /&gt;
#*.mandatory - whether the question is mandatory (Y/N)&lt;br /&gt;
#*.question - the text of the question&lt;br /&gt;
#*.relevance - the relevance equation for the question&lt;br /&gt;
#*.grelevance - the relevance equation for the group&lt;br /&gt;
#*.relevanceStatus - whether or not the question is currently relevant (1 if true, 0 if false)&lt;br /&gt;
#*.type - the question type (the one character code)&lt;br /&gt;
#Dynamic On-Page Changes&lt;br /&gt;
#*All Relevance, Calculation, and Tailoring works dynamically on a page - so changes in values instantly update the page&lt;br /&gt;
#*So, you have questions dynamically appear/disappear based upon whether they are relevant&lt;br /&gt;
#*Questions are also dynamically tailored based upon responses on the page, so you can see running totals, tailored sentences and customized reports.&lt;br /&gt;
#New Data Entry Screen&lt;br /&gt;
#*In addition to using the current data-entry system, you can just use Survey-All-In-One.&lt;br /&gt;
#*This supports the on-page relevance and tailoring, so data entry clerks can quickly tab through and they will only have to enter the relevant responses&lt;br /&gt;
#*This can be critical if your data entry person needs to see the tailoring, which is also dynamic.&lt;br /&gt;
#Eliminates the need for most custom JavaScript&lt;br /&gt;
#*EM easily supports complicated computations, scoring, tailoring and conditional logic.&lt;br /&gt;
#*Some things will still need JavaScript (like custom layouts and conditionally hiding question sub-elements), but your JavaScript can use the EM functions so that you can access questions by their Qcode instead of SGQA, and access any of the question properties listed above.&lt;br /&gt;
&lt;br /&gt;
==What are some other helpful new features enabled by EM?== &amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
Regardless of whether you continue to use the Conditions Editor or manually compose Relevance Equations, you get these additional benefits:&lt;br /&gt;
#You can create more complex validation criteria&lt;br /&gt;
#*All of the advanced question attribute (like max_answers, min_num_value_n, max_num_value) can use Expressions.  So, you min/max criteria can be easily adjusted based upon prior responses, even if they are on the same page.&lt;br /&gt;
#*EM also handles all regular-expression-based validation, so you can robustly combine preg and equation-based question attributes.&lt;br /&gt;
#Easy Re-ordering (or deleting) of Questions and Groups&lt;br /&gt;
#*Prior to version 1.92, you could not re-order questions or groups if LimeSurvey thought that such-re-ordering could break conditions in which they were used.  Similarly, you could not delete questions if any other questions depended upon them.&lt;br /&gt;
#*With EM&#039;s syntax highlighting, it is easy to see and validate whether you try to use questions before they are declared.  So, we now let you re-order or delete questions and groups whenever you like.  EM will update all of the syntax highlighting to show you potential errors.&lt;br /&gt;
#*The re-order questions view has been enhanced to help with such review.  It now shows the question&#039;s relevance equation and tailoring, so you can immediately see whether any variables become pink (meaning they are used before being declared).&lt;br /&gt;
#The Question/Group Navigation Index is always available and accurate&lt;br /&gt;
#*Prior to version 1.92, these indexes were not available if there were complex conditions&lt;br /&gt;
#*With EM, we can guarantee that they are accurate.&lt;br /&gt;
#*Subjects can even jump back, to a prior question, change the answer, then jump forward (or submit)&lt;br /&gt;
#**When jumping forwards, EM will re-validate all of the intervening questions/groups.&lt;br /&gt;
#**If any questions become irrelevant, they will be NULLed in the database so that your data is internally consistent&lt;br /&gt;
#**If any questions become relevant or newly fail mandatory or validation rules, EM will stop on that page and force the user to answer those questions before jumping to their final destination.&lt;br /&gt;
#Auto-conversion of Conditions to Relevance&lt;br /&gt;
#*When you upgrade your database, all existing surveys that have conditions will have relevance equations generated for them&lt;br /&gt;
#*Whenever you import a survey, relevance equations will be created as needed&lt;br /&gt;
#*Whenever you add, delete, or modify conditions, EM will generate the appropriate relevance equation.&lt;br /&gt;
#Convenient Syntax Highlighting&lt;br /&gt;
#*When EM shows the relevance equation, it will show the Qcode, even if you entered an SGQA code, as we assume this will be easier to read.&lt;br /&gt;
#*All variables are color coded to show whether they were declared before or after the current question (or before or after the current group).  This lets you quickly detect and fix cases where you try to use variables for relevance (including array_filter), tailoring, or validation equations prior to declaring them.&lt;br /&gt;
#*In addition, if you hover your mouse over the color-coded variable, you will see the most important metadata about that question.   This includes the Group Sequence #, Question Sequence #, Qcode, Text of the question, and all available answer choices (if it is a question type with enumerated answer choices).&lt;br /&gt;
#**The list of answer choices uses this syntax:  &#039;answers&#039;:{key:val, ... }.&lt;br /&gt;
#**&#039;&#039;key&#039;&#039; has the syntax &#039;&#039;&#039;&#039;scale~code&#039;&#039;&#039;&#039; where &#039;&#039;scale&#039;&#039; is the answer scale (e.g. for dual scale), and &#039;&#039;code&#039;&#039; is the answer code.&lt;br /&gt;
#**&#039;&#039;val&#039;&#039; has the syntax &#039;&#039;&#039;&#039;value~shown&#039;&#039;&#039;&#039; where &#039;&#039;value&#039;&#039; is the assessment value (if using assessments, otherwise &#039;&#039;code&#039;&#039;)(e.g. Qcode.value), and &#039;&#039;shown&#039;&#039; is the display value as seen by the subject (e.g. Qcode.shown)&lt;br /&gt;
#**This means that many surveys can use calculations without needing assessment mode.  If you have enumerated answer options  that are unique, non-decimal, and non-negative, you can simply do calculations on the Qcode.code values.&lt;br /&gt;
#Easy review of entire survey logic and content&lt;br /&gt;
#*There is a new Show Survey Logic feature that lets you see everything about the survey (or group or question) on a single page.&lt;br /&gt;
#*It shows the Group, Question, Sub-Question, and Answer-level details for the selected scope (survey vs. group vs. question)&lt;br /&gt;
#*It also shows the relevance, sub-question-level relevance (for array_filter and array_filter_exclude), and generated validation equation (for preg and any validation rules like min/max sum/number of values), and all non-blank question attributes.&lt;br /&gt;
#*Everything is syntax-highlighted so that you can see potential syntax errors (like unbalanced parentheses or use of variables before they were declared)&lt;br /&gt;
#*The syntax-highligting supports rapid navigation and editing of the survey.&lt;br /&gt;
#**If you click on a variable name, it opens a browser window (or tab) that shows you that question and lets you edit it.&lt;br /&gt;
#**If you click on a group name, it opens a browser window (or tab) showing the group-reorder view so that you can easily move questions around.&lt;br /&gt;
#**All of the question attributes are also syntax highlighted.  This lets you set and see expressions within advanced question options (like basing the max/min number/sum of values on an expression)&lt;br /&gt;
#*The EM author used similar view (a little cleaner) to let his collaborating Epidemiologists and Institutional Review Board validate and authorize surveys with thousands of questions in highly branched and tailored structured interviews&lt;br /&gt;
&lt;br /&gt;
==How Backwards Compatible is EM with 1.91+?== &amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
LimeSurvey 1.92 is fully backwards-compatible with 1.91+ with one exception/caveat:  1.92 handles less-than / greater-than comparisons against empty values differently than 1.91+.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
One of the LimeSurvey demo surveys uses a set of conditions that translates to this relevance equation:  {(age &amp;lt; 16) or (age == 20) or ... or (age == 80)}. In LimeSurvey 1.91+, (age &amp;lt; 16) is FALSE when there is no answer (the value is blank).  However, in LimeSurey 1.92, (age &amp;lt; 16) is TRUE when there is no answer, since both PHP and JavaScript treat blank as 0 in mathematical comparisons.  Thus, 1.91+ would hide that question when age was unanswered, but 1.92 would show it.  We went to great pains to prevent this, but since we needed to have the Expressions generate identical results in PHP and JavaScript, there was no way to make 1.92 treat &amp;quot;&amp;quot; &amp;lt; 16 as FALSE.  Fortunately, there is an easy work-around for this.  If you want (age &amp;lt; 16) to be FALSE, then use this expression instead: {(!is_empty(age) and age &amp;lt; 16)}.  You can use the new [[Show Logic File|Survey Logic File]] view to quickly identify and fix any such comparisons in your survey.&lt;br /&gt;
&lt;br /&gt;
=Getting Started= &amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
The best way to get started with EM is to:&lt;br /&gt;
*Install the latest stable version from http://www.limesurvey.org/en/download &lt;br /&gt;
*Import and explore the [[Expression Manager Sample Surveys|sample surveys]].&lt;br /&gt;
*Explore the [[Expression Manager HowTos|use cases and HowTos]] and [[Expression Manager Examples|step-by-step examples]].&lt;br /&gt;
*Explore the EM documentation (this page)&lt;br /&gt;
*Examine the built-in EM test suite&lt;br /&gt;
**From any survey, under tools, select the EM option&lt;br /&gt;
**Available Functions lists the 70+ functions and syntax&lt;br /&gt;
**Unit Tests of Isolated Expressions&lt;br /&gt;
***shows examples of using all EM functions and operators, and the PHP and JavaScript results&lt;br /&gt;
***note there are few functions that generate different results in the PHP and JavaScript versions, so this page lets you plan your EM logic accordingly.&lt;br /&gt;
&lt;br /&gt;
=What Functionality does Expression Manager Extend/Replace? (LimeSurvey &amp;lt;= 1.91+)= &amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conditions =&amp;gt; Relevance== &amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
Conditions controlled which  questions are visible.  The general syntax was &#039;&#039;SGQA operator Value&#039;&#039;, like &#039;&#039;111X2X3 == &amp;quot;Y&amp;quot;&#039;&#039;.  Conditions could be ANDed or ORed together, but mixing ANDs and ORs was difficult.  The conditions themselves were stored in a separate table, and large portion of LimeSurvey&#039;s code was devoted to managing Conditions.  Because of extensive database access, processing large numbers of conditions could cause noticable performance problems.  Furthermore, once you had conditions assigned to questions or groups, you were often not allowed to re-order or delete them.&lt;br /&gt;
&lt;br /&gt;
==Assessments =&amp;gt; Equations and  Micro-Tailoring== &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
Assessments let users create scale scores from a collection of questions.  However, they could not dynamically change on the current page, and their values were not stored to the database.&lt;br /&gt;
&lt;br /&gt;
==Replacements =&amp;gt; Micro-Tailoring== &amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
Users could tailor some messages and questions based  upon prior responses.  For example, a question might be, &#039;&#039;{TOKEN:FIRSTNAME}, you said {INSERTANS:111X3X4} was your favorite sport&#039;&#039;.  However, it was not possible to do conditional tailoring (like say &amp;quot;Mr.&amp;quot; or &amp;quot;Mrs.&amp;quot; depending upon the person&#039;s gender), or conjugate verbs or decline nouns without fancy JavaScript.  Authors could implement surveys that seemed to tailor questions, but it required separate questions for each permutation, and complex conditions to decide which questions to display.&lt;br /&gt;
&lt;br /&gt;
==Validation== &amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
Question could be validated with Regular expressions, or minimum/maximum values, or let an SGQA response serve as the minimum or maximum value.  However, validations could not be based upon calculations of other variables without fancy JavaScript.&lt;br /&gt;
&lt;br /&gt;
==Equations== &amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
Equations were not supported without fancy JavaScript.&lt;br /&gt;
&lt;br /&gt;
==Equation Question Type== &amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
Equations could not be saved to the database (e.g. the final score for an assessment) without fancy JavaScript.&lt;br /&gt;
&lt;br /&gt;
=How Will Expression Manager Replace/Extend That Functionality?= &amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
The Expression Manager is a new core module within LimeSurvey that makes it much easier to support the type of complex functionality that used to require custom JavaScript.  It is also replacing the way LimeSurvey currently manages Conditions and Assessments.&lt;br /&gt;
&lt;br /&gt;
==New Terminology When Referring to Expression Manager (EM)== &amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
EM &amp;quot;thinks&amp;quot; of its functionality in the following terms:&lt;br /&gt;
*&#039;&#039;&#039;Relevance-based Branching&#039;&#039;&#039; - if a question is relevant, then ask it, otherwise don&#039;t (e.g. make it invisible, and mark it as NULL in the database).  There is a new Relevance field for all Question types, and also for each Group (so you can apply a set of conditions to an entire group without having to copy the same condition to each question, and/or combine group and question-level conditional logic).&lt;br /&gt;
*&#039;&#039;&#039;Tailoring&#039;&#039;&#039; - Once you know which questions should be asked, tailoring (sometimes called &#039;&#039;piping&#039;&#039;) specifies how the question should be asked. This lets you support not only simple subsitution (like {TOKEN:FIRSTNAME}), but also conjugation of verbs and declination of nouns based upon the gender or number of your subjects.  It also lets you change the message you deliver to a subject based upon whether they answered (or how they answered) other questions.&lt;br /&gt;
*&#039;&#039;&#039;Equations&#039;&#039;&#039; - EM adds a new question type called Equation which stores the result of an Expression.  These equations results are computed and written to the database, even if you hide them on the page.  Thus, they are useful for hidden scoring calculations, navigation based upon complex equations, assessments, and reports that should be generated and easily available within the database.&lt;br /&gt;
&lt;br /&gt;
===Relevance and Cascading Relevance=== &amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
Every question type now has a Relevance option which controls whether the question is displayed.  EM processes each of the Relevance Equations in the order they should appear in the survey.  If the expression is true (or missing - to support legacy surveys), the question will be displayed. If it is not relevant, then the question will be hidden, and the value will be NULLed in the database.  If there are no relevant questions in a group, the entire group will be skipped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
Moreover, if any of the variables within an expression is irrelevant, then the expression always evaluates to false.  This enables Cascading Relevance so that you do not have to write very long Relevance equations for each question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
Say you have 5 questions Q1-Q5, and you only want to show Q2 if Q1 was answered, and Q3 if Q2 was answered, etc.  The relevance equations might be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Question Code!!Relevance!!Question&lt;br /&gt;
|-&lt;br /&gt;
|Q1||1||What is your name?&lt;br /&gt;
|-&lt;br /&gt;
|Q2||Q1||{Q1}, how old are you?&lt;br /&gt;
|-&lt;br /&gt;
|Q3||Q2||So, you are {Q2} years old.  Are you married?&lt;br /&gt;
|-&lt;br /&gt;
|Q4||Q3 == &amp;quot;Y&amp;quot;||{Q1}, how long have you been married?&lt;br /&gt;
|-&lt;br /&gt;
|Q5||Q4||How many children do you have, {Q1}?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
The relevance calculations also work in JavaScript - so you could put all the above questions on one page and it would still work as expected.  In fact, EM totally replaces how EM processes Survey vs. Group vs. Question-at-a-time survey formats.  They now all use the exactly same navigation engine so they work identically regardless of survey style.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
As long as you are on the same page, any data you entered will still be there, just hidden.  So, if you enter some information, then choose an option that makes them irrelevant, then make them relevant again, your answers will still be available.  However, as soon as you move to a different page, all irrelevant responses will be lost to integrity of the dataset.&lt;br /&gt;
&lt;br /&gt;
===Group-Level Relevance=== &amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
Expression Manager also supports group-level relevance.  This makes it easier to implement looping.   Say you want to collect information about up to 10 entities (such a products or people in a household), where you first deterimine how many entities need follow-up (such as by asking how many people live in a household, or having people check which products they like from a long list).  After knowning how many entities need follow-up, you can use Group-level relevance like {count &amp;gt;= 1}, {count &amp;gt;=2}, ... {count &amp;gt;= 10} for each of the 10 groups of follow-up questions.  Within each group, you can have question-level conditional logic (e.g. gender or age-specific follow-up questions for each subject).  The question and group-level relevance equations are ANDed together to determine which should be shown.&lt;br /&gt;
&lt;br /&gt;
===Tailoring / Piping=== &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
Anything within curly braces is now treated as an Expression (with one exception described below).  Expressions have acccess to all of the LimeReplacementFields, all of the variables (via several aliases), all typical equation operators (mathematical, logical, and comparison), and dozens of functions (that even work dynamically on the client-side).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
Using these equations, you can do things such as:&lt;br /&gt;
#Conditionally show tailored messages to the respondants based upon prior responses&lt;br /&gt;
#Create Assessments and show Assessment results (or conditionally branch or show messages) based upon those results, all without using the Assessments module itself&lt;br /&gt;
#Conjugate verbs and decline nouns within questions, answers, and reports.&lt;br /&gt;
#Show summaries of responses before the &amp;quot;Show your answers&amp;quot; page at the end of the survey&lt;br /&gt;
&lt;br /&gt;
===Equations=== &amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
There is a new question type called  Equation.  It is like a Boilerplate questions, except that it stores the value of what is displayed in the database.  So, if the Equation Question text contains an Assessment computation, that value would be stored in the database in a variable that can be displayed within public or private statistics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
This solves a common request for storing Assessment scores within the database&lt;br /&gt;
&lt;br /&gt;
==Syntax== &amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
Anything contained within curly braces is now considered an Expression (with one exception:  there must be no leading or trailing whitespace - this is needed to ensure the Expression Manager does not try to process embedded JavaScript).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
Note, it is OK for expressions to span multiple lines, as long as there is no whitespace after the opening  curly brace or before the closing curly brace.  This is especially helpful for nested if() statements like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;{if(is_empty(PFTotals),&lt;br /&gt;
 &#039;&#039;,&lt;br /&gt;
 if(PFTotals &amp;gt;= -5 &amp;amp;&amp;amp; PFTotals &amp;lt;= -4,&lt;br /&gt;
   &#039;Very Soft&#039;,&lt;br /&gt;
   if(PFTotals &amp;gt;= -3 &amp;amp;&amp;amp; PFTotals &amp;lt;= -2,&lt;br /&gt;
     &#039;Soft&#039;,&lt;br /&gt;
     if(PFTotals == -1,&lt;br /&gt;
       &#039;Somewhat Soft&#039;,&lt;br /&gt;
       if(PFTotals == 0,&lt;br /&gt;
         &#039;Moderate&#039;,&lt;br /&gt;
         if(PFTotals == 1,&lt;br /&gt;
           &#039;Somewhat Hard&#039;,&lt;br /&gt;
           if(PFTotals &amp;gt;= 2 &amp;amp;&amp;amp; PFTotals &amp;lt;= 3,&lt;br /&gt;
             &#039;Hard&#039;,&lt;br /&gt;
             if(PFTotals &amp;gt;= 4 &amp;amp;&amp;amp; PFTotals &amp;lt;= 5,&lt;br /&gt;
               &#039;Very Hard&#039;,&lt;br /&gt;
               &#039;&#039;&lt;br /&gt;
             )&lt;br /&gt;
           )&lt;br /&gt;
         )&lt;br /&gt;
       )&lt;br /&gt;
     )&lt;br /&gt;
   )&lt;br /&gt;
 )&lt;br /&gt;
)}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
Expression Manager supports the following syntax:&lt;br /&gt;
*All standard mathematical operators (e.g. +,-,*,/,!)&lt;br /&gt;
*All standard comparison operators (e.g. &amp;lt;,&amp;lt;=,==,!=,&amp;gt;,&amp;gt;=, plus these equivalents:  lt,le,eq,ne,gt,ge)&lt;br /&gt;
*Parentheses (so you can group sub-expressions)&lt;br /&gt;
*Conditional operators (e.g. &amp;amp;&amp;amp;,| | and these equivalents: and,or)&lt;br /&gt;
*Single and double-quoted strings (which can each embed strings with the other quote type)&lt;br /&gt;
*Comma operator (so can have a list of expressions and just return the final result)&lt;br /&gt;
*Assignment operator (=)&lt;br /&gt;
*Pre-defined variables (to refer to questions, question attributes, and responses) - e.g. all of the SGQA codes&lt;br /&gt;
*Pre-defined functions (there are already 70+, and it is easy to add more)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
EM syntax follows normal operator precedence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:140--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Level!!Operator(s)!!Description&lt;br /&gt;
|-&lt;br /&gt;
|1||()||parentheses for grouping or calling functions&lt;br /&gt;
|-&lt;br /&gt;
|2||! - +||unary operators: not, negation, unary-plus&lt;br /&gt;
|-&lt;br /&gt;
|3||* /||times, divide&lt;br /&gt;
|-&lt;br /&gt;
|4||+ -||plus, minus&lt;br /&gt;
|-&lt;br /&gt;
|5||&amp;lt; &amp;lt;= &amp;gt; &amp;gt;= lt le gt ge||relative comparisons&lt;br /&gt;
|-&lt;br /&gt;
|6||== != eq ne||equality comparisons&lt;br /&gt;
|-&lt;br /&gt;
|7||and||logical AND&lt;br /&gt;
|-&lt;br /&gt;
|8||or||logical OR&lt;br /&gt;
|-&lt;br /&gt;
|9||=||assignment operator&lt;br /&gt;
|-&lt;br /&gt;
|10||,||comma operator&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
Note, for consistency between JavaScript and PHP, the plus operator (+) does addition if both operands are numeric, but does concatenation if both parts are non-numeric strings.  However, we recommend using the join() function for concatenation, as that makes your intent more clear, and avoids unexpected results if you were expecting strings but got numbers instead (or vice versa).&lt;br /&gt;
&lt;br /&gt;
===Caution about using Assignment Operator (=)=== &amp;lt;!--T:142--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:143--&amp;gt;&lt;br /&gt;
Note, you should avoid using the assignment operators unless absolutely necessary, since they may cause unexpected side-effects.  For example, if you change the value of a previous response, the cascading relevance and validation logic between that question and the current question is not re-computed, so you could end up with internally inconsistent data (e.g. questions that stay answered but should have been NULLed, or questions that are skipped but should have been answered).  In general, if you want to assign a value to a variable, you sould create an Equation question type, and use an expression to set its value.  However, there are some rare times that people really need this operator, so we made it available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:144--&amp;gt;&lt;br /&gt;
To help caution you about this operator, it is shown in red font within the syntax equations (so that you don&#039;t confuse it with &amp;quot;==&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
The main reasons you may want to use assignment are:&lt;br /&gt;
*You need to set the default value for a question that does not accept defaults via equation (such as list radio, where the user interface lets you pick one of the answer options, but does not let you enter an equation).  However, be careful, as LimeSurvey will not be able to validate that your equation generates one of the allowable answers for that question.&lt;br /&gt;
*You need to forcibly change the response to a previous question based upon a later response&lt;br /&gt;
&lt;br /&gt;
==Access to Variables== &amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
Expression Manager provides read-only access to whichever variables we might need.  For backwards compatibility, it provides access to the following:&lt;br /&gt;
*TOKEN:xxx - the value of a TOKEN (e.g. TOKEN:FIRSTNAME, TOKEN:ATTRIBUTE_5)&lt;br /&gt;
*INSERTANS:SGQA - the display value of an answer (e.g. &amp;quot;Yes&amp;quot;)&lt;br /&gt;
*All {XXX} values used by templates&lt;br /&gt;
*In question text, you can use {QID} replaced by the question id and {SGQ} replaced by the SGQA of the question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
In addition, Expression Manager lets you refer to variables by the Question Code (the &#039;title&#039; column in the questions table within the database).  This is also the variable label used when you export your data to SPSS, R, or SAS.  For example, if you have questions about name, age, and gender, you could call those variables &#039;&#039;name&#039;&#039;, &#039;&#039;age&#039;&#039;, and &#039;&#039;gender&#039;&#039; instead of &#039;&#039;12345X13X22&#039;&#039;, &#039;&#039;12345X13X23&#039;&#039;, and  &#039;&#039;12345X13X24&#039;&#039;.  This makes equations easier for everyone to read and validate the logic, plus makes it possible to shuffle questions around without having to keep track of group or question numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
Furthermore, Expression Manager lets you access many properties of the Question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:150--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax!!Meaning!!Example!!Example Result&lt;br /&gt;
|-&lt;br /&gt;
|Qcode||an alias for Qcode.code||{implode(&#039;,&#039;,name,gender)}||&#039;Tom&#039;,&#039;M&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.code||the selected response code for the question if it is relevant (otherwise blank), or the text value if it is not a coded question||{implode(&#039;,&#039;,name.code,gender.code)}||&#039;Tom&#039;,&#039;M&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.NAOK||same as Qcode - see discussion of NAOK||{gender.NAOK}||&#039;M&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.value||the assessment value for the question if it is relevant (otherwise blank), or the text value if it is not a coded question||{gender.value}||&#039;1&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.valueNAOK||same as Qcode.value - see discussion about NAOK||{gender.valueNAOK}||&#039;1&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.shown||the dispay value for the question||{implode(&#039;,&#039;,name.shown,gender.shown)}||&#039;Tom&#039;,&#039;Male&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.question||the text of the question||{gender.question}||&#039;What is your gender?&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.mandatory||whether the question is mandatory (Y/N)||{gender.mandatory}||&#039;N&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.qid||the internal question number (not the sequential number)||{gender.qid}||337&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.type||the question type||{gender.type}||&#039;G&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.jsName||the correct javascript name for the question, regardless whether declared on or off this page||{gender.jsName}||&#039;java1827X3X337&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.gid||the internal group number (not the sequential number)||{gender.gid}||3&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.qseq||the sequential number of the question, starting from 0||{gender.qseq}||5&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.gseq||the sequential number of the group, starting from 0||{gender.gseq}||1&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.relevanceStatus||whether the question is currently relevant (0 or 1)||{gender.relevanceStatus}||1&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.relevance||the question-level relevance equation||{gender.relevance}||&#039;!is_empty(name)&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.grelevance||the  group-level relevance equation||{gender.grelevance}||&#039;num_children &amp;gt;= 5&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.sgqa||the SGQA value for this question||{gender.sgqa}||&#039;1827X3X337&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Security issue=== &amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
For security issues, text entered by user are filtered. Some caracter are replaced by HTML entities.&lt;br /&gt;
* &amp;amp; by &amp;amp;amp;amp;&lt;br /&gt;
* &amp;lt; by &amp;amp;amp;lt;&lt;br /&gt;
* &amp;gt; by &amp;amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Qcode Variable Naming== &amp;lt;!--T:153--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
Here are the details of how to construct a Qcode (and access some properties) by question type.  In general, Qcodes are constructed as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
  QuestionCode . &#039;_&#039; . SubQuestionID . &#039;_&#039; . ScaleId&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:208--&amp;gt;&lt;br /&gt;
For comment and other, question code are QuestionCode_comment and QuestionCode_other&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Type!!Description!!Code!!SubQs!!Answer Options!!Scales!!Answer Code!!Answer Shown!!Relevance&lt;br /&gt;
|-&lt;br /&gt;
|5||5 Point Choice Radio-Buttons||Q1|| ||1-5|| ||{Q1}||{Q1.shown}||{Q1==3}&lt;br /&gt;
|-&lt;br /&gt;
|B||Array (10 Point Choice) Radio-Buttons||Q2||L1-L6||1-10|| ||{Q2_L2}||{Q2_L2.shown}||{Q2_L2==7}&lt;br /&gt;
|-&lt;br /&gt;
|A||Array (5 Point Choice) Radio-Buttons||Q3||1-5||1-5|| ||{Q3_1}||{Q3_1.shown}||{Q3_1&amp;gt;=3}&lt;br /&gt;
|-&lt;br /&gt;
|1||Array (Flexible Labels) Dual Scale||Q4||sq1-sq5||0:a1-a3||1:b1-b3||{Q4_sq1_0}||{Q4_sq1_1.shown}||{Q4_sq1_1==&#039;b2&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|H||Array (Flexible) - Column Format||Q5||1-5||s,m,t|| ||{Q5_1}||{Q5_1.shown}||{Q5_1==&#039;s&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|F||Array (Flexible) - Row Format||Q6||F1-F5||1-5|| ||{Q6_F3}||{Q6_F3.shown}||{Q6_F3==4}&lt;br /&gt;
|-&lt;br /&gt;
|E||Array (Increase/Same/Decrease) Radio-Buttons||Q7||1-7||I,S,D|| ||{Q7_4}||{Q7_4.shown}||{Q7_4==&#039;D&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|:||Array (Multi Flexi) 1 To 10||Q8||ls1,todo,ls2||min,max,avg|| ||{Q8_ls1_max}||{Q8_ls2_avg.shown}||{Q8_ls2_min==7}&lt;br /&gt;
|-&lt;br /&gt;
|;||Array (Multi Flexi) Text||Q9||hp,st,sw||1st,2nd,3rd|| ||{Q9_hp_3rd}||{Q9_hp_3rd.shown}||{Q9_hp_3rd==&#039;Peter&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|C||Array (Yes/Uncertain/No) Radio-Buttons||Q10||1-5||Y,N,U|| ||{Q10_1}||{Q10_1.shown}||{Q10_3==&#039;Y&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|X||Boilerplate Question||Q11|| || || || ||{Q11.shown}||&lt;br /&gt;
|-&lt;br /&gt;
|D||Date||Q12|| || || ||{Q12}||{Q12.shown}||&lt;br /&gt;
|-&lt;br /&gt;
|*||Equation||Q13|| || || ||{Q13}||{Q13.shown}||{Q13&amp;gt;5}&lt;br /&gt;
|-&lt;br /&gt;
|~124~||File Upload (records number of files uploaded)||Q14|| || || ||{Q14}|| ||{Q14&amp;gt;0}&lt;br /&gt;
|-&lt;br /&gt;
|G||Gender Drop-Down List||Q15|| ||M,F|| ||{Q15}||{Q15.shown}||{Q15==&#039;M&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|U||Huge Free Text||Q16|| || || ||{Q16}||{Q16.shown}||{strlen(Q16)&amp;gt;100}&lt;br /&gt;
|-&lt;br /&gt;
|I||Language Question||Q17|| || || ||{Q17}||{Q17.shown}||{Q17==&#039;en&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|!||List - Dropdown||Q18|| ||1-5|| ||{Q18}||{Q18.shown}||{Q18==3}&lt;br /&gt;
|-&lt;br /&gt;
|L||List Drop-Down/Radio-Button List||Q19|| ||A-Z|| ||{Q19}||{Q19.shown}||{Q19==&#039;X&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|O||List With Comment Drop-Down/Radio-Button List + Textarea||Q20|| ||A-F|| ||{Q20},{Q20comment}||{Q20.shown}||{Q20==&#039;B&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|T||Long Free Text||Q21|| || || ||{Q21}||{Q21.shown}||{strstr(Q21,&#039;hello&#039;)&amp;gt;0}&lt;br /&gt;
|-&lt;br /&gt;
|M||Multiple Choice Checkbox||Q22||A-F|| || ||{Q22_E}||{Q22_E.shown}||{Q22_E==&#039;Y&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|P||Multiple Choice With Comments Checkbox + Text||Q23||A-F|| || ||{Q23_D}, {Q23_Dcomment}||{Q23_D.shown}||{!is_empty(Q23)}&lt;br /&gt;
|-&lt;br /&gt;
|K||Multiple Numerical Question||Q24||self,mom,dad|| || ||{Q24_self}||{Q24_self.shown}||{Q24_self&amp;gt;30}&lt;br /&gt;
|-&lt;br /&gt;
|Q||Multiple Short Text||Q25||A-F|| || ||{Q25_B}||{Q25_B.shown}||{substr(Q25_B,1,1)==&#039;Q&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|N||Numerical Question Type||Q26|| || || ||{Q26}||{Q26.shown}||{Q26 &amp;gt; 30}&lt;br /&gt;
|-&lt;br /&gt;
|R||Ranking Style||Q27||1-4|| || ||{Q27_1}||{Q27_1.shown}||{Q27_1==3}&lt;br /&gt;
|-&lt;br /&gt;
|S||Short Free Text||Q28|| || || ||{Q28}||{Q28.shown}||{Q28==&#039;mine&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|Y||Yes/No Radio-Buttons||Q29|| || || ||{Q29}||{Q29.shown}||{Q29==&#039;Y&#039;}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The reserved &#039;this&#039;, &#039;self&#039;, and &#039;that&#039; variables== &amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
Quite often, you want to evalute all parts of a question, such as counting how many sub-questions have been answered, or summing the scores.  Other times, you want to process just certain rows or columns of a question (such as getting the row or column sums and storing them in the database).  These reserved variables make that process relatively painless.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
The &#039;this&#039; variable is used exclusively within the &amp;quot;Whole question validation equation&amp;quot; and &amp;quot;Sub-question validation equation&amp;quot; advanced question options.  It expands to the variable names of each of the cells within those questions.  So, if you want to make sure that each entry is greater than three, you would set the &amp;quot;Sub-question validation equation&amp;quot; to (this &amp;gt; 3).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
The &#039;self&#039; and &#039;that&#039; variable are more powerful, and serve as macros which are expanded prior to processing equations.  The syntax choices are:&lt;br /&gt;
*self&lt;br /&gt;
*self.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
*self.&#039;&#039;sub-selector&#039;&#039;&lt;br /&gt;
*self.&#039;&#039;sub-selector&#039;&#039;.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
&#039;&#039;suffix&#039;&#039; is any of the normal qcode suffixes (e.g. NAOK, value, shown)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
&#039;&#039;sub-selector&#039;&#039; is one of:&lt;br /&gt;
*comments - only subquestions that are comments (e.g. from multiple choice with comment and list with comment)&lt;br /&gt;
*nocomments - only subquestions that are not comments&lt;br /&gt;
*sq_X - where X is a row or column identifier.  Only sub-questions matching pattern X are selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
*Has any part of a question been answered?  {count(self.NAOK)&amp;gt;0}&lt;br /&gt;
*What is the assessment score for this question?  {sum(self.value)}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
You can also use these to get row and column totals.  Say you have a array of numbers with rows A-E and columns 1-5.&lt;br /&gt;
*What is the grand total?  {sum(self.NAOK)}&lt;br /&gt;
*What is the total of row B?  {sum(self.sq_B.NAOK)}&lt;br /&gt;
*What is the total of column 3? {sum(self.sq_3.NAOK)}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
The &#039;that&#039; variable is like the &#039;self&#039; variable, but lets you refer to other questions.  Its syntax is:&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;.&#039;&#039;sub-selector&#039;&#039;&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;.&#039;&#039;sub-selector&#039;&#039;.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
&#039;&#039;qname&#039;&#039; is the question name without any sub-question extensions.  So, say you create a question &#039;q1&#039;, that is its &#039;&#039;qname&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
*Has any part of question q1 been answered?  {count(that.q1.NAOK)&amp;gt;0}&lt;br /&gt;
*What is the assessment score for q2?  {sum(that.q2.NAOK)}&lt;br /&gt;
*What is the grand total of q3? {sum(that.q3.NAOK)}&lt;br /&gt;
*What is the total of row C in q4?  {sum(that.q4.sq_C.NAOK)}&lt;br /&gt;
*What is the total of column 2 in q4? {sum(that.q4.sq_2.NAOK)}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
The &#039;self&#039; and &#039;that&#039; variables can be used in any relevance,  validation, or tailoring.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
The one caveat is that when you use the [[Show Logic File|Show Logic File]] feature, it will show you the expanded value of &#039;self&#039; and &#039;that&#039;.  This lets you see the actual equation that will be generated so that you (and Expression Manager) can validate that the variables exist.  This may seem confusing since you may see quite lenghty equations.  However, if you edit the question, you will see the original equation using &#039;self&#039; and/or &#039;that&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
Also note that you should not use these variables if (a) you want to explicitly name each variable used in an equation, or (b) use variables that do not have sub-questions (e.g. single response questions).  In those cases, prefixing a variable with &#039;that&#039; is overkill, and you run the risk of getting unexpected results.&lt;br /&gt;
&lt;br /&gt;
==Access to Functions== &amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:172--&amp;gt;&lt;br /&gt;
Expression Manager provides access to mathematical, string, and user-defined functions, as shown below.  It has PHP and JavaScript equivalents for these functions so that they work identically on server-side (PHP) and client-side (JavaScript).  It is easy to add new functions.&lt;br /&gt;
&lt;br /&gt;
===Implemented Functions=== &amp;lt;!--T:173--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:174--&amp;gt;&lt;br /&gt;
The following functions are currently available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:175--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function!!Meaning!!Syntax&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.abs.php abs]||Absolute value||number abs(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.acos.php acos]||Arc cosine||number acos(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.addslashes.php addslashes]||Quote string with slashes||string addslashes(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.asin.php asin]||Arc sine||number asin(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.atan.php atan]||Arc tangent||number atan(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.atan2.php atan2]||Arc tangent of two variables||number atan2(number, number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.ceil.php ceil]||Round fractions up||number ceil(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.checkdate.php checkdate]||Returns true(1) if it is a valid date in gregorian calendar||bool checkdate(month,day,year)&lt;br /&gt;
|-&lt;br /&gt;
|convert_value||Convert a numerical value using a inputTable and outputTable of numerical values||number convert_value(fValue, iStrict, sTranslateFromList, sTranslateToList)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.cos.php cos]||Cosine||number cos(number)&lt;br /&gt;
|-&lt;br /&gt;
|count||count the number of answered (non-blank)questions in the list||number count(arg1, arg12, ..., argN)&lt;br /&gt;
|-&lt;br /&gt;
|countif||Count the number of answered questions in the list equal the first argument||number countif(matches, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|countifop||Count the number of answered questions in the list which pass the criteria (arg op value)||number countifop(op, value, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.date.php date]||Format a local date/time||string date(format &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, timestamp=time()])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.exp.php exp]||Calculates the exponent of e||number exp(number)&lt;br /&gt;
|-&lt;br /&gt;
|fixnum||Display numbers with comma as radix separator, if needed||string fixnum(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.floor.php floor]||Round fractions down||number floor(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.gmdate.php gmdate]||Format a GMT date/time||string gmdate(format &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, timestamp=time()])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.html-entity-decode.php html_entity_decode]||Convert all HTML entities to their applicable characters (always uses ENT_QUOTES and UTF-8)||string html_entity_decode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.htmlentities.php htmlentities]||Convert all applicable characters to HTML entities (always uses ENT_QUOTES and UTF-8)||string htmlentities(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.htmlspecialchars.php expr_mgr_htmlspecialchars]||Convert special characters to HTML entities (always uses ENT_QUOTES and UTF-8)||string htmlspecialchars(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.htmlspecialchars-decode.php expr_mgr_htmlspecialchars_decode]||Convert special HTML entities back to characters (always uses ENT_QUOTES and UTF-8)||string htmlspecialchars_decode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.idate.php idate]||Format a local time/date as integer||string idate(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, timestamp=time()])&lt;br /&gt;
|-&lt;br /&gt;
|if||Excel-style if(test,result_if_true,result_if_false)||if(test,result_if_true,result_if_false)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.implode.php implode]||Join array elements with a string||string implode(glue,arg1,arg2,...,argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.intval.php intval]||Get the integer value of a variable||int intval(number &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, base=10])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.empty.php is_empty]||Determine whether a variable is considered to be empty||bool is_empty(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-float.php is_float]||Finds whether the type of a variable is float||bool is_float(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-int.php is_int]||Find whether the type of a variable is integer||bool is_int(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-nan.php is_nan]||Finds whether a value is not a number||bool is_nan(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-null.php is_null]||Finds whether a variable is NULL||bool is_null(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-numeric.php is_numeric]||Finds whether a variable is a number or a numeric string||bool is_numeric(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-string.php is_string]||Find whether the type of a variable is string||bool is_string(var)&lt;br /&gt;
|-&lt;br /&gt;
|join{{NewIn|2.0|b=130129}}||Join elements as a new string||join(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|list||Return comma-separated list of non-blank values||string list(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.log.php log]|| The logarithm of number to base, if given, or the natural logarithm. ||number log(number,base=e)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.ltrim.php ltrim]||Strip whitespace (or other characters) from the beginning of a string||string ltrim(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, charlist])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.max.php max]||Find highest value||number max(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.min.php min]||Find lowest value||number min(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.mktime.php mktime]||Get UNIX timestamp for a date (each of the 6 arguments are optional)||number mktime([hour [, minute [, second [, month [, day [, year ]]]]]])&lt;br /&gt;
|-&lt;br /&gt;
|modulo-function||The modulo function is &#039;&#039;&#039;not supported&#039;&#039;&#039; yet. You can use the floor() function instead||floor(x/y)==(x/y)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.nl2br.php nl2br]||Inserts HTML line breaks before all newlines in a string||string nl2br(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.number-format.php number_format]||Format a number with grouped thousands||string number_format(number)&lt;br /&gt;
|-&lt;br /&gt;
|pi||Get value of pi||number pi()&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.pow.php pow]||Exponential expression||number pow(base, exp)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.quoted-printable-decode.php quoted_printable_decode]||Convert a quoted-printable string to an 8 bit string||string quoted_printable_decode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.quoted-printable-encode.php quoted_printable_encode]||Convert a 8 bit string to a quoted-printable string||string quoted_printable_encode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.quotemeta.php quotemeta]||Quote meta characters||string quotemeta(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.rand.php rand]||Generate a random integer, see [[Expression Manager Sample Surveys#Randomly Ask One Question Per Group|this example]]||int rand() OR int rand(min, max)&lt;br /&gt;
|-&lt;br /&gt;
|regexMatch||compare a string to a [[Using regular expressions|regular expression]]||bool regexMatch(pattern,input)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.round.php round]||Rounds a number to an optional precision||number round(val &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, precision])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.rtrim.php rtrim]||Strip whitespace (or other characters) from the end of a string||string rtrim(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, charlist])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.sin.php sin]||Sine||number sin(arg)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.sprintf.php sprintf]||Return a formatted string||string sprintf(format, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.sqrt.php sqrt]||Square root||number sqrt(arg)&lt;br /&gt;
|-&lt;br /&gt;
|stddev||Calculate the Sample Standard Deviation for the list of numbers||number stddev(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.str-pad.php str_pad]||Pad a string to a certain length with another string||string str_pad(input, pad_length &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, pad_string])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.str-repeat.php str_repeat]||Repeat a string||string str_repeat(input, multiplier)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.str-replace.php str_replace]||Replace all occurrences of the search string with the replacement string||string str_replace(search, replace, subject)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strcasecmp.php strcasecmp]||Binary safe case-insensitive string comparison||int strcasecmp(str1, str2)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strcmp.php strcmp]||Binary safe string comparison||int strcmp(str1, str2)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strip-tags.php strip_tags]||Strip HTML and PHP tags from a string||string strip_tags(str, allowable_tags)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.stripos.php stripos]||Find position of first occurrence of a case-insensitive string||int stripos(haystack, needle &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, offset=0])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.stripslashes.php stripslashes]||Un-quotes a quoted string||string stripslashes(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.stristr.php stristr]||Case-insensitive strstr||string stristr(haystack, needle &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, before_needle=false])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strlen.php strlen]||Get string length||int strlen(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strpos.php strpos]||Find position of first occurrence of a string||int strpos(haystack, needle &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt; offset=0])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strrev.php strrev]||Reverse a string||string strrev(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strstr.php strstr]||Find first occurrence of a string||string strstr(haystack, needle)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strtolower.php strtolower]||Make a string lowercase||string strtolower(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strtotime.php strtotime]||Parse about any English textual datetime description into a Unix timestamp||int strtotime(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strtoupper.php strtoupper]||Make a string uppercase||string strtoupper(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.substr.php substr]||Return part of a string||string substr(string, start &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, length])&lt;br /&gt;
|-&lt;br /&gt;
|sum||Calculate the sum of values in an array||number sum(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|sumifop||Sum the values of answered questions in the list which pass the criteria (arg op value)||number sumifop(op, value, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.tan.php tan]||Tangent||number tan(arg)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.time.php time]||Return current UNIX timestamp||number time()&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.trim.php trim]||Strip whitespace (or other characters) from the beginning and end of a string||string trim(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, charlist])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.ucwords.php ucwords]||Uppercase the first character of each word in a string||string ucwords(string)&lt;br /&gt;
|-&lt;br /&gt;
|unique||Returns true if all non-empty responses are unique||boolean unique(arg1, ..., argN)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Functions that are Planned or Being Considered=== &amp;lt;!--T:176--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:177--&amp;gt;&lt;br /&gt;
Other functions that are planned (or being considered) but which are not implemented yet include the following.  Some of these are for backwards compatability with another survey tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax!!Meaning!!Comments&lt;br /&gt;
|-&lt;br /&gt;
|e()||returns the value of e||&lt;br /&gt;
|-&lt;br /&gt;
|formatDate(X,PAT)||return the string value of date X formatted according to Java data format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|formatNumber(X,PAT)||return the string value of number X formatted according to Java number format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|getAnsOption(X)||returns the text corresponding to the selected option for answer X||this is the same as X.shown&lt;br /&gt;
|-&lt;br /&gt;
|getAnsOption(X,Y)||returns the text corresponding to the option at index Y of node X||&lt;br /&gt;
|-&lt;br /&gt;
|getRelevance(X)||returns the relevance equation for question X||&lt;br /&gt;
|-&lt;br /&gt;
|getStartTime()||returns the date corresponding to the system time when the interview was started||&lt;br /&gt;
|-&lt;br /&gt;
|getType(X)||returns the string name of the datatype - e.g. *NA* if isNA()||&lt;br /&gt;
|-&lt;br /&gt;
|gotoFirst()||jumps to the first relevant set of questions - this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|gotoNext()||jumps to the next set of relevant questions - this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|gotoPrevious()||jumps to the previous set of relevant questions - this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|isAsked(X)||returns true if the answer is neither *NA*, *INVALID*, nor *UNASKED*||&lt;br /&gt;
|-&lt;br /&gt;
|isInvalid(X)||returns true if the answer is of type *INVALID*||&lt;br /&gt;
|-&lt;br /&gt;
|isNA(X)||returns true if the answer is of type *NA*||&lt;br /&gt;
|-&lt;br /&gt;
|isNotUnderstood(X)||returns true if the answer if of type *HUH*||&lt;br /&gt;
|-&lt;br /&gt;
|isRefused(X)||returns true if the answer is of type *REFUSED*||&lt;br /&gt;
|-&lt;br /&gt;
|isSpecial(X)||returns true if the answer is of type *UNASKED*, *NA*, *REFUSED*, *INVALID*, *UNKNOWN*, or *HUH*||&lt;br /&gt;
|-&lt;br /&gt;
|isUnknown(X)||returns true if the answer is of type *UNKNOWN*||&lt;br /&gt;
|-&lt;br /&gt;
|jumpTo(X)||jump to the group containing the named question -- this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|jumpToFirstUnasked()||jump to the first unasked question &amp;lt;strike&amp;gt; thus bypassing previous answered questions &amp;lt;/strike&amp;gt; this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|lastIndexOf(X,Y)||returns the last index (base 0) of string Y in string X. Returns -1 if Y is not contained within X||&lt;br /&gt;
|-&lt;br /&gt;
|list(X,...)||a string containing a comma separated list of the positive values with &amp;quot;and&amp;quot; separating the last two||&lt;br /&gt;
|-&lt;br /&gt;
|mean(X,...)||returns the mean of a list of values||&lt;br /&gt;
|-&lt;br /&gt;
|numAnsOptions(X)||returns the number of answer options that question X has||&lt;br /&gt;
|-&lt;br /&gt;
|orlist(X,...)||a string containing a comma separated list of the positive values, with &amp;quot;or&amp;quot; separting the last two||&lt;br /&gt;
|-&lt;br /&gt;
|parseDate(X,PAT)||returns the date value of string X parsed with Java date format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|parseNumber(X,PAT)||returns the numerical value of string X parsed with Java number format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|showAllResponsesExcept( questionList,attributeList,attributeTitleList)||questionList = pipe-delimited list of question identifiers; attributeList = pipe-delimited list of attributes (like question#, title, text, type - so you can decide what to show); attributeTitleList = pipe-delimited list of table headers, so can internationalize the report.||&lt;br /&gt;
|-&lt;br /&gt;
|showTheseResponses( questionList,attributeList,attributeTitleList)||questionList = pipe-delimited list of question identifiers; attributeList = pipe-delimited list of attributes (like question#, title, text, type - so you can decide what to show); attributeTitleList = pipe-delimited list of table headers, so can internationalize the report.|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Expression Manager Knows Which Variables are Local== &amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:180--&amp;gt;&lt;br /&gt;
In order to properly build the JavaScript for page, Expression Manager needs to know which variables are set on the page, and what their JavaScript ID is (e.g. for document.getElementById(x)).  It also must know which variables are set on other pages (so that it can ensure that the needed &amp;lt;input type=&#039;hidden&#039; value=&#039;x&#039;&amp;gt; fields are present and populated).&lt;br /&gt;
&lt;br /&gt;
==Cascading Conditions== &amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:182--&amp;gt;&lt;br /&gt;
If any of the variables are irrelevant, the whole equation will be irrelevant (false).  For example, in the following table, N/A means that one of the variables was not relevant&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:183--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Operator!!Example!!a!!b!!Result&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;+ (unary)&amp;lt;/nowiki&amp;gt;||&amp;lt;nowiki&amp;gt;+a&amp;lt;/nowiki&amp;gt;||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|- (unary)||-a||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|!||!a||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|== (or eq)||a == b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|== (or eq)||a == b||N/A||0||false&lt;br /&gt;
|-&lt;br /&gt;
|== (or eq)||a == b||N/A||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|!= (or ne)||a != b||N/A||5|| false&lt;br /&gt;
|-&lt;br /&gt;
|!= (or ne)||a != b||N/A||N/A|| false&lt;br /&gt;
|-&lt;br /&gt;
|!= (or ne)||a != b||N/A||0||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt; (or gt)||a &amp;gt; b||N/A||5|| false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;= (or ge)||a &amp;gt;= b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt; (or lt)||a &amp;lt; b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;= (or le)||a &amp;lt;= b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|and||a and b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|and||a and b||N/A||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|or||a or b||N/A||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|or||a or b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;+&amp;lt;/nowiki&amp;gt;||a + b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|-||a - b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|*||a * b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|/||a / b||5||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|()||(a)||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|(exp)||(a &amp;amp;&amp;amp; b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|(exp) op (exp)||(b + b) &amp;gt; (a &amp;amp;&amp;amp; b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||sum(a,b,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||max(a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||min(a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||implode(&#039;, &#039;,a,b,a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||if(a,a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||is_empty(a)||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|function||is_empty(a)||0 (or blank)|| ||true&lt;br /&gt;
|-&lt;br /&gt;
|function||!is_empty(a)||N/A|| ||false&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Overriding Cascading Conditions=== &amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:185--&amp;gt;&lt;br /&gt;
Say you want to show a running total of all relevant answers.  You might try to use the equation {sum(q1,q2,q3,...,qN)}.  However, this gets translated internally to LEMif(LEManyNA(&#039;q1&#039;,&#039;q2&#039;,&#039;q3&#039;,...,&#039;qN&#039;),&#039;&#039;,sum(LEMval(&#039;q1&#039;),LEMval(&#039;q2&#039;),LEMval(&#039;q3&#039;),...,LEMval(&#039;qN&#039;))).  So, if any of the values q1-qN are irrelevant, the equation will always return false.  In this case, the sum() will show 0 until all questions are answered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:186--&amp;gt;&lt;br /&gt;
To get around this, each variable can have a &amp;quot;.NAOK&amp;quot; suffix (meaning that Not Applicable is OK) added to it.  In such cases, the following behavior occurs.  Say you have a variable q1.NAOK&lt;br /&gt;
#q1 is not added to the LEManyNA() clause&lt;br /&gt;
#LEMval(&#039;q1&#039;) will  continue to check whether the response is relevant, and will return &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt; if it is not (so individual irrelevant responses will be ignored, but they will not void the entire expression).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:187--&amp;gt;&lt;br /&gt;
So, the solution to the running total problem is to use the equation sum(q1.NAOK,q2.NAOK,q3.NAOK,...,qN.NAOK).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
The use of the .NAOK suffix also lets authors design surveys that have several possible paths but then converge on common paths later.  For example, say subjects answer a survey in a way that is outside the normal range of responses.  The author could alert the subjects that they may not get valid results, and ask them whether they really want to  continue with the survey.  If they say Yes, then the rest of the questions will be shown.  The condition for the &amp;quot;rest of the questions&amp;quot; would check whether the initial responses were answered within the normal range OR whether the subject said Yes to the question that is only relevant if they answered outside the normal range.&lt;br /&gt;
&lt;br /&gt;
==How does Expression Manager Support Conditional Micro-Tailoring?== &amp;lt;!--T:189--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:190--&amp;gt;&lt;br /&gt;
Here is an example of micro-tailoring (where Question Type==&#039;expr&#039; means an Equation):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:191--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Question Code!!Relevance!!Question Type!!Question&lt;br /&gt;
|-&lt;br /&gt;
|name||1||text||What is your name?&lt;br /&gt;
|-&lt;br /&gt;
|age||1||text||How old are you?&lt;br /&gt;
|-&lt;br /&gt;
|badage||!is_empty(age)||expr||{(age&amp;lt;16) or (age&amp;gt;80)}&lt;br /&gt;
|-&lt;br /&gt;
|agestop||badage||message||Sorry, {name}, you are too {if( (age&amp;lt;16),&#039;young&#039;,if( (age&amp;gt;80),&#039;old&#039;,&#039;middle-aged&#039;) ) } for this test.&lt;br /&gt;
|-&lt;br /&gt;
|kids||!badage||yesno||Do you have children?&lt;br /&gt;
|-&lt;br /&gt;
|parents||1||expr||{!badage &amp;amp;&amp;amp; kids==&#039;Y&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|numKids||parents||text||How many children do you have?&lt;br /&gt;
|-&lt;br /&gt;
|kid1||parents &amp;amp;&amp;amp; numKids &amp;gt;= 1||text||How old is your first child?&lt;br /&gt;
|-&lt;br /&gt;
|kid2||parents &amp;amp;&amp;amp; numKids &amp;gt;= 2||text||How old is your second child?&lt;br /&gt;
|-&lt;br /&gt;
|kid3||parents &amp;amp;&amp;amp; numKids &amp;gt;= 3||text||How old is your third child?&lt;br /&gt;
|-&lt;br /&gt;
|kid4||parents &amp;amp;&amp;amp; numKids &amp;gt;= 4||text||How old is your fourth child?&lt;br /&gt;
|-&lt;br /&gt;
|kid5||parents &amp;amp;&amp;amp; numKids &amp;gt;= 5||text||How old is your fifth child?&lt;br /&gt;
|-&lt;br /&gt;
|sumage||1||expr||{sum(kid1.NAOK,kid2.NAOK,kid3.NAOK,kid4.NAOK,kid5.NAOK)}&lt;br /&gt;
|-&lt;br /&gt;
|report||parents||yesno||{name}, you said you are {age} and that you have {numKids}.  The sum of ages of your first {min(numKids,5)} kids is {sumage}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
All of these questions can be on a single page (e.g. in the same group), and only the relevant questions will display.  Moreover, as you enter the ages of children, the sum() expression in the last question will dynamically update on the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:193--&amp;gt;&lt;br /&gt;
Expression Manager provides this functionality by surrounding each expression with a named &amp;lt;span&amp;gt; element.  Every time a value changes, it recomputes the expression that should appear in that &amp;lt;span&amp;gt; element and regenerates the display.  You can have dozens, or even hundreds, of such tailored expressions on the same page, and the page will re-display all of them in a single screen refresh.&lt;br /&gt;
&lt;br /&gt;
==Mapping of LimeSurvey 1.91+ to Expression Manager Functionality== &amp;lt;!--T:194--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:195--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Old Feature!!New Feature!!Comments&lt;br /&gt;
|-&lt;br /&gt;
|Conditions||Relevance||You can use very complex conditional equations, and access a broader range of variables&lt;br /&gt;
|-&lt;br /&gt;
|Assessments||Equation||Any assessment scores can be re-structured into an Equation. This both ensures that the score is written to the database, and also lets you see dynamic changes to the score value on the current page&lt;br /&gt;
|-&lt;br /&gt;
|Replacements||Expression Manager||The core engine takes the input string and treats everything within curly braces as an Expression - so it handles all historical replacements types.  To avoid messing up embedded JavaScript, Expression Manager only processes content between curly braces as long as (a)  there is no leading or trailing whitespace within the curly braces - e.g. {expr} is an expression, but { expr}, {expr }, and { expr } are not expressions.  Furthermore, Expression Manager does not process content within its own strings (e.g. {list(&#039;hi&#039;,&#039;there {braces}&#039;)} generates &amp;quot;hi there {braces}&amp;quot;).  It also ignores escaped curly braces (e.g. \{this is not an expression\})&lt;br /&gt;
|-&lt;br /&gt;
|Validation||Expression Manager||The plan is to take the current min/max Question Attributes and have Expression Manager process them.  That way the min/max values can be expressions themselves&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Syntax Highlighting= &amp;lt;!--T:196--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:197--&amp;gt;&lt;br /&gt;
To help with entering and validating expressions, EM provides syntax highlighting with the following features:&lt;br /&gt;
&lt;br /&gt;
==Types and Meanings of Syntax Highlighting== &amp;lt;!--T:198--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:199--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Color!!Sample!!Meaning!!Tooltip!!Comments&lt;br /&gt;
|-&lt;br /&gt;
|tan background||style=&#039;background-color: #eee8aa&#039;|Sample||the whole equation||none||Anything within curly braces that is recognized as an equation (e.g. there is no leading or trailing whitepace) will be color-coded with a tan background to help distinguish it from surrounding text&lt;br /&gt;
|-&lt;br /&gt;
|blue bold text||style=&#039;color:blue; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||function name||meaning and allowable syntax||function names, or things that should be functions since they are followed by an opening parenthesis, are presented in bold blue text.  Tooltips show the meaning and allowable syntax for the function.&lt;br /&gt;
|-&lt;br /&gt;
|grey text||style=&#039;color:grey; background-color:#eee8aa&#039;|Sample||string||none||single and double-quoted strings are shown in grey text&lt;br /&gt;
|-&lt;br /&gt;
|bold maroon text||style=&#039;color:maroon; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on the same page, but after the current question||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on the same page but after the current question is shown in bold maroon text.  This color coding should alert authors to possible errors in question sequencing; but it is allowed since some authors may want this sequence of variables a page, especially for dynamic reports.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold cyan text||style=&#039;color:#4C88BE; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on the same page, prior to the current question||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on the same page and prior to the current question is shown in bold cyan text.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold green text||style=&#039;color:green; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on a prior page||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on a prior page is shown in bold green text.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold pink text||style=&#039;color:#FF00FF; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on a later page||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on a prior page is shown in bold pink text.  These are erorrs since the variable is  being used before it is declareed.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold tan text||style=&#039;color:#996600; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||a lime replacement value||the value||Lime Replacement Strings (like {TOKEN:xxx}, {PRIVACY_MESSAGE}) are shown in bold tan text.  &lt;br /&gt;
|-&lt;br /&gt;
|red text||style=&#039;color:red; background-color:#eee8aa&#039;|Sample||assignment operator||warning message||If you use one of the assignment operator (=) that operator will be displayed in red text.  This is meant to help prevent accidental re-assignment of values when you really meant to check whether a == b instead of  setting the value of a = b.&lt;br /&gt;
|-&lt;br /&gt;
|normal black text||style=&#039;color:black; background-color:#eee8aa&#039;|Sample||punctuation||none||All other punctuation within the expression is shown as normal black text.&lt;br /&gt;
|-&lt;br /&gt;
|red-boxed text||a bold red line surrounds the error||syntax error||description of the error||Any detected syntax errors are shown by surrounding the error with a red box.  The tooltip shows the error.  Examples include unmatched parentheses, use of undefined functions, passing the wrong number of arguments to functions, poorly structured expressions (e.g. missing operators between variables), trying to assign a new value to a read-only variable, trying to assign values to non-variables, or using unsupported syntax.  Note that the syntax error dectection system may only report one error in an expression even if there are multiple errors; however, if any errors are detected, at least one error will be shown.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Relationship to LimeSurvey Ideas / Feature Requests= &amp;lt;!--T:200--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:201--&amp;gt;&lt;br /&gt;
Expression Manager provides complete or partial solutions to each of the following:&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/1 Conditions]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/3/ Answercounts]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/5 Advanced reporting for assessments]&lt;br /&gt;
**partial: Equations let one store the Assessment value in the database, and micro-tailoring can generate simple formatted reports.  Authors can access those Equation values if they have more complex reporting needs.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/6 Assessment reports]&lt;br /&gt;
**partial:  Since Equations store the Assessment score, it should be possible to use Statistics to show distributions of those scores, and Quotas to limit the number of responses with those scores.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/7 Store assessment results for further evaluation]&lt;br /&gt;
**Equations let one store the Assessment value in the database, completely solving this problem&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/22/ More advanced condition rules]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/28 Open Answertable up so that we can alter formatting]&lt;br /&gt;
**partial:  All of the question attributes are available, so authors can create custom AnswerTable equivalents as a Question.  Once implatemented, they can also use the showTheseResponses() or showAllResponsesExecpt() functions&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/37 Export survey results with full questions to include images]&lt;br /&gt;
**since Tailoring has access to the full question text, it can include images in the export&lt;br /&gt;
**if subjects choose Print Your Answers after finishing the survey, those printouts will be fully tailored&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/63 List of question codes and SGQA identifiers]&lt;br /&gt;
**The Show Survey Logic view shows that mapping (plus much more information)&lt;br /&gt;
**In addition, you no longer have to use SGQA codes to refer to variables - you can use the Question code/title.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/69 Branch/jump to another question (earlier or later) based on current question]&lt;br /&gt;
**You can use the Navigation Index for this in most cases&lt;br /&gt;
**Once implemented, you can use the JumpTo() function.  Like the Navigation Index, if you try to jump forward, it will stop on an intervening page if there are any of the relevant mandatory questions are unanswered, or if any relevant questions fail validation tests.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/86 set quota for total responses]&lt;br /&gt;
**If the final question is an Equation that flags a survey as completed (so is NULL if a respondant does not get to that page), you can use Quotas on that question to control the number of completed responses.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/101 Review all conditions]&lt;br /&gt;
**The [[Show Logic File|Show Logic File]] view shows this (and much more)&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/105 Review all questions + Review all groups]&lt;br /&gt;
**The [[Show Logic File|Show Logic File]] view shows this (and much more)&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/107 How to visualize questions, logic &amp;amp; conditions]&lt;br /&gt;
**The [[Show Logic File|Show Logic File]] view shows this (and much more)&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/113 Offline Surveys]&lt;br /&gt;
**Running a survey with all of the questions on the same page would let you do off-line data collection  (e.g. email the html page and associated JavaScript).  However, you would still want a way to submit the results so that they did not get lost.  It may be possible to use Save As HTML to save partially completed responses.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/120 Remove INSERTANS from question text at survey results]&lt;br /&gt;
**INSERTANS is no longer needed.  You can refer to a variable by its SGQA code (without prefixing it with INSERTANS:), or by its question code.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/137 Informed Consent and Authorization Functionality]&lt;br /&gt;
**You can show the informed consent on the welcome page, then ask any additional questions needed (to ensure they meet the study inclusion/exclusion criteria), and ask them a Yes/No question whether they give their consent.  Then, make all of the remaining questions conditional on that yesNo.  For example, if the question is named &#039;&#039;consent&#039;&#039;, you would set the relevance to the remaining questions to &#039;&#039;consent == &amp;quot;Y&amp;quot;&#039;&#039; (possibly &#039;&#039;and&#039;&#039;ing that with whatever additional conditions you needed to support your branching needs).&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/199 Show codes instead of of answers using INSERTANS]&lt;br /&gt;
**{Qcode} returns the code instead of the response text (which you can get via {INSERTANS:SGQA}, or {Qcode.shown})&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/204 Need group mean or calculations for assessments]&lt;br /&gt;
**Say you have N variables of which N-X were answered, you could compute the mean of the answered variables as {sum(var1, var2, ..., varN) / count(var1, var2, ..., varN)}&lt;br /&gt;
**Computing the mean across a set of respondants would require extension of the Quota functionality.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/222 To insert a language dependent text]&lt;br /&gt;
**Tailoring lets you conjugate verbs and decline nouns in each language&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/225 Surveyors should approve their answers]&lt;br /&gt;
**Custom Questions with tailoring, or the showAllResponsesExcept() function will let respondants see all of the questions and responses before clicking Submit. If the Navigation Menu option is enabled, it is easy to go back and correct answers.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/1.92 Suppliment to #answernnXnnXnnn method of targetting form elements]&lt;br /&gt;
**You can now refer to questions and answers by their Question Code, so there is no longer a need to modify SGQA values.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/262 More flexibility with hidden questions]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/265 Remove specific conditions from multiple questions]&lt;br /&gt;
**You can now use Relevance, which is easier to manage than Conditions.  If  needed, they can all be exported from the database, edited in a spreadsheet, and re-imported.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/268 Cross Survey Reporting]&lt;br /&gt;
**By using question codes that are unique across your surveys and versions, you can consolidate data from multiple surveys and/or compare them&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/275 Simplifying integration with other tools]&lt;br /&gt;
**Expression Manager uses Question Codes instead of SGQA, making it easier to integrate with other tools.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/1.92 Expose assessment score to 3rd party app processing]&lt;br /&gt;
**This can be done with Equation question type&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/309 Multiple thank you pages]&lt;br /&gt;
**This can be supported via conditional relevance branching and tailoring&lt;br /&gt;
&lt;br /&gt;
=Additional Reading= &amp;lt;!--T:202--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager Sample Surveys|Expression Manager Sample Surveys]]== &amp;lt;!--T:203--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager HowTos|Use Cases and HowTos]]== &amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager Examples|Step-by-Step Examples]].== &amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager for developers|Reference for Developers]]== &amp;lt;!--T:206--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager Roadmap|RoadMap/Status/ToDo List]]== &amp;lt;!--T:207--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=57538</id>
		<title>Expression Manager</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=57538"/>
		<updated>2013-10-10T13:38:37Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt; Note: This feature is only available in LimeSurvey 1.92 or later. &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick Start Tutorial= &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Overview== &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
When customizing your surveys, you typically need a way to specify the following:&lt;br /&gt;
#&#039;&#039;&#039;Navigation/Branching&#039;&#039;&#039; - letting a subject&#039;s answers change the order in which questions are asked&lt;br /&gt;
#&#039;&#039;&#039;Tailoring/Piping&#039;&#039;&#039; - how to phrase the question (such as referring to prior answers, or conjugating sentences based upon the number or gender of your subjects), or how to generate custom reports (like assessment scores or tailored advice).&lt;br /&gt;
#&#039;&#039;&#039;Validation&#039;&#039;&#039; - ensuring that answers pass certain criteria, like min and max values, or matching an input pattern&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Expression Manager (EM) provides an intuitive way to specifying the logic for each of those features.  Nearly anything that you can write as a standard mathematical equation is a valid expression, even if you are calling functions.  EM currently provides access to 70 functions, and can be easily extended to support more.  It also lets you access your variables using human-readable variable names (rather than SGQA names).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
The following sections show the main places where Expression Manager is used&lt;br /&gt;
&lt;br /&gt;
==Relevance (Controlling Navigation/Branching)== &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
Some surveys use &amp;quot;Goto Logic&amp;quot;, such that if you answer Question 1 with option C, then jump to Question 5. This approach is very limiting, since is hard to validate, and easily breaks if you have to re-order questions.  EM uses an Boolean relevance equation to specify all of the conditions under which a question might be valid.  If the question is relevant, then the question is asked, otherwise it is Not Applicable, and the value NULL is stored in the database.  This is similar to what can be done via the Conditions editor, but EM lets you easily specify much more complex and powerful criteria (and lets you use the variable name rather than SGQA naming).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This image shows one way to review the relevance logic for a survey.  It computes Body Mass Index.  The relevance equation is shown in square bracket right after the variable name (which is in green).  So, the relevance of weight, weight_units, height and height_units are all 1, meaning that those questions are always asked.  However, the relevance for BMI is {!is_empty(height) and !is_empty(weight)}, which means that BMI will only be computed if the subject enters a value for both height and weight (thereby avoiding the risk of a divide by zero error).  Also, the Report question is only shown if the subject answers all four main questions (height, height_units, weight, weight_units).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
[[File:tutorial1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
Relevance is shown and editable in the following places:&lt;br /&gt;
&lt;br /&gt;
===Viewing / Editing Question-Level Relevance=== &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
This equation computes the Body Mass Index (BMI).  It is only asked if the person first enters their height and weight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
[[File:tutorial2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
This is the edit screen for the BMI question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
[[File:tutorial3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Note that you do not use the curly braces when you enter a Relevance Equation.&lt;br /&gt;
&lt;br /&gt;
===Viewing / Editing Group-Level Relevance=== &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
This is a sample census survey.  The first page asks how many people live with you and stores that in the &amp;quot;cohabs&amp;quot; variable.  This page is only shown if you have more than one cohabitant (so it is shown for the second person cohabitating with you), and also only shows if you specified how Person One is related to you (p1_rel).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
[[File:tutorial4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
As you can see, the group also has question-level relevance criteria, such that each question only appears once you have answered the question before it (e.g. {!is_empty(p1_sex)}).  EM combines the Group and Question-level relevance for you.  Questions in a group are only asked  if the group as a whole is relevant.  Then, only the subset of questions within the group that are relevant are asked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
Here is the screen for editing the group-level relevance for that question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
[[File:tutorial5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
Note that you do not use the curly braces when you enter a Relevance Equation.&lt;br /&gt;
&lt;br /&gt;
==Tailoring/Piping== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
EM lets you easily do simple and complex conditional tailoring of your questions.  Sometimes you just need simple substitution, like saying, &amp;quot;You said you purchased &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Product].  What did you like best about it?&amp;quot;.  Sometimes you need conditional substitution like &amp;quot;&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Mr./Mrs.] &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;LastName], would you be willing to complete our survey?&amp;quot;.  In this case,  you want to use Mr. or Mrs. based upon the person&#039;s gender.  Other times you need even more complex substitution (such as based upon a mathematical computation).  EM supports each of these types of tailoring/piping.&lt;br /&gt;
&lt;br /&gt;
===Conditional Equations=== &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
The Body Mass Index example shows the ability to compute a person&#039;s BMI, even while letting them enter their height in weight in metric or non-metric units.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
[[File:tailoring7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Here weight_kg is {if(weight_units == &#039;kg&#039;, weight, weight * .453592)}.  This if() function means that if the subject entered the weight using kilograms, use that value, otherwise multiple the entered value (which was in pounds) by .453592 to convert it to kilograms.  The height_m variable uses a similar approach to compute the person&#039;s height in meters, even if he entered his height in inches.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
BMI computes the weight formula as {weight_kg / (height_m * height_m)}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Lastly, the report conditionally tailors the message for the subject, telling him what he entered. (&amp;quot;You said you are 2 meters tall and weight 70 kg.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
Although not well shown in the above image, weight_status uses nested if() statements to categorize the person as underweight to severely obese.  You can see its equation in the Show Logic View&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
[[File:tailoring8.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
From the edit window for this question, you can see two things:&lt;br /&gt;
#Tailoring must surround expressions with Curly Braces&lt;br /&gt;
#Expressions can span multiple lines if, as in this case, you want to make it easier to read the nested conditional logic.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
[[File:tailoring9.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Tailored Questions, Answers, and Reports=== &amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Note: Dynamic tailoring may not work if answer options are made available in select boxes on the same question page. This results from the fact that tailoring inserts a &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt; tag which is not valid inside select options.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
This example shows the BMI report.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
[[File:tailoring10.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
Here is the edit window for the same question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
[[File:tailoring11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
As you can see, anything in curly braces is treated as an expression, so is syntax-highlighted (color coded) in the prior image.  If you had any typos (such as misspelled or undefined variable names or functions), EM would show an error, such as this, showing that height_unit is an undefined variable name (it is actually height_units), and rnd() is an undefined function (the proper function name is round()).  In both cases, the errors are surrounded by a red box to make it easier to spot and fix them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
[[File:tailoring12.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
You can also see that you can quickly create complex reports, such as a table of entered values or tailored advice.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Please remember that all tailoring must surround expressions with Curly Braces, so that LimeSurvey knows which parts of the question are free text and which should be parsed through Expression Manager.&lt;br /&gt;
&lt;br /&gt;
==Validation== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
EM controls how most of the advanced question options work.  These control aspects like min/max numbers of answers; min/max individual values; min/max sum values; and checking that entered values match specified string patterns.  You continue to enter those advanced question options as usual.  However, now any value in one of those fields is considered an expression, so you can have min/max criteria with complex conditional relationships to other questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
In all of these cases, since the advanced question option is always considered an expression, you do not use curly braces when specifying it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
The [[Expression Manager Sample Surveys|Sample Surveys]] pages shows many working examples of using expressions for validations.&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
LimeSurvey 1.92 and later uses the new Expression Manager (EM) module which will let LimeSurvey support more complex branching, assessments, validation, and tailoring.  It will replace how LimeSurvey manages Replacements, Conditions, and Assessments on the back-end.  It will also speed up processing considerably since it eliminates most run-time database reads.  EM was developed by Dr. Thomas White (TMSWhite).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
This wiki page is the definitive reference for Expression Manager syntax and functionality.&lt;br /&gt;
&lt;br /&gt;
==Key Definitions== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Expression&#039;&#039;&#039;:  Anything surrounded by curly braces&lt;br /&gt;
#*As long as there is no white space immediately after the opening brace or before the closing curly brace&lt;br /&gt;
#*The contents of Expressions are evaluted by EM, so they can contain mathematical formulas, functions, and complex string and date processing.&lt;br /&gt;
#&#039;&#039;&#039;Tailoring&#039;&#039;&#039;: Sometimes called &amp;quot;piping&amp;quot;, this is the process of conditionally modifying text&lt;br /&gt;
#*You have access to all &#039;replacement fields&#039;, TOKENs, and INSERTANS values&lt;br /&gt;
#*You also have easier access to questions, answers, and their properties.&lt;br /&gt;
#&#039;&#039;&#039;Relevance&#039;&#039;&#039; Equation:  A new question attribute controlling question visiblity&lt;br /&gt;
#*If there is a relevance equation, then the question is only shown if the relevance evaluates to true.&lt;br /&gt;
#*Internally, all array_filter and array_filter_exclude commands become sub-question-level relevance&lt;br /&gt;
#&#039;&#039;&#039;Equation&#039;&#039;&#039; Question Type:  A new question type that saves calculations or reports to the database&lt;br /&gt;
#*It is like a Boilerplate question, but its contents are saved to the database even if you set &amp;quot;Always Hide this Question&amp;quot;&lt;br /&gt;
#&#039;&#039;&#039;SGQA&#039;&#039;&#039;:  This is how variables are named in LimeSurvey &amp;lt;= 1.91+&lt;br /&gt;
#*Stands for Survey-Group-Question-Answer&lt;br /&gt;
#*SGQA variable names look like 123X5X382X971, and may have sub-question suffixes.&lt;br /&gt;
#*These variable names are specific to the underlying S/Q/G/A database codes, so often need to be changed&lt;br /&gt;
#&#039;&#039;&#039;Question Code&#039;&#039;&#039;:  This is the preferred variable name for EM&lt;br /&gt;
#*This can be a descriptive name indicating the purpose of the question, making it easier to read complex logic&lt;br /&gt;
#*Although not required to be unique in &amp;lt;= 1.91+, it must be unique if you want to use EM&lt;br /&gt;
#*Valid question codes should NOT start with a number, so when using the question code to number your questions, simply use &amp;quot;q1&amp;quot;, or &amp;quot;q1a&amp;quot; or &amp;quot;g1q2&amp;quot;.&lt;br /&gt;
#*This is what currently becomes the variable name if you export data to SPSS or R, so if you do statistical analysis, you probably already made this unique.&lt;br /&gt;
&lt;br /&gt;
==Do I have to use EM?== &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
The short answer is No (but also yes).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
EM is fully backwards-compatible with existing surveys.  So, if you are happy to use Conditions and Assessments in the style that LimeSurvey used in versions &amp;lt;= 1.91+, you can continue to do so.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
However, EM completely replaces how LimeSurvey internally deals with Conditions.  Although you can still use the Conditions Editor to create and manage conditions, LimeSurvey 1.92 will convert those to the equivalent Relevance Equations.  As part of the upgrade, LimeSurvey 1.92 will auto-convert all existing Conditions to Relevance Equations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
This should give you the best of both worlds - you can continue using LimeSurvey as you are used to, but will see the Relevance Equation equivalent so you can gradually migrate to Relevance Equations directly whenever you see fit.&lt;br /&gt;
&lt;br /&gt;
==Can I mix use of Conditions and Relevance?== &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
Yes. You can use the Conditions editor for some questions and the Relevance editor for others.  Conditions are auto-converted to Relevance when you save the question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
Note, we assume that if you are using the Conditions editor, that you want those Conditions to over-write any manually entered Relevance equation.  So, if you have existing Conditions and want to manually edit the Relevance, please delete the Conditions for that question first.  Specifically, copy the generated relevance equation to a text editor, use the Conditions menu to delete all of the conditions for that question (which will also delete the relevance), then edit the question and paste the generated relevance equation from the text editor back into the relevance field for that question (and save the question).  If there is enough demand for deleting conditions without deleting the generated relevance equation, we could add a bulk conversion process.&lt;br /&gt;
&lt;br /&gt;
==How should I choose between Conditions and Relevance?== &amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
Here is a list of pros and cons of each style:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Style!!Pros!!Cons&lt;br /&gt;
|-&lt;br /&gt;
|Conditions||1. Nice GUI for creating simple conditions &amp;lt;br/&amp;gt;2. GUI well documented and understood by support team||1. Only supports simple comparisons and does not AND/OR conditions well &amp;lt;br/&amp;gt;2. Cascading conditions work erratically &amp;lt;br/&amp;gt;3. Slow - database intensive, so can slow down long surveys &amp;lt;br/&amp;gt;4. Some reported problems with re-loading conditions &amp;lt;br/&amp;gt;5. GUI doesn&#039;t scale well when there are dozens, hundreds, or thousands of questions &amp;lt;br/&amp;gt;6. May be slow to convert paper-based surveys since must use SGQA names &amp;lt;br/&amp;gt;7. Often need a programmer to custom-code logic needed for complex branching&lt;br /&gt;
|-&lt;br /&gt;
|Relevance||1. Supports very complex logic, including 80+ functions and math/string operators &amp;lt;br/&amp;gt;2. Perfect support for cascading logic &amp;lt;br/&amp;gt;3. Fast - no extra database calls, so supports 1000+ question surveys &amp;lt;br/&amp;gt;4. No problems with re-loading logic since does not require SGQA codes &amp;lt;br/&amp;gt;5. Syntax-highlighting scales to 1000+ question surveys &amp;lt;br/&amp;gt;6. Easy and fast to use for groups wanting to computerize existing paper-based suveys.  &amp;lt;br/&amp;gt;7. Easily supports semi-structured interviews and epidemiological surveys without needing a programmers||1. No GUI for simple conditions - use syntax-highlighting instead &amp;lt;br/&amp;gt;2. New, so support teams have not mastered EM yet.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
The bottom is that if you are happy with how LimeSurvey 1.91+ works, there is no reason to change what you do.&lt;br /&gt;
&lt;br /&gt;
==What are some other benefits of using EM?== &amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
Here are some of the other reasons you might want to use EM.&lt;br /&gt;
#Calculations - you can create any calculation you can think of:&lt;br /&gt;
#*You have access to all common mathematical operators and functions&lt;br /&gt;
#*You have access to 70+ mathematical, date, and string processing functions&lt;br /&gt;
#*It is fairly easy for developers to add new functions if users need them&lt;br /&gt;
#Storing Calculations to Database&lt;br /&gt;
#*You can now compute simple and complex calculations and/or scale scores AND have them stored in the database without needing JavaScript.&lt;br /&gt;
#*You use the Equation question type to accomplish this.&lt;br /&gt;
#Assessments&lt;br /&gt;
#*You can now create assessments or scale scores from any question type, not just the subset that used to be supported&lt;br /&gt;
#*You can use Tailoring to show running or total assessment scores anywhere needed - even on the same page&lt;br /&gt;
#*You have more control over the reports generated based upon those assessment scores&lt;br /&gt;
#*You can store assessment scores in the database without needing JavaScript&lt;br /&gt;
#*You can hide assessment scores without needing JavaScript or CSS&lt;br /&gt;
#Replacement Fields&lt;br /&gt;
#*Instead of using {INSERTANS:SGQA}, you can just use the Question Code - this makes it easier to read and validate.&lt;br /&gt;
#*This also avoids the common need to edit questions to change the SGQA code to make everything work.&lt;br /&gt;
#Tailoring - you can conditionally display text based upon other values&lt;br /&gt;
#*Use the appropriate title for a subject, like (e.g. &amp;quot;Hello &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Mr./Mrs.] Smith&amp;quot;)&lt;br /&gt;
#*Output gramatically correct sentences based when singular/plural matter:  (e.g. &amp;quot;You have 1 child&amp;quot; vs. &amp;quot;You have 2 children&amp;quot;)&lt;br /&gt;
#*Appropriately conjugate verbs and decline nouns based upon subject&#039;s gender and plurality.&lt;br /&gt;
#New Variable Attributes - you can access the following to do your tailoring:&lt;br /&gt;
#* (no suffix) -  an alias for qcode.code&lt;br /&gt;
#*.code - the selected response code for the question if it is relevant (otherwise blank), or the text value if it is not a coded question&lt;br /&gt;
#*.NAOK - same as .code, but can be part of calculations or lists even if irrelevant&lt;br /&gt;
#*.value - the assessment value for the question if it is relevant (otherwise blank), or the text value if it is not a coded question&lt;br /&gt;
#*.valueNAOK - same as .value, but can be part of calculations or lists even if irrelevant&lt;br /&gt;
#*.shown - the answer as displayed to the user (this is what {INSERTANS:xxx}  does)&lt;br /&gt;
#*.qid - the question ID&lt;br /&gt;
#*.gid - the group ID&lt;br /&gt;
#*.sgqa - the SGQA value for the question&lt;br /&gt;
#*.jsName - the correct javascript variable name for the question, regardless whether defined on this page or another&lt;br /&gt;
#*.qseq - the question sequence (starting from 0)&lt;br /&gt;
#*.gseq - the group sequence (starting from 0)&lt;br /&gt;
#*.mandatory - whether the question is mandatory (Y/N)&lt;br /&gt;
#*.question - the text of the question&lt;br /&gt;
#*.relevance - the relevance equation for the question&lt;br /&gt;
#*.grelevance - the relevance equation for the group&lt;br /&gt;
#*.relevanceStatus - whether or not the question is currently relevant (1 if true, 0 if false)&lt;br /&gt;
#*.type - the question type (the one character code)&lt;br /&gt;
#Dynamic On-Page Changes&lt;br /&gt;
#*All Relevance, Calculation, and Tailoring works dynamically on a page - so changes in values instantly update the page&lt;br /&gt;
#*So, you have questions dynamically appear/disappear based upon whether they are relevant&lt;br /&gt;
#*Questions are also dynamically tailored based upon responses on the page, so you can see running totals, tailored sentences and customized reports.&lt;br /&gt;
#New Data Entry Screen&lt;br /&gt;
#*In addition to using the current data-entry system, you can just use Survey-All-In-One.&lt;br /&gt;
#*This supports the on-page relevance and tailoring, so data entry clerks can quickly tab through and they will only have to enter the relevant responses&lt;br /&gt;
#*This can be critical if your data entry person needs to see the tailoring, which is also dynamic.&lt;br /&gt;
#Eliminates the need for most custom JavaScript&lt;br /&gt;
#*EM easily supports complicated computations, scoring, tailoring and conditional logic.&lt;br /&gt;
#*Some things will still need JavaScript (like custom layouts and conditionally hiding question sub-elements), but your JavaScript can use the EM functions so that you can access questions by their Qcode instead of SGQA, and access any of the question properties listed above.&lt;br /&gt;
&lt;br /&gt;
==What are some other helpful new features enabled by EM?== &amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
Regardless of whether you continue to use the Conditions Editor or manually compose Relevance Equations, you get these additional benefits:&lt;br /&gt;
#You can create more complex validation criteria&lt;br /&gt;
#*All of the advanced question attribute (like max_answers, min_num_value_n, max_num_value) can use Expressions.  So, you min/max criteria can be easily adjusted based upon prior responses, even if they are on the same page.&lt;br /&gt;
#*EM also handles all regular-expression-based validation, so you can robustly combine preg and equation-based question attributes.&lt;br /&gt;
#Easy Re-ordering (or deleting) of Questions and Groups&lt;br /&gt;
#*Prior to version 1.92, you could not re-order questions or groups if LimeSurvey thought that such-re-ordering could break conditions in which they were used.  Similarly, you could not delete questions if any other questions depended upon them.&lt;br /&gt;
#*With EM&#039;s syntax highlighting, it is easy to see and validate whether you try to use questions before they are declared.  So, we now let you re-order or delete questions and groups whenever you like.  EM will update all of the syntax highlighting to show you potential errors.&lt;br /&gt;
#*The re-order questions view has been enhanced to help with such review.  It now shows the question&#039;s relevance equation and tailoring, so you can immediately see whether any variables become pink (meaning they are used before being declared).&lt;br /&gt;
#The Question/Group Navigation Index is always available and accurate&lt;br /&gt;
#*Prior to version 1.92, these indexes were not available if there were complex conditions&lt;br /&gt;
#*With EM, we can guarantee that they are accurate.&lt;br /&gt;
#*Subjects can even jump back, to a prior question, change the answer, then jump forward (or submit)&lt;br /&gt;
#**When jumping forwards, EM will re-validate all of the intervening questions/groups.&lt;br /&gt;
#**If any questions become irrelevant, they will be NULLed in the database so that your data is internally consistent&lt;br /&gt;
#**If any questions become relevant or newly fail mandatory or validation rules, EM will stop on that page and force the user to answer those questions before jumping to their final destination.&lt;br /&gt;
#Auto-conversion of Conditions to Relevance&lt;br /&gt;
#*When you upgrade your database, all existing surveys that have conditions will have relevance equations generated for them&lt;br /&gt;
#*Whenever you import a survey, relevance equations will be created as needed&lt;br /&gt;
#*Whenever you add, delete, or modify conditions, EM will generate the appropriate relevance equation.&lt;br /&gt;
#Convenient Syntax Highlighting&lt;br /&gt;
#*When EM shows the relevance equation, it will show the Qcode, even if you entered an SGQA code, as we assume this will be easier to read.&lt;br /&gt;
#*All variables are color coded to show whether they were declared before or after the current question (or before or after the current group).  This lets you quickly detect and fix cases where you try to use variables for relevance (including array_filter), tailoring, or validation equations prior to declaring them.&lt;br /&gt;
#*In addition, if you hover your mouse over the color-coded variable, you will see the most important metadata about that question.   This includes the Group Sequence #, Question Sequence #, Qcode, Text of the question, and all available answer choices (if it is a question type with enumerated answer choices).&lt;br /&gt;
#**The list of answer choices uses this syntax:  &#039;answers&#039;:{key:val, ... }.&lt;br /&gt;
#**&#039;&#039;key&#039;&#039; has the syntax &#039;&#039;&#039;&#039;scale~code&#039;&#039;&#039;&#039; where &#039;&#039;scale&#039;&#039; is the answer scale (e.g. for dual scale), and &#039;&#039;code&#039;&#039; is the answer code.&lt;br /&gt;
#**&#039;&#039;val&#039;&#039; has the syntax &#039;&#039;&#039;&#039;value~shown&#039;&#039;&#039;&#039; where &#039;&#039;value&#039;&#039; is the assessment value (if using assessments, otherwise &#039;&#039;code&#039;&#039;)(e.g. Qcode.value), and &#039;&#039;shown&#039;&#039; is the display value as seen by the subject (e.g. Qcode.shown)&lt;br /&gt;
#**This means that many surveys can use calculations without needing assessment mode.  If you have enumerated answer options  that are unique, non-decimal, and non-negative, you can simply do calculations on the Qcode.code values.&lt;br /&gt;
#Easy review of entire survey logic and content&lt;br /&gt;
#*There is a new Show Survey Logic feature that lets you see everything about the survey (or group or question) on a single page.&lt;br /&gt;
#*It shows the Group, Question, Sub-Question, and Answer-level details for the selected scope (survey vs. group vs. question)&lt;br /&gt;
#*It also shows the relevance, sub-question-level relevance (for array_filter and array_filter_exclude), and generated validation equation (for preg and any validation rules like min/max sum/number of values), and all non-blank question attributes.&lt;br /&gt;
#*Everything is syntax-highlighted so that you can see potential syntax errors (like unbalanced parentheses or use of variables before they were declared)&lt;br /&gt;
#*The syntax-highligting supports rapid navigation and editing of the survey.&lt;br /&gt;
#**If you click on a variable name, it opens a browser window (or tab) that shows you that question and lets you edit it.&lt;br /&gt;
#**If you click on a group name, it opens a browser window (or tab) showing the group-reorder view so that you can easily move questions around.&lt;br /&gt;
#**All of the question attributes are also syntax highlighted.  This lets you set and see expressions within advanced question options (like basing the max/min number/sum of values on an expression)&lt;br /&gt;
#*The EM author used similar view (a little cleaner) to let his collaborating Epidemiologists and Institutional Review Board validate and authorize surveys with thousands of questions in highly branched and tailored structured interviews&lt;br /&gt;
&lt;br /&gt;
==How Backwards Compatible is EM with 1.91+?== &amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
LimeSurvey 1.92 is fully backwards-compatible with 1.91+ with one exception/caveat:  1.92 handles less-than / greater-than comparisons against empty values differently than 1.91+.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
One of the LimeSurvey demo surveys uses a set of conditions that translates to this relevance equation:  {(age &amp;lt; 16) or (age == 20) or ... or (age == 80)}. In LimeSurvey 1.91+, (age &amp;lt; 16) is FALSE when there is no answer (the value is blank).  However, in LimeSurey 1.92, (age &amp;lt; 16) is TRUE when there is no answer, since both PHP and JavaScript treat blank as 0 in mathematical comparisons.  Thus, 1.91+ would hide that question when age was unanswered, but 1.92 would show it.  We went to great pains to prevent this, but since we needed to have the Expressions generate identical results in PHP and JavaScript, there was no way to make 1.92 treat &amp;quot;&amp;quot; &amp;lt; 16 as FALSE.  Fortunately, there is an easy work-around for this.  If you want (age &amp;lt; 16) to be FALSE, then use this expression instead: {(!is_empty(age) and age &amp;lt; 16)}.  You can use the new [[Show Logic File|Survey Logic File]] view to quickly identify and fix any such comparisons in your survey.&lt;br /&gt;
&lt;br /&gt;
=Getting Started= &amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
The best way to get started with EM is to:&lt;br /&gt;
*Install the latest stable version from http://www.limesurvey.org/en/download &lt;br /&gt;
*Import and explore the [[Expression Manager Sample Surveys|sample surveys]].&lt;br /&gt;
*Explore the [[Expression Manager HowTos|use cases and HowTos]] and [[Expression Manager Examples|step-by-step examples]].&lt;br /&gt;
*Explore the EM documentation (this page)&lt;br /&gt;
*Examine the built-in EM test suite&lt;br /&gt;
**From any survey, under tools, select the EM option&lt;br /&gt;
**Available Functions lists the 70+ functions and syntax&lt;br /&gt;
**Unit Tests of Isolated Expressions&lt;br /&gt;
***shows examples of using all EM functions and operators, and the PHP and JavaScript results&lt;br /&gt;
***note there are few functions that generate different results in the PHP and JavaScript versions, so this page lets you plan your EM logic accordingly.&lt;br /&gt;
&lt;br /&gt;
=What Functionality does Expression Manager Extend/Replace? (LimeSurvey &amp;lt;= 1.91+)= &amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conditions =&amp;gt; Relevance== &amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
Conditions controlled which  questions are visible.  The general syntax was &#039;&#039;SGQA operator Value&#039;&#039;, like &#039;&#039;111X2X3 == &amp;quot;Y&amp;quot;&#039;&#039;.  Conditions could be ANDed or ORed together, but mixing ANDs and ORs was difficult.  The conditions themselves were stored in a separate table, and large portion of LimeSurvey&#039;s code was devoted to managing Conditions.  Because of extensive database access, processing large numbers of conditions could cause noticable performance problems.  Furthermore, once you had conditions assigned to questions or groups, you were often not allowed to re-order or delete them.&lt;br /&gt;
&lt;br /&gt;
==Assessments =&amp;gt; Equations and  Micro-Tailoring== &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
Assessments let users create scale scores from a collection of questions.  However, they could not dynamically change on the current page, and their values were not stored to the database.&lt;br /&gt;
&lt;br /&gt;
==Replacements =&amp;gt; Micro-Tailoring== &amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
Users could tailor some messages and questions based  upon prior responses.  For example, a question might be, &#039;&#039;{TOKEN:FIRSTNAME}, you said {INSERTANS:111X3X4} was your favorite sport&#039;&#039;.  However, it was not possible to do conditional tailoring (like say &amp;quot;Mr.&amp;quot; or &amp;quot;Mrs.&amp;quot; depending upon the person&#039;s gender), or conjugate verbs or decline nouns without fancy JavaScript.  Authors could implement surveys that seemed to tailor questions, but it required separate questions for each permutation, and complex conditions to decide which questions to display.&lt;br /&gt;
&lt;br /&gt;
==Validation== &amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
Question could be validated with Regular expressions, or minimum/maximum values, or let an SGQA response serve as the minimum or maximum value.  However, validations could not be based upon calculations of other variables without fancy JavaScript.&lt;br /&gt;
&lt;br /&gt;
==Equations== &amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
Equations were not supported without fancy JavaScript.&lt;br /&gt;
&lt;br /&gt;
==Equation Question Type== &amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
Equations could not be saved to the database (e.g. the final score for an assessment) without fancy JavaScript.&lt;br /&gt;
&lt;br /&gt;
=How Will Expression Manager Replace/Extend That Functionality?= &amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
The Expression Manager is a new core module within LimeSurvey that makes it much easier to support the type of complex functionality that used to require custom JavaScript.  It is also replacing the way LimeSurvey currently manages Conditions and Assessments.&lt;br /&gt;
&lt;br /&gt;
==New Terminology When Referring to Expression Manager (EM)== &amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
EM &amp;quot;thinks&amp;quot; of its functionality in the following terms:&lt;br /&gt;
*&#039;&#039;&#039;Relevance-based Branching&#039;&#039;&#039; - if a question is relevant, then ask it, otherwise don&#039;t (e.g. make it invisible, and mark it as NULL in the database).  There is a new Relevance field for all Question types, and also for each Group (so you can apply a set of conditions to an entire group without having to copy the same condition to each question, and/or combine group and question-level conditional logic).&lt;br /&gt;
*&#039;&#039;&#039;Tailoring&#039;&#039;&#039; - Once you know which questions should be asked, tailoring (sometimes called &#039;&#039;piping&#039;&#039;) specifies how the question should be asked. This lets you support not only simple subsitution (like {TOKEN:FIRSTNAME}), but also conjugation of verbs and declination of nouns based upon the gender or number of your subjects.  It also lets you change the message you deliver to a subject based upon whether they answered (or how they answered) other questions.&lt;br /&gt;
*&#039;&#039;&#039;Equations&#039;&#039;&#039; - EM adds a new question type called Equation which stores the result of an Expression.  These equations results are computed and written to the database, even if you hide them on the page.  Thus, they are useful for hidden scoring calculations, navigation based upon complex equations, assessments, and reports that should be generated and easily available within the database.&lt;br /&gt;
&lt;br /&gt;
===Relevance and Cascading Relevance=== &amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
Every question type now has a Relevance option which controls whether the question is displayed.  EM processes each of the Relevance Equations in the order they should appear in the survey.  If the expression is true (or missing - to support legacy surveys), the question will be displayed. If it is not relevant, then the question will be hidden, and the value will be NULLed in the database.  If there are no relevant questions in a group, the entire group will be skipped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
Moreover, if any of the variables within an expression is irrelevant, then the expression always evaluates to false.  This enables Cascading Relevance so that you do not have to write very long Relevance equations for each question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
Say you have 5 questions Q1-Q5, and you only want to show Q2 if Q1 was answered, and Q3 if Q2 was answered, etc.  The relevance equations might be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Question Code!!Relevance!!Question&lt;br /&gt;
|-&lt;br /&gt;
|Q1||1||What is your name?&lt;br /&gt;
|-&lt;br /&gt;
|Q2||Q1||{Q1}, how old are you?&lt;br /&gt;
|-&lt;br /&gt;
|Q3||Q2||So, you are {Q2} years old.  Are you married?&lt;br /&gt;
|-&lt;br /&gt;
|Q4||Q3 == &amp;quot;Y&amp;quot;||{Q1}, how long have you been married?&lt;br /&gt;
|-&lt;br /&gt;
|Q5||Q4||How many children do you have, {Q1}?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
The relevance calculations also work in JavaScript - so you could put all the above questions on one page and it would still work as expected.  In fact, EM totally replaces how EM processes Survey vs. Group vs. Question-at-a-time survey formats.  They now all use the exactly same navigation engine so they work identically regardless of survey style.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
As long as you are on the same page, any data you entered will still be there, just hidden.  So, if you enter some information, then choose an option that makes them irrelevant, then make them relevant again, your answers will still be available.  However, as soon as you move to a different page, all irrelevant responses will be lost to integrity of the dataset.&lt;br /&gt;
&lt;br /&gt;
===Group-Level Relevance=== &amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
Expression Manager also supports group-level relevance.  This makes it easier to implement looping.   Say you want to collect information about up to 10 entities (such a products or people in a household), where you first deterimine how many entities need follow-up (such as by asking how many people live in a household, or having people check which products they like from a long list).  After knowning how many entities need follow-up, you can use Group-level relevance like {count &amp;gt;= 1}, {count &amp;gt;=2}, ... {count &amp;gt;= 10} for each of the 10 groups of follow-up questions.  Within each group, you can have question-level conditional logic (e.g. gender or age-specific follow-up questions for each subject).  The question and group-level relevance equations are ANDed together to determine which should be shown.&lt;br /&gt;
&lt;br /&gt;
===Tailoring / Piping=== &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
Anything within curly braces is now treated as an Expression (with one exception described below).  Expressions have acccess to all of the LimeReplacementFields, all of the variables (via several aliases), all typical equation operators (mathematical, logical, and comparison), and dozens of functions (that even work dynamically on the client-side).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
Using these equations, you can do things such as:&lt;br /&gt;
#Conditionally show tailored messages to the respondants based upon prior responses&lt;br /&gt;
#Create Assessments and show Assessment results (or conditionally branch or show messages) based upon those results, all without using the Assessments module itself&lt;br /&gt;
#Conjugate verbs and decline nouns within questions, answers, and reports.&lt;br /&gt;
#Show summaries of responses before the &amp;quot;Show your answers&amp;quot; page at the end of the survey&lt;br /&gt;
&lt;br /&gt;
===Equations=== &amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
There is a new question type called  Equation.  It is like a Boilerplate questions, except that it stores the value of what is displayed in the database.  So, if the Equation Question text contains an Assessment computation, that value would be stored in the database in a variable that can be displayed within public or private statistics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
This solves a common request for storing Assessment scores within the database&lt;br /&gt;
&lt;br /&gt;
==Syntax== &amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
Anything contained within curly braces is now considered an Expression (with one exception:  there must be no leading or trailing whitespace - this is needed to ensure the Expression Manager does not try to process embedded JavaScript).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
Note, it is OK for expressions to span multiple lines, as long as there is no whitespace after the opening  curly brace or before the closing curly brace.  This is especially helpful for nested if() statements like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;{if(is_empty(PFTotals),&lt;br /&gt;
 &#039;&#039;,&lt;br /&gt;
 if(PFTotals &amp;gt;= -5 &amp;amp;&amp;amp; PFTotals &amp;lt;= -4,&lt;br /&gt;
   &#039;Very Soft&#039;,&lt;br /&gt;
   if(PFTotals &amp;gt;= -3 &amp;amp;&amp;amp; PFTotals &amp;lt;= -2,&lt;br /&gt;
     &#039;Soft&#039;,&lt;br /&gt;
     if(PFTotals == -1,&lt;br /&gt;
       &#039;Somewhat Soft&#039;,&lt;br /&gt;
       if(PFTotals == 0,&lt;br /&gt;
         &#039;Moderate&#039;,&lt;br /&gt;
         if(PFTotals == 1,&lt;br /&gt;
           &#039;Somewhat Hard&#039;,&lt;br /&gt;
           if(PFTotals &amp;gt;= 2 &amp;amp;&amp;amp; PFTotals &amp;lt;= 3,&lt;br /&gt;
             &#039;Hard&#039;,&lt;br /&gt;
             if(PFTotals &amp;gt;= 4 &amp;amp;&amp;amp; PFTotals &amp;lt;= 5,&lt;br /&gt;
               &#039;Very Hard&#039;,&lt;br /&gt;
               &#039;&#039;&lt;br /&gt;
             )&lt;br /&gt;
           )&lt;br /&gt;
         )&lt;br /&gt;
       )&lt;br /&gt;
     )&lt;br /&gt;
   )&lt;br /&gt;
 )&lt;br /&gt;
)}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
Expression Manager supports the following syntax:&lt;br /&gt;
*All standard mathematical operators (e.g. +,-,*,/,!)&lt;br /&gt;
*All standard comparison operators (e.g. &amp;lt;,&amp;lt;=,==,!=,&amp;gt;,&amp;gt;=, plus these equivalents:  lt,le,eq,ne,gt,ge)&lt;br /&gt;
*Parentheses (so you can group sub-expressions)&lt;br /&gt;
*Conditional operators (e.g. &amp;amp;&amp;amp;,| | and these equivalents: and,or)&lt;br /&gt;
*Single and double-quoted strings (which can each embed strings with the other quote type)&lt;br /&gt;
*Comma operator (so can have a list of expressions and just return the final result)&lt;br /&gt;
*Assignment operator (=)&lt;br /&gt;
*Pre-defined variables (to refer to questions, question attributes, and responses) - e.g. all of the SGQA codes&lt;br /&gt;
*Pre-defined functions (there are already 70+, and it is easy to add more)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
EM syntax follows normal operator precedence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:140--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Level!!Operator(s)!!Description&lt;br /&gt;
|-&lt;br /&gt;
|1||()||parentheses for grouping or calling functions&lt;br /&gt;
|-&lt;br /&gt;
|2||! - +||unary operators: not, negation, unary-plus&lt;br /&gt;
|-&lt;br /&gt;
|3||* /||times, divide&lt;br /&gt;
|-&lt;br /&gt;
|4||+ -||plus, minus&lt;br /&gt;
|-&lt;br /&gt;
|5||&amp;lt; &amp;lt;= &amp;gt; &amp;gt;= lt le gt ge||relative comparisons&lt;br /&gt;
|-&lt;br /&gt;
|6||== != eq ne||equality comparisons&lt;br /&gt;
|-&lt;br /&gt;
|7||and||logical AND&lt;br /&gt;
|-&lt;br /&gt;
|8||or||logical OR&lt;br /&gt;
|-&lt;br /&gt;
|9||=||assignment operator&lt;br /&gt;
|-&lt;br /&gt;
|10||,||comma operator&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
Note, for consistency between JavaScript and PHP, the plus operator (+) does addition if both operands are numeric, but does concatenation if both parts are non-numeric strings.  However, we recommend using the join() function for concatenation, as that makes your intent more clear, and avoids unexpected results if you were expecting strings but got numbers instead (or vice versa).&lt;br /&gt;
&lt;br /&gt;
===Caution about using Assignment Operator (=)=== &amp;lt;!--T:142--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:143--&amp;gt;&lt;br /&gt;
Note, you should avoid using the assignment operators unless absolutely necessary, since they may cause unexpected side-effects.  For example, if you change the value of a previous response, the cascading relevance and validation logic between that question and the current question is not re-computed, so you could end up with internally inconsistent data (e.g. questions that stay answered but should have been NULLed, or questions that are skipped but should have been answered).  In general, if you want to assign a value to a variable, you sould create an Equation question type, and use an expression to set its value.  However, there are some rare times that people really need this operator, so we made it available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:144--&amp;gt;&lt;br /&gt;
To help caution you about this operator, it is shown in red font within the syntax equations (so that you don&#039;t confuse it with &amp;quot;==&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
The main reasons you may want to use assignment are:&lt;br /&gt;
*You need to set the default value for a question that does not accept defaults via equation (such as list radio, where the user interface lets you pick one of the answer options, but does not let you enter an equation).  However, be careful, as LimeSurvey will not be able to validate that your equation generates one of the allowable answers for that question.&lt;br /&gt;
*You need to forcibly change the response to a previous question based upon a later response&lt;br /&gt;
&lt;br /&gt;
==Access to Variables== &amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
Expression Manager provides read-only access to whichever variables we might need.  For backwards compatibility, it provides access to the following:&lt;br /&gt;
*TOKEN:xxx - the value of a TOKEN (e.g. TOKEN:FIRSTNAME, TOKEN:ATTRIBUTE_5)&lt;br /&gt;
*INSERTANS:SGQA - the display value of an answer (e.g. &amp;quot;Yes&amp;quot;)&lt;br /&gt;
*All {XXX} values used by templates&lt;br /&gt;
*In question text, you can use {QID} replaced by the question id and {SGQ} replaced by the SGQA of the question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
In addition, Expression Manager lets you refer to variables by the Question Code (the &#039;title&#039; column in the questions table within the database).  This is also the variable label used when you export your data to SPSS, R, or SAS.  For example, if you have questions about name, age, and gender, you could call those variables &#039;&#039;name&#039;&#039;, &#039;&#039;age&#039;&#039;, and &#039;&#039;gender&#039;&#039; instead of &#039;&#039;12345X13X22&#039;&#039;, &#039;&#039;12345X13X23&#039;&#039;, and  &#039;&#039;12345X13X24&#039;&#039;.  This makes equations easier for everyone to read and validate the logic, plus makes it possible to shuffle questions around without having to keep track of group or question numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
Furthermore, Expression Manager lets you access many properties of the Question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:150--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax!!Meaning!!Example!!Example Result&lt;br /&gt;
|-&lt;br /&gt;
|Qcode||an alias for Qcode.code||{implode(&#039;,&#039;,name,gender)}||&#039;Tom&#039;,&#039;M&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.code||the selected response code for the question if it is relevant (otherwise blank), or the text value if it is not a coded question||{implode(&#039;,&#039;,name.code,gender.code)}||&#039;Tom&#039;,&#039;M&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.NAOK||same as Qcode - see discussion of NAOK||{gender.NAOK}||&#039;M&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.value||the assessment value for the question if it is relevant (otherwise blank), or the text value if it is not a coded question||{gender.value}||&#039;1&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.valueNAOK||same as Qcode.value - see discussion about NAOK||{gender.valueNAOK}||&#039;1&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.shown||the dispay value for the question||{implode(&#039;,&#039;,name.shown,gender.shown)}||&#039;Tom&#039;,&#039;Male&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.question||the text of the question||{gender.question}||&#039;What is your gender?&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.mandatory||whether the question is mandatory (Y/N)||{gender.mandatory}||&#039;N&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.qid||the internal question number (not the sequential number)||{gender.qid}||337&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.type||the question type||{gender.type}||&#039;G&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.jsName||the correct javascript name for the question, regardless whether declared on or off this page||{gender.jsName}||&#039;java1827X3X337&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.gid||the internal group number (not the sequential number)||{gender.gid}||3&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.qseq||the sequential number of the question, starting from 0||{gender.qseq}||5&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.gseq||the sequential number of the group, starting from 0||{gender.gseq}||1&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.relevanceStatus||whether the question is currently relevant (0 or 1)||{gender.relevanceStatus}||1&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.relevance||the question-level relevance equation||{gender.relevance}||&#039;!is_empty(name)&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.grelevance||the  group-level relevance equation||{gender.grelevance}||&#039;num_children &amp;gt;= 5&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.sgqa||the SGQA value for this question||{gender.sgqa}||&#039;1827X3X337&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Security issue=== &amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
For security issues, text entered by user are filtered. Some caracter are replaced by HTML entities.&lt;br /&gt;
* &amp;amp; by &amp;amp;amp;amp;&lt;br /&gt;
* &amp;lt; by &amp;amp;amp;lt;&lt;br /&gt;
* &amp;gt; by &amp;amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Qcode Variable Naming== &amp;lt;!--T:153--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
Here are the details of how to construct a Qcode (and access some properties) by question type.  In general, Qcodes are constructed as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
  QuestionCode . &#039;_&#039; . SubQuestionID . &#039;_&#039; . ScaleId&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:208--&amp;gt;&lt;br /&gt;
For comment and other, question code are QuestionCode_comment and QuestionCode_other&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Type!!Description!!Code!!SubQs!!Answer Options!!Scales!!Answer Code!!Answer Shown!!Relevance&lt;br /&gt;
|-&lt;br /&gt;
|5||5 Point Choice Radio-Buttons||Q1|| ||1-5|| ||{Q1}||{Q1.shown}||{Q1==3}&lt;br /&gt;
|-&lt;br /&gt;
|B||Array (10 Point Choice) Radio-Buttons||Q2||L1-L6||1-10|| ||{Q2_L2}||{Q2_L2.shown}||{Q2_L2==7}&lt;br /&gt;
|-&lt;br /&gt;
|A||Array (5 Point Choice) Radio-Buttons||Q3||1-5||1-5|| ||{Q3_1}||{Q3_1.shown}||{Q3_1&amp;gt;=3}&lt;br /&gt;
|-&lt;br /&gt;
|1||Array (Flexible Labels) Dual Scale||Q4||sq1-sq5||0:a1-a3||1:b1-b3||{Q4_sq1_0}||{Q4_sq1_1.shown}||{Q4_sq1_1==&#039;b2&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|H||Array (Flexible) - Column Format||Q5||1-5||s,m,t|| ||{Q5_1}||{Q5_1.shown}||{Q5_1==&#039;s&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|F||Array (Flexible) - Row Format||Q6||F1-F5||1-5|| ||{Q6_F3}||{Q6_F3.shown}||{Q6_F3==4}&lt;br /&gt;
|-&lt;br /&gt;
|E||Array (Increase/Same/Decrease) Radio-Buttons||Q7||1-7||I,S,D|| ||{Q7_4}||{Q7_4.shown}||{Q7_4==&#039;D&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|:||Array (Multi Flexi) 1 To 10||Q8||ls1,todo,ls2||min,max,avg|| ||{Q8_ls1_max}||{Q8_ls2_avg.shown}||{Q8_ls2_min==7}&lt;br /&gt;
|-&lt;br /&gt;
|;||Array (Multi Flexi) Text||Q9||hp,st,sw||1st,2nd,3rd|| ||{Q9_hp_3rd}||{Q9_hp_3rd.shown}||{Q9_hp_3rd==&#039;Peter&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|C||Array (Yes/Uncertain/No) Radio-Buttons||Q10||1-5||Y,N,U|| ||{Q10_1}||{Q10_1.shown}||{Q10_3==&#039;Y&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|X||Boilerplate Question||Q11|| || || || ||{Q11.shown}||&lt;br /&gt;
|-&lt;br /&gt;
|D||Date||Q12|| || || ||{Q12}||{Q12.shown}||&lt;br /&gt;
|-&lt;br /&gt;
|*||Equation||Q13|| || || ||{Q13}||{Q13.shown}||{Q13&amp;gt;5}&lt;br /&gt;
|-&lt;br /&gt;
|~124~||File Upload (records number of files uploaded)||Q14|| || || ||{Q14}|| ||{Q14&amp;gt;0}&lt;br /&gt;
|-&lt;br /&gt;
|G||Gender Drop-Down List||Q15|| ||M,F|| ||{Q15}||{Q15.shown}||{Q15==&#039;M&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|U||Huge Free Text||Q16|| || || ||{Q16}||{Q16.shown}||{strlen(Q16)&amp;gt;100}&lt;br /&gt;
|-&lt;br /&gt;
|I||Language Question||Q17|| || || ||{Q17}||{Q17.shown}||{Q17==&#039;en&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|!||List - Dropdown||Q18|| ||1-5|| ||{Q18}||{Q18.shown}||{Q18==3}&lt;br /&gt;
|-&lt;br /&gt;
|L||List Drop-Down/Radio-Button List||Q19|| ||A-Z|| ||{Q19}||{Q19.shown}||{Q19==&#039;X&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|O||List With Comment Drop-Down/Radio-Button List + Textarea||Q20|| ||A-F|| ||{Q20},{Q20comment}||{Q20.shown}||{Q20==&#039;B&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|T||Long Free Text||Q21|| || || ||{Q21}||{Q21.shown}||{strstr(Q21,&#039;hello&#039;)&amp;gt;0}&lt;br /&gt;
|-&lt;br /&gt;
|M||Multiple Choice Checkbox||Q22||A-F|| || ||{Q22_E}||{Q22_E.shown}||{Q22_E==&#039;Y&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|P||Multiple Choice With Comments Checkbox + Text||Q23||A-F|| || ||{Q23_D}, {Q23_Dcomment}||{Q23_D.shown}||{!is_empty(Q23)}&lt;br /&gt;
|-&lt;br /&gt;
|K||Multiple Numerical Question||Q24||self,mom,dad|| || ||{Q24_self}||{Q24_self.shown}||{Q24_self&amp;gt;30}&lt;br /&gt;
|-&lt;br /&gt;
|Q||Multiple Short Text||Q25||A-F|| || ||{Q25_B}||{Q25_B.shown}||{substr(Q25_B,1,1)==&#039;Q&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|N||Numerical Question Type||Q26|| || || ||{Q26}||{Q26.shown}||{Q26 &amp;gt; 30}&lt;br /&gt;
|-&lt;br /&gt;
|R||Ranking Style||Q27||1-4|| || ||{Q27_1}||{Q27_1.shown}||{Q27_1==3}&lt;br /&gt;
|-&lt;br /&gt;
|S||Short Free Text||Q28|| || || ||{Q28}||{Q28.shown}||{Q28==&#039;mine&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|Y||Yes/No Radio-Buttons||Q29|| || || ||{Q29}||{Q29.shown}||{Q29==&#039;Y&#039;}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The reserved &#039;this&#039;, &#039;self&#039;, and &#039;that&#039; variables== &amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
Quite often, you want to evalute all parts of a question, such as counting how many sub-questions have been answered, or summing the scores.  Other times, you want to process just certain rows or columns of a question (such as getting the row or column sums and storing them in the database).  These reserved variables make that process relatively painless.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
The &#039;this&#039; variable is used exclusively within the &amp;quot;Whole question validation equation&amp;quot; and &amp;quot;Sub-question validation equation&amp;quot; advanced question options.  It expands to the variable names of each of the cells within those questions.  So, if you want to make sure that each entry is greater than three, you would set the &amp;quot;Sub-question validation equation&amp;quot; to (this &amp;gt; 3).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
The &#039;self&#039; and &#039;that&#039; variable are more powerful, and serve as macros which are expanded prior to processing equations.  The syntax choices are:&lt;br /&gt;
*self&lt;br /&gt;
*self.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
*self.&#039;&#039;sub-selector&#039;&#039;&lt;br /&gt;
*self.&#039;&#039;sub-selector&#039;&#039;.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
&#039;&#039;suffix&#039;&#039; is any of the normal qcode suffixes (e.g. NAOK, value, shown)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
&#039;&#039;sub-selector&#039;&#039; is one of:&lt;br /&gt;
*comments - only subquestions that are comments (e.g. from multiple choice with comment and list with comment)&lt;br /&gt;
*nocomments - only subquestions that are not comments&lt;br /&gt;
*sq_X - where X is a row or column identifier.  Only sub-questions matching pattern X are selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
*Has any part of a question been answered?  {count(self.NAOK)&amp;gt;0}&lt;br /&gt;
*What is the assessment score for this question?  {sum(self.value)}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
You can also use these to get row and column totals.  Say you have a array of numbers with rows A-E and columns 1-5.&lt;br /&gt;
*What is the grand total?  {sum(self.NAOK)}&lt;br /&gt;
*What is the total of row B?  {sum(self.sq_B.NAOK)}&lt;br /&gt;
*What is the total of column 3? {sum(self.sq_3.NAOK)}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
The &#039;that&#039; variable is like the &#039;self&#039; variable, but lets you refer to other questions.  Its syntax is:&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;.&#039;&#039;sub-selector&#039;&#039;&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;.&#039;&#039;sub-selector&#039;&#039;.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
&#039;&#039;qname&#039;&#039; is the question name without any sub-question extensions.  So, say you create a question &#039;q1&#039;, that is its &#039;&#039;qname&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
*Has any part of question q1 been answered?  {count(that.q1.NAOK)&amp;gt;0}&lt;br /&gt;
*What is the assessment score for q2?  {sum(that.q2.NAOK)}&lt;br /&gt;
*What is the grand total of q3? {sum(that.q3.NAOK)}&lt;br /&gt;
*What is the total of row C in q4?  {sum(that.q4.sq_C.NAOK)}&lt;br /&gt;
*What is the total of column 2 in q4? {sum(that.q4.sq_2.NAOK)}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
The &#039;self&#039; and &#039;that&#039; variables can be used in any relevance,  validation, or tailoring.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
The one caveat is that when you use the [[Show Logic File|Show Logic File]] feature, it will show you the expanded value of &#039;self&#039; and &#039;that&#039;.  This lets you see the actual equation that will be generated so that you (and Expression Manager) can validate that the variables exist.  This may seem confusing since you may see quite lenghty equations.  However, if you edit the question, you will see the original equation using &#039;self&#039; and/or &#039;that&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
Also note that you should not use these variables if (a) you want to explicitly name each variable used in an equation, or (b) use variables that do not have sub-questions (e.g. single response questions).  In those cases, prefixing a variable with &#039;that&#039; is overkill, and you run the risk of getting unexpected results.&lt;br /&gt;
&lt;br /&gt;
==Access to Functions== &amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:172--&amp;gt;&lt;br /&gt;
Expression Manager provides access to mathematical, string, and user-defined functions, as shown below.  It has PHP and JavaScript equivalents for these functions so that they work identically on server-side (PHP) and client-side (JavaScript).  It is easy to add new functions.&lt;br /&gt;
&lt;br /&gt;
===Implemented Functions=== &amp;lt;!--T:173--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:174--&amp;gt;&lt;br /&gt;
The following functions are currently available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:175--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function!!Meaning!!Syntax&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.abs.php abs]||Absolute value||number abs(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.acos.php acos]||Arc cosine||number acos(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.addslashes.php addslashes]||Quote string with slashes||string addslashes(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.asin.php asin]||Arc sine||number asin(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.atan.php atan]||Arc tangent||number atan(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.atan2.php atan2]||Arc tangent of two variables||number atan2(number, number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.ceil.php ceil]||Round fractions up||number ceil(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.checkdate.php checkdate]||Returns true(1) if it is a valid date in gregorian calendar||bool checkdate(month,day,year)&lt;br /&gt;
|-&lt;br /&gt;
|convert_value||Convert a numerical value using a inputTable and outputTable of numerical values||number convert_value(fValue, iStrict, sTranslateFromList, sTranslateToList)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.cos.php cos]||Cosine||number cos(number)&lt;br /&gt;
|-&lt;br /&gt;
|count||count the number of answered (non-blank)questions in the list||number count(arg1, arg12, ..., argN)&lt;br /&gt;
|-&lt;br /&gt;
|countif||Count the number of answered questions in the list equal the first argument||number countif(matches, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|countifop||Count the number of answered questions in the list which pass the criteria (arg op value)||number countifop(op, value, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.date.php date]||Format a local date/time||string date(format &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, timestamp=time()])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.exp.php exp]||Calculates the exponent of e||number exp(number)&lt;br /&gt;
|-&lt;br /&gt;
|fixnum||Display numbers with comma as radix separator, if needed||string fixnum(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.floor.php floor]||Round fractions down||number floor(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.gmdate.php gmdate]||Format a GMT date/time||string gmdate(format &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, timestamp=time()])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.html-entity-decode.php html_entity_decode]||Convert all HTML entities to their applicable characters (always uses ENT_QUOTES and UTF-8)||string html_entity_decode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.htmlentities.php htmlentities]||Convert all applicable characters to HTML entities (always uses ENT_QUOTES and UTF-8)||string htmlentities(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.htmlspecialchars.php expr_mgr_htmlspecialchars]||Convert special characters to HTML entities (always uses ENT_QUOTES and UTF-8)||string htmlspecialchars(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.htmlspecialchars-decode.php expr_mgr_htmlspecialchars_decode]||Convert special HTML entities back to characters (always uses ENT_QUOTES and UTF-8)||string htmlspecialchars_decode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.idate.php idate]||Format a local time/date as integer||string idate(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, timestamp=time()])&lt;br /&gt;
|-&lt;br /&gt;
|if||Excel-style if(test,result_if_true,result_if_false)||if(test,result_if_true,result_if_false)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.implode.php implode]||Join array elements with a string||string implode(glue,arg1,arg2,...,argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.intval.php intval]||Get the integer value of a variable||int intval(number &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, base=10])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.empty.php is_empty]||Determine whether a variable is considered to be empty||bool is_empty(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-float.php is_float]||Finds whether the type of a variable is float||bool is_float(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-int.php is_int]||Find whether the type of a variable is integer||bool is_int(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-nan.php is_nan]||Finds whether a value is not a number||bool is_nan(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-null.php is_null]||Finds whether a variable is NULL||bool is_null(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-numeric.php is_numeric]||Finds whether a variable is a number or a numeric string||bool is_numeric(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-string.php is_string]||Find whether the type of a variable is string||bool is_string(var)&lt;br /&gt;
|-&lt;br /&gt;
|join{{NewIn|2.0|b=130129}}||Join elements as a new string||join(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|list||Return comma-separated list of non-blank values||string list(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.log.php log]|| The logarithm of number to base, if given, or the natural logarithm. ||number log(number,base=e)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.ltrim.php ltrim]||Strip whitespace (or other characters) from the beginning of a string||string ltrim(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, charlist])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.max.php max]||Find highest value||number max(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.min.php min]||Find lowest value||number min(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.mktime.php mktime]||Get UNIX timestamp for a date (each of the 6 arguments are optional)||number mktime([hour [, minute [, second [, month [, day [, year ]]]]]])&lt;br /&gt;
|-&lt;br /&gt;
|modulo-function||The modulo function is &#039;&#039;&#039;not supported&#039;&#039;&#039; yet. You can use the floor() function instead||floor(x/y)==(x/y)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.nl2br.php nl2br]||Inserts HTML line breaks before all newlines in a string||string nl2br(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.number-format.php number_format]||Format a number with grouped thousands||string number_format(number)&lt;br /&gt;
|-&lt;br /&gt;
|pi||Get value of pi||number pi()&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.pow.php pow]||Exponential expression||number pow(base, exp)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.quoted-printable-decode.php quoted_printable_decode]||Convert a quoted-printable string to an 8 bit string||string quoted_printable_decode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.quoted-printable-encode.php quoted_printable_encode]||Convert a 8 bit string to a quoted-printable string||string quoted_printable_encode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.quotemeta.php quotemeta]||Quote meta characters||string quotemeta(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.rand.php rand]||Generate a random integer, see [[Expression Manager Sample Surveys#Randomly Ask One Question Per Group|this example]]||int rand() OR int rand(min, max)&lt;br /&gt;
|-&lt;br /&gt;
|regexMatch||compare a string to a [[Using regular expressions|regular expression]]||bool regexMatch(pattern,input)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.round.php round]||Rounds a number to an optional precision||number round(val &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, precision])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.rtrim.php rtrim]||Strip whitespace (or other characters) from the end of a string||string rtrim(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, charlist])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.sin.php sin]||Sine||number sin(arg)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.sprintf.php sprintf]||Return a formatted string||string sprintf(format, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.sqrt.php sqrt]||Square root||number sqrt(arg)&lt;br /&gt;
|-&lt;br /&gt;
|stddev||Calculate the Sample Standard Deviation for the list of numbers||number stddev(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.str-pad.php str_pad]||Pad a string to a certain length with another string||string str_pad(input, pad_length &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, pad_string])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.str-repeat.php str_repeat]||Repeat a string||string str_repeat(input, multiplier)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.str-replace.php str_replace]||Replace all occurrences of the search string with the replacement string||string str_replace(search, replace, subject)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strcasecmp.php strcasecmp]||Binary safe case-insensitive string comparison||int strcasecmp(str1, str2)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strcmp.php strcmp]||Binary safe string comparison||int strcmp(str1, str2)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strip-tags.php strip_tags]||Strip HTML and PHP tags from a string||string strip_tags(str, allowable_tags)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.stripos.php stripos]||Find position of first occurrence of a case-insensitive string||int stripos(haystack, needle &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, offset=0])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.stripslashes.php stripslashes]||Un-quotes a quoted string||string stripslashes(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.stristr.php stristr]||Case-insensitive strstr||string stristr(haystack, needle &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, before_needle=false])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strlen.php strlen]||Get string length||int strlen(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strpos.php strpos]||Find position of first occurrence of a string||int strpos(haystack, needle &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt; offset=0])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strrev.php strrev]||Reverse a string||string strrev(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strstr.php strstr]||Find first occurrence of a string||string strstr(haystack, needle)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strtolower.php strtolower]||Make a string lowercase||string strtolower(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strtotime.php strtotime]||Parse about any English textual datetime description into a Unix timestamp||int strtotime(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strtoupper.php strtoupper]||Make a string uppercase||string strtoupper(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.substr.php substr]||Return part of a string||string substr(string, start &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, length])&lt;br /&gt;
|-&lt;br /&gt;
|sum||Calculate the sum of values in an array||number sum(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|sumifop||Sum the values of answered questions in the list which pass the criteria (arg op value)||number sumifop(op, value, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.tan.php tan]||Tangent||number tan(arg)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.time.php time]||Return current UNIX timestamp||number time()&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.trim.php trim]||Strip whitespace (or other characters) from the beginning and end of a string||string trim(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, charlist])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.ucwords.php ucwords]||Uppercase the first character of each word in a string||string ucwords(string)&lt;br /&gt;
|-&lt;br /&gt;
|unique||Returns true if all non-empty responses are unique||boolean unique(arg1, ..., argN)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Functions that are Planned or Being Considered=== &amp;lt;!--T:176--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:177--&amp;gt;&lt;br /&gt;
Other functions that are planned (or being considered) but which are not implemented yet include the following.  Some of these are for backwards compatability with another survey tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax!!Meaning!!Comments&lt;br /&gt;
|-&lt;br /&gt;
|e()||returns the value of e||&lt;br /&gt;
|-&lt;br /&gt;
|formatDate(X,PAT)||return the string value of date X formatted according to Java data format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|formatNumber(X,PAT)||return the string value of number X formatted according to Java number format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|getAnsOption(X)||returns the text corresponding to the selected option for answer X||this is the same as X.shown&lt;br /&gt;
|-&lt;br /&gt;
|getAnsOption(X,Y)||returns the text corresponding to the option at index Y of node X||&lt;br /&gt;
|-&lt;br /&gt;
|getRelevance(X)||returns the relevance equation for question X||&lt;br /&gt;
|-&lt;br /&gt;
|getStartTime()||returns the date corresponding to the system time when the interview was started||&lt;br /&gt;
|-&lt;br /&gt;
|getType(X)||returns the string name of the datatype - e.g. *NA* if isNA()||&lt;br /&gt;
|-&lt;br /&gt;
|gotoFirst()||jumps to the first relevant set of questions - this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|gotoNext()||jumps to the next set of relevant questions - this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|gotoPrevious()||jumps to the previous set of relevant questions - this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|isAsked(X)||returns true if the answer is neither *NA*, *INVALID*, nor *UNASKED*||&lt;br /&gt;
|-&lt;br /&gt;
|isInvalid(X)||returns true if the answer is of type *INVALID*||&lt;br /&gt;
|-&lt;br /&gt;
|isNA(X)||returns true if the answer is of type *NA*||&lt;br /&gt;
|-&lt;br /&gt;
|isNotUnderstood(X)||returns true if the answer if of type *HUH*||&lt;br /&gt;
|-&lt;br /&gt;
|isRefused(X)||returns true if the answer is of type *REFUSED*||&lt;br /&gt;
|-&lt;br /&gt;
|isSpecial(X)||returns true if the answer is of type *UNASKED*, *NA*, *REFUSED*, *INVALID*, *UNKNOWN*, or *HUH*||&lt;br /&gt;
|-&lt;br /&gt;
|isUnknown(X)||returns true if the answer is of type *UNKNOWN*||&lt;br /&gt;
|-&lt;br /&gt;
|jumpTo(X)||jump to the group containing the named question -- this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|jumpToFirstUnasked()||jump to the first unasked question &amp;lt;strike&amp;gt; thus bypassing previous answered questions &amp;lt;/strike&amp;gt; this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|lastIndexOf(X,Y)||returns the last index (base 0) of string Y in string X. Returns -1 if Y is not contained within X||&lt;br /&gt;
|-&lt;br /&gt;
|list(X,...)||a string containing a comma separated list of the positive values with &amp;quot;and&amp;quot; separating the last two||&lt;br /&gt;
|-&lt;br /&gt;
|mean(X,...)||returns the mean of a list of values||&lt;br /&gt;
|-&lt;br /&gt;
|numAnsOptions(X)||returns the number of answer options that question X has||&lt;br /&gt;
|-&lt;br /&gt;
|orlist(X,...)||a string containing a comma separated list of the positive values, with &amp;quot;or&amp;quot; separting the last two||&lt;br /&gt;
|-&lt;br /&gt;
|parseDate(X,PAT)||returns the date value of string X parsed with Java date format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|parseNumber(X,PAT)||returns the numerical value of string X parsed with Java number format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|showAllResponsesExcept( questionList,attributeList,attributeTitleList)||questionList = pipe-delimited list of question identifiers; attributeList = pipe-delimited list of attributes (like question#, title, text, type - so you can decide what to show); attributeTitleList = pipe-delimited list of table headers, so can internationalize the report.||&lt;br /&gt;
|-&lt;br /&gt;
|showTheseResponses( questionList,attributeList,attributeTitleList)||questionList = pipe-delimited list of question identifiers; attributeList = pipe-delimited list of attributes (like question#, title, text, type - so you can decide what to show); attributeTitleList = pipe-delimited list of table headers, so can internationalize the report.|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Expression Manager Knows Which Variables are Local== &amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:180--&amp;gt;&lt;br /&gt;
In order to properly build the JavaScript for page, Expression Manager needs to know which variables are set on the page, and what their JavaScript ID is (e.g. for document.getElementById(x)).  It also must know which variables are set on other pages (so that it can ensure that the needed &amp;lt;input type=&#039;hidden&#039; value=&#039;x&#039;&amp;gt; fields are present and populated).&lt;br /&gt;
&lt;br /&gt;
==Cascading Conditions== &amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:182--&amp;gt;&lt;br /&gt;
If any of the variables are irrelevant, the whole equation will be irrelevant (false).  For example, in the following table, N/A means that one of the variables was not relevant&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:183--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Operator!!Example!!a!!b!!Result&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;+ (unary)&amp;lt;/nowiki&amp;gt;||&amp;lt;nowiki&amp;gt;+a&amp;lt;/nowiki&amp;gt;||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|- (unary)||-a||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|!||!a||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|== (or eq)||a == b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|== (or eq)||a == b||N/A||0||false&lt;br /&gt;
|-&lt;br /&gt;
|== (or eq)||a == b||N/A||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|!= (or ne)||a != b||N/A||5|| false&lt;br /&gt;
|-&lt;br /&gt;
|!= (or ne)||a != b||N/A||N/A|| false&lt;br /&gt;
|-&lt;br /&gt;
|!= (or ne)||a != b||N/A||0||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt; (or gt)||a &amp;gt; b||N/A||5|| false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;= (or ge)||a &amp;gt;= b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt; (or lt)||a &amp;lt; b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;= (or le)||a &amp;lt;= b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|and||a and b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|and||a and b||N/A||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|or||a or b||N/A||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|or||a or b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;+&amp;lt;/nowiki&amp;gt;||a + b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|-||a - b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|*||a * b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|/||a / b||5||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|()||(a)||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|(exp)||(a &amp;amp;&amp;amp; b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|(exp) op (exp)||(b + b) &amp;gt; (a &amp;amp;&amp;amp; b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||sum(a,b,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||max(a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||min(a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||implode(&#039;, &#039;,a,b,a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||if(a,a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||is_empty(a)||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|function||is_empty(a)||0 (or blank)|| ||true&lt;br /&gt;
|-&lt;br /&gt;
|function||!is_empty(a)||N/A|| ||false&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Overriding Cascading Conditions=== &amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:185--&amp;gt;&lt;br /&gt;
Say you want to show a running total of all relevant answers.  You might try to use the equation {sum(q1,q2,q3,...,qN)}.  However, this gets translated internally to LEMif(LEManyNA(&#039;q1&#039;,&#039;q2&#039;,&#039;q3&#039;,...,&#039;qN&#039;),&#039;&#039;,sum(LEMval(&#039;q1&#039;),LEMval(&#039;q2&#039;),LEMval(&#039;q3&#039;),...,LEMval(&#039;qN&#039;))).  So, if any of the values q1-qN are irrelevant, the equation will always return false.  In this case, the sum() will show 0 until all questions are answered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:186--&amp;gt;&lt;br /&gt;
To get around this, each variable can have a &amp;quot;.NAOK&amp;quot; suffix (meaning that Not Applicable is OK) added to it.  In such cases, the following behavior occurs.  Say you have a variable q1.NAOK&lt;br /&gt;
#q1 is not added to the LEManyNA() clause&lt;br /&gt;
#LEMval(&#039;q1&#039;) will  continue to check whether the response is relevant, and will return &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt; if it is not (so individual irrelevant responses will be ignored, but they will not void the entire expression).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:187--&amp;gt;&lt;br /&gt;
So, the solution to the running total problem is to use the equation sum(q1.NAOK,q2.NAOK,q3.NAOK,...,qN.NAOK).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
The use of the .NAOK suffix also lets authors design surveys that have several possible paths but then converage on common paths later.  For example, say subjects answer a survey in a way that is outside the normal range of responses.  The author could alert the subjects that they may not get valid results, and ask them whether they really want to  continue with the survey.  If they say Yes, then the rest of the questions will be shown.  The condition for the &amp;quot;rest of the questions&amp;quot; would check whether the initial responses were answered within the normal range OR whether the subject said Yes to the question that is only relevant if they answered outside the normal range.&lt;br /&gt;
&lt;br /&gt;
==How does Expression Manager Support Conditional Micro-Tailoring?== &amp;lt;!--T:189--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:190--&amp;gt;&lt;br /&gt;
Here is an example of micro-tailoring (where Question Type==&#039;expr&#039; means an Equation):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:191--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Question Code!!Relevance!!Question Type!!Question&lt;br /&gt;
|-&lt;br /&gt;
|name||1||text||What is your name?&lt;br /&gt;
|-&lt;br /&gt;
|age||1||text||How old are you?&lt;br /&gt;
|-&lt;br /&gt;
|badage||!is_empty(age)||expr||{(age&amp;lt;16) or (age&amp;gt;80)}&lt;br /&gt;
|-&lt;br /&gt;
|agestop||badage||message||Sorry, {name}, you are too {if( (age&amp;lt;16),&#039;young&#039;,if( (age&amp;gt;80),&#039;old&#039;,&#039;middle-aged&#039;) ) } for this test.&lt;br /&gt;
|-&lt;br /&gt;
|kids||!badage||yesno||Do you have children?&lt;br /&gt;
|-&lt;br /&gt;
|parents||1||expr||{!badage &amp;amp;&amp;amp; kids==&#039;Y&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|numKids||parents||text||How many children do you have?&lt;br /&gt;
|-&lt;br /&gt;
|kid1||parents &amp;amp;&amp;amp; numKids &amp;gt;= 1||text||How old is your first child?&lt;br /&gt;
|-&lt;br /&gt;
|kid2||parents &amp;amp;&amp;amp; numKids &amp;gt;= 2||text||How old is your second child?&lt;br /&gt;
|-&lt;br /&gt;
|kid3||parents &amp;amp;&amp;amp; numKids &amp;gt;= 3||text||How old is your third child?&lt;br /&gt;
|-&lt;br /&gt;
|kid4||parents &amp;amp;&amp;amp; numKids &amp;gt;= 4||text||How old is your fourth child?&lt;br /&gt;
|-&lt;br /&gt;
|kid5||parents &amp;amp;&amp;amp; numKids &amp;gt;= 5||text||How old is your fifth child?&lt;br /&gt;
|-&lt;br /&gt;
|sumage||1||expr||{sum(kid1.NAOK,kid2.NAOK,kid3.NAOK,kid4.NAOK,kid5.NAOK)}&lt;br /&gt;
|-&lt;br /&gt;
|report||parents||yesno||{name}, you said you are {age} and that you have {numKids}.  The sum of ages of your first {min(numKids,5)} kids is {sumage}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
All of these questions can be on a single page (e.g. in the same group), and only the relevant questions will display.  Moreover, as you enter the ages of children, the sum() expression in the last question will dynamically update on the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:193--&amp;gt;&lt;br /&gt;
Expression Manager provides this functionality by surrounding each expression with a named &amp;lt;span&amp;gt; element.  Every time a value changes, it recomputes the expression that should appear in that &amp;lt;span&amp;gt; element and regenerates the display.  You can have dozens, or even hundreds, of such tailored expressions on the same page, and the page will re-display all of them in a single screen refresh.&lt;br /&gt;
&lt;br /&gt;
==Mapping of LimeSurvey 1.91+ to Expression Manager Functionality== &amp;lt;!--T:194--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:195--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Old Feature!!New Feature!!Comments&lt;br /&gt;
|-&lt;br /&gt;
|Conditions||Relevance||You can use very complex conditional equations, and access a broader range of variables&lt;br /&gt;
|-&lt;br /&gt;
|Assessments||Equation||Any assessment scores can be re-structured into an Equation. This both ensures that the score is written to the database, and also lets you see dynamic changes to the score value on the current page&lt;br /&gt;
|-&lt;br /&gt;
|Replacements||Expression Manager||The core engine takes the input string and treats everything within curly braces as an Expression - so it handles all historical replacements types.  To avoid messing up embedded JavaScript, Expression Manager only processes content between curly braces as long as (a)  there is no leading or trailing whitespace within the curly braces - e.g. {expr} is an expression, but { expr}, {expr }, and { expr } are not expressions.  Furthermore, Expression Manager does not process content within its own strings (e.g. {list(&#039;hi&#039;,&#039;there {braces}&#039;)} generates &amp;quot;hi there {braces}&amp;quot;).  It also ignores escaped curly braces (e.g. \{this is not an expression\})&lt;br /&gt;
|-&lt;br /&gt;
|Validation||Expression Manager||The plan is to take the current min/max Question Attributes and have Expression Manager process them.  That way the min/max values can be expressions themselves&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Syntax Highlighting= &amp;lt;!--T:196--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:197--&amp;gt;&lt;br /&gt;
To help with entering and validating expressions, EM provides syntax highlighting with the following features:&lt;br /&gt;
&lt;br /&gt;
==Types and Meanings of Syntax Highlighting== &amp;lt;!--T:198--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:199--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Color!!Sample!!Meaning!!Tooltip!!Comments&lt;br /&gt;
|-&lt;br /&gt;
|tan background||style=&#039;background-color: #eee8aa&#039;|Sample||the whole equation||none||Anything within curly braces that is recognized as an equation (e.g. there is no leading or trailing whitepace) will be color-coded with a tan background to help distinguish it from surrounding text&lt;br /&gt;
|-&lt;br /&gt;
|blue bold text||style=&#039;color:blue; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||function name||meaning and allowable syntax||function names, or things that should be functions since they are followed by an opening parenthesis, are presented in bold blue text.  Tooltips show the meaning and allowable syntax for the function.&lt;br /&gt;
|-&lt;br /&gt;
|grey text||style=&#039;color:grey; background-color:#eee8aa&#039;|Sample||string||none||single and double-quoted strings are shown in grey text&lt;br /&gt;
|-&lt;br /&gt;
|bold maroon text||style=&#039;color:maroon; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on the same page, but after the current question||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on the same page but after the current question is shown in bold maroon text.  This color coding should alert authors to possible errors in question sequencing; but it is allowed since some authors may want this sequence of variables a page, especially for dynamic reports.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold cyan text||style=&#039;color:#4C88BE; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on the same page, prior to the current question||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on the same page and prior to the current question is shown in bold cyan text.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold green text||style=&#039;color:green; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on a prior page||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on a prior page is shown in bold green text.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold pink text||style=&#039;color:#FF00FF; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on a later page||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on a prior page is shown in bold pink text.  These are erorrs since the variable is  being used before it is declareed.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold tan text||style=&#039;color:#996600; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||a lime replacement value||the value||Lime Replacement Strings (like {TOKEN:xxx}, {PRIVACY_MESSAGE}) are shown in bold tan text.  &lt;br /&gt;
|-&lt;br /&gt;
|red text||style=&#039;color:red; background-color:#eee8aa&#039;|Sample||assignment operator||warning message||If you use one of the assignment operator (=) that operator will be displayed in red text.  This is meant to help prevent accidental re-assignment of values when you really meant to check whether a == b instead of  setting the value of a = b.&lt;br /&gt;
|-&lt;br /&gt;
|normal black text||style=&#039;color:black; background-color:#eee8aa&#039;|Sample||punctuation||none||All other punctuation within the expression is shown as normal black text.&lt;br /&gt;
|-&lt;br /&gt;
|red-boxed text||a bold red line surrounds the error||syntax error||description of the error||Any detected syntax errors are shown by surrounding the error with a red box.  The tooltip shows the error.  Examples include unmatched parentheses, use of undefined functions, passing the wrong number of arguments to functions, poorly structured expressions (e.g. missing operators between variables), trying to assign a new value to a read-only variable, trying to assign values to non-variables, or using unsupported syntax.  Note that the syntax error dectection system may only report one error in an expression even if there are multiple errors; however, if any errors are detected, at least one error will be shown.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Relationship to LimeSurvey Ideas / Feature Requests= &amp;lt;!--T:200--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:201--&amp;gt;&lt;br /&gt;
Expression Manager provides complete or partial solutions to each of the following:&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/1 Conditions]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/3/ Answercounts]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/5 Advanced reporting for assessments]&lt;br /&gt;
**partial: Equations let one store the Assessment value in the database, and micro-tailoring can generate simple formatted reports.  Authors can access those Equation values if they have more complex reporting needs.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/6 Assessment reports]&lt;br /&gt;
**partial:  Since Equations store the Assessment score, it should be possible to use Statistics to show distributions of those scores, and Quotas to limit the number of responses with those scores.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/7 Store assessment results for further evaluation]&lt;br /&gt;
**Equations let one store the Assessment value in the database, completely solving this problem&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/22/ More advanced condition rules]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/28 Open Answertable up so that we can alter formatting]&lt;br /&gt;
**partial:  All of the question attributes are available, so authors can create custom AnswerTable equivalents as a Question.  Once implatemented, they can also use the showTheseResponses() or showAllResponsesExecpt() functions&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/37 Export survey results with full questions to include images]&lt;br /&gt;
**since Tailoring has access to the full question text, it can include images in the export&lt;br /&gt;
**if subjects choose Print Your Answers after finishing the survey, those printouts will be fully tailored&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/63 List of question codes and SGQA identifiers]&lt;br /&gt;
**The Show Survey Logic view shows that mapping (plus much more information)&lt;br /&gt;
**In addition, you no longer have to use SGQA codes to refer to variables - you can use the Question code/title.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/69 Branch/jump to another question (earlier or later) based on current question]&lt;br /&gt;
**You can use the Navigation Index for this in most cases&lt;br /&gt;
**Once implemented, you can use the JumpTo() function.  Like the Navigation Index, if you try to jump forward, it will stop on an intervening page if there are any of the relevant mandatory questions are unanswered, or if any relevant questions fail validation tests.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/86 set quota for total responses]&lt;br /&gt;
**If the final question is an Equation that flags a survey as completed (so is NULL if a respondant does not get to that page), you can use Quotas on that question to control the number of completed responses.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/101 Review all conditions]&lt;br /&gt;
**The [[Show Logic File|Show Logic File]] view shows this (and much more)&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/105 Review all questions + Review all groups]&lt;br /&gt;
**The [[Show Logic File|Show Logic File]] view shows this (and much more)&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/107 How to visualize questions, logic &amp;amp; conditions]&lt;br /&gt;
**The [[Show Logic File|Show Logic File]] view shows this (and much more)&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/113 Offline Surveys]&lt;br /&gt;
**Running a survey with all of the questions on the same page would let you do off-line data collection  (e.g. email the html page and associated JavaScript).  However, you would still want a way to submit the results so that they did not get lost.  It may be possible to use Save As HTML to save partially completed responses.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/120 Remove INSERTANS from question text at survey results]&lt;br /&gt;
**INSERTANS is no longer needed.  You can refer to a variable by its SGQA code (without prefixing it with INSERTANS:), or by its question code.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/137 Informed Consent and Authorization Functionality]&lt;br /&gt;
**You can show the informed consent on the welcome page, then ask any additional questions needed (to ensure they meet the study inclusion/exclusion criteria), and ask them a Yes/No question whether they give their consent.  Then, make all of the remaining questions conditional on that yesNo.  For example, if the question is named &#039;&#039;consent&#039;&#039;, you would set the relevance to the remaining questions to &#039;&#039;consent == &amp;quot;Y&amp;quot;&#039;&#039; (possibly &#039;&#039;and&#039;&#039;ing that with whatever additional conditions you needed to support your branching needs).&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/199 Show codes instead of of answers using INSERTANS]&lt;br /&gt;
**{Qcode} returns the code instead of the response text (which you can get via {INSERTANS:SGQA}, or {Qcode.shown})&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/204 Need group mean or calculations for assessments]&lt;br /&gt;
**Say you have N variables of which N-X were answered, you could compute the mean of the answered variables as {sum(var1, var2, ..., varN) / count(var1, var2, ..., varN)}&lt;br /&gt;
**Computing the mean across a set of respondants would require extension of the Quota functionality.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/222 To insert a language dependent text]&lt;br /&gt;
**Tailoring lets you conjugate verbs and decline nouns in each language&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/225 Surveyors should approve their answers]&lt;br /&gt;
**Custom Questions with tailoring, or the showAllResponsesExcept() function will let respondants see all of the questions and responses before clicking Submit. If the Navigation Menu option is enabled, it is easy to go back and correct answers.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/1.92 Suppliment to #answernnXnnXnnn method of targetting form elements]&lt;br /&gt;
**You can now refer to questions and answers by their Question Code, so there is no longer a need to modify SGQA values.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/262 More flexibility with hidden questions]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/265 Remove specific conditions from multiple questions]&lt;br /&gt;
**You can now use Relevance, which is easier to manage than Conditions.  If  needed, they can all be exported from the database, edited in a spreadsheet, and re-imported.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/268 Cross Survey Reporting]&lt;br /&gt;
**By using question codes that are unique across your surveys and versions, you can consolidate data from multiple surveys and/or compare them&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/275 Simplifying integration with other tools]&lt;br /&gt;
**Expression Manager uses Question Codes instead of SGQA, making it easier to integrate with other tools.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/1.92 Expose assessment score to 3rd party app processing]&lt;br /&gt;
**This can be done with Equation question type&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/309 Multiple thank you pages]&lt;br /&gt;
**This can be supported via conditional relevance branching and tailoring&lt;br /&gt;
&lt;br /&gt;
=Additional Reading= &amp;lt;!--T:202--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager Sample Surveys|Expression Manager Sample Surveys]]== &amp;lt;!--T:203--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager HowTos|Use Cases and HowTos]]== &amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager Examples|Step-by-Step Examples]].== &amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager for developers|Reference for Developers]]== &amp;lt;!--T:206--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager Roadmap|RoadMap/Status/ToDo List]]== &amp;lt;!--T:207--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=57537</id>
		<title>Expression Manager</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=57537"/>
		<updated>2013-10-10T13:31:12Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt; Note: This feature is only available in LimeSurvey 1.92 or later. &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick Start Tutorial= &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Overview== &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
When customizing your surveys, you typically need a way to specify the following:&lt;br /&gt;
#&#039;&#039;&#039;Navigation/Branching&#039;&#039;&#039; - letting a subject&#039;s answers change the order in which questions are asked&lt;br /&gt;
#&#039;&#039;&#039;Tailoring/Piping&#039;&#039;&#039; - how to phrase the question (such as referring to prior answers, or conjugating sentences based upon the number or gender of your subjects), or how to generate custom reports (like assessment scores or tailored advice).&lt;br /&gt;
#&#039;&#039;&#039;Validation&#039;&#039;&#039; - ensuring that answers pass certain criteria, like min and max values, or matching an input pattern&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Expression Manager (EM) provides an intuitive way to specifying the logic for each of those features.  Nearly anything that you can write as a standard mathematical equation is a valid expression, even if you are calling functions.  EM currently provides access to 70 functions, and can be easily extended to support more.  It also lets you access your variables using human-readable variable names (rather than SGQA names).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
The following sections show the main places where Expression Manager is used&lt;br /&gt;
&lt;br /&gt;
==Relevance (Controlling Navigation/Branching)== &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
Some surveys use &amp;quot;Goto Logic&amp;quot;, such that if you answer Question 1 with option C, then jump to Question 5. This approach is very limiting, since is hard to validate, and easily breaks if you have to re-order questions.  EM uses an Boolean relevance equation to specify all of the conditions under which a question might be valid.  If the question is relevant, then the question is asked, otherwise it is Not Applicable, and the value NULL is stored in the database.  This is similar to what can be done via the Conditions editor, but EM lets you easily specify much more complex and powerful criteria (and lets you use the variable name rather than SGQA naming).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This image shows one way to review the relevance logic for a survey.  It computes Body Mass Index.  The relevance equation is shown in square bracket right after the variable name (which is in green).  So, the relevance of weight, weight_units, height and height_units are all 1, meaning that those questions are always asked.  However, the relevance for BMI is {!is_empty(height) and !is_empty(weight)}, which means that BMI will only be computed if the subject enters a value for both height and weight (thereby avoiding the risk of a divide by zero error).  Also, the Report question is only shown if the subject answers all four main questions (height, height_units, weight, weight_units).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
[[File:tutorial1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
Relevance is shown and editable in the following places:&lt;br /&gt;
&lt;br /&gt;
===Viewing / Editing Question-Level Relevance=== &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
This equation computes the Body Mass Index (BMI).  It is only asked if the person first enters their height and weight.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
[[File:tutorial2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
This is the edit screen for the BMI question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
[[File:tutorial3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Note that you do not use the curly braces when you enter a Relevance Equation.&lt;br /&gt;
&lt;br /&gt;
===Viewing / Editing Group-Level Relevance=== &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
This is a sample census survey.  The first page asks how many people live with you and stores that in the &amp;quot;cohabs&amp;quot; variable.  This page is only shown if you have more than one cohabitant (so it is shown for the second person cohabitating with you), and also only shows if you specified how Person One is related to you (p1_rel).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
[[File:tutorial4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
As you can see, the group also has question-level relevance criteria, such that each question only appears once you have answered the question before it (e.g. {!is_empty(p1_sex)}).  EM combines the Group and Question-level relevance for you.  Questions in a group are only asked  if the group as a whole is relevant.  Then, only the subset of questions within the group that are relevant are asked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
Here is the screen for editing the group-level relevance for that question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
[[File:tutorial5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
Note that you do not use the curly braces when you enter a Relevance Equation.&lt;br /&gt;
&lt;br /&gt;
==Tailoring/Piping== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
EM lets you easily do simple and complex conditional tailoring of your questions.  Sometimes you just need simple substitution, like saying, &amp;quot;You said you purchased &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Product].  What did you like best about it?&amp;quot;.  Sometimes you need conditional substitution like &amp;quot;&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Mr./Mrs.] &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;LastName], would you be willing to complete our survey?&amp;quot;.  In this case,  you want to use Mr. or Mrs. based upon the person&#039;s gender.  Other times you need even more complex substitution (such as based upon a mathematical computation).  EM supports each of these types of tailoring/piping.&lt;br /&gt;
&lt;br /&gt;
===Conditional Equations=== &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
The Body Mass Index example shows the ability to compute a person&#039;s BMI, even while letting them enter their height in weight in metric or non-metric units.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
[[File:tailoring7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Here weight_kg is {if(weight_units == &#039;kg&#039;, weight, weight * .453592)}.  This if() function means that if the subject entered the weight using kilograms, use that value, otherwise multiple the entered value (which was in pounds) by .453592 to convert it to kilograms.  The height_m variable uses a similar approach to compute the person&#039;s height in meters, even if he entered his height in inches.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
BMI computes the weight formula as {weight_kg / (height_m * height_m)}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Lastly, the report conditionally tailors the message for the subject, telling him what he entered. (&amp;quot;You said you are 2 meters tall and weight 70 kg.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
Although not well shown in the above image, weight_status uses nested if() statements to categorize the person as underweight to severely obese.  You can see its equation in the Show Logic View&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
[[File:tailoring8.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
From the edit window for this question, you can see two things:&lt;br /&gt;
#Tailoring must surround expressions with Curly Braces&lt;br /&gt;
#Expressions can span multiple lines if, as in this case, you want to make it easier to read the nested conditional logic.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
[[File:tailoring9.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Tailored Questions, Answers, and Reports=== &amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Note: Dynamic tailoring may not work if answer options are made available in select boxes on the same question page. This results from the fact that tailoring inserts a &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt; tag which is not valid inside select options.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
This example shows the BMI report.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
[[File:tailoring10.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
Here is the edit window for the same question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
[[File:tailoring11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
As you can see, anything in curly braces is treated as an expression, so is syntax-highlighted (color coded) in the prior image.  If you had any typos (such as misspelled or undefined variable names or functions), EM would show an error, such as this, showing that height_unit is an undefined variable name (it is actually height_units), and rnd() is an undefined function (the proper function name is round()).  In both cases, the errors are surrounded by a red box to make it easier to spot and fix them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
[[File:tailoring12.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
You can also see that you can quickly create complex reports, such as a table of entered values or tailored advice.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Please remember that all tailoring must surround expressions with Curly Braces, so that LimeSurvey knows which parts of the question are free text and which should be parsed through Expression Manager.&lt;br /&gt;
&lt;br /&gt;
==Validation== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
EM controls how most of the advanced question options work.  These control aspects like min/max numbers of answers; min/max individual values; min/max sum values; and checking that entered values match specified string patterns.  You continue to enter those advanced question options as usual.  However, now any value in one of those fields is considered an expression, so you can have min/max criteria with complex conditional relationships to other questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
In all of these cases, since the advanced question option is always considered an expression, you do not use curly braces when specifying it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
The [[Expression Manager Sample Surveys|Sample Surveys]] pages shows many working examples of using expressions for validations.&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
LimeSurvey 1.92 and later uses the new Expression Manager (EM) module which will let LimeSurvey support more complex branching, assessments, validation, and tailoring.  It will replace how LimeSurvey manages Replacements, Conditions, and Assessments on the back-end.  It will also speed up processing considerably since it eliminates most run-time database reads.  EM was developed by Dr. Thomas White (TMSWhite).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
This wiki page is the definitive reference for Expression Manager syntax and functionality.&lt;br /&gt;
&lt;br /&gt;
==Key Definitions== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Expression&#039;&#039;&#039;:  Anything surrounded by curly braces&lt;br /&gt;
#*As long as there is no white space immediately after the opening brace or before the closing curly brace&lt;br /&gt;
#*The contents of Expressions are evaluted by EM, so they can contain mathematical formulas, functions, and complex string and date processing.&lt;br /&gt;
#&#039;&#039;&#039;Tailoring&#039;&#039;&#039;: Sometimes called &amp;quot;piping&amp;quot;, this is the process of conditionally modifying text&lt;br /&gt;
#*You have access to all &#039;replacement fields&#039;, TOKENs, and INSERTANS values&lt;br /&gt;
#*You also have easier access to questions, answers, and their properties.&lt;br /&gt;
#&#039;&#039;&#039;Relevance&#039;&#039;&#039; Equation:  A new question attribute controlling question visiblity&lt;br /&gt;
#*If there is a relevance equation, then the question is only shown if the relevance evaluates to true.&lt;br /&gt;
#*Internally, all array_filter and array_filter_exclude commands become sub-question-level relevance&lt;br /&gt;
#&#039;&#039;&#039;Equation&#039;&#039;&#039; Question Type:  A new question type that saves calculations or reports to the database&lt;br /&gt;
#*It is like a Boilerplate question, but its contents are saved to the database even if you set &amp;quot;Always Hide this Question&amp;quot;&lt;br /&gt;
#&#039;&#039;&#039;SGQA&#039;&#039;&#039;:  This is how variables are named in LimeSurvey &amp;lt;= 1.91+&lt;br /&gt;
#*Stands for Survey-Group-Question-Answer&lt;br /&gt;
#*SGQA variable names look like 123X5X382X971, and may have sub-question suffixes.&lt;br /&gt;
#*These variable names are specific to the underlying S/Q/G/A database codes, so often need to be changed&lt;br /&gt;
#&#039;&#039;&#039;Question Code&#039;&#039;&#039;:  This is the preferred variable name for EM&lt;br /&gt;
#*This can be a descriptive name indicating the purpose of the question, making it easier to read complex logic&lt;br /&gt;
#*Although not required to be unique in &amp;lt;= 1.91+, it must be unique if you want to use EM&lt;br /&gt;
#*Valid question codes should NOT start with a number, so when using the question code to number your questions, simply use &amp;quot;q1&amp;quot;, or &amp;quot;q1a&amp;quot; or &amp;quot;g1q2&amp;quot;.&lt;br /&gt;
#*This is what currently becomes the variable name if you export data to SPSS or R, so if you do statistical analysis, you probably already made this unique.&lt;br /&gt;
&lt;br /&gt;
==Do I have to use EM?== &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
The short answer is No (but also yes).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
EM is fully backwards-compatible with existing surveys.  So, if you are happy to use Conditions and Assessments in the style that LimeSurvey used in versions &amp;lt;= 1.91+, you can continue to do so.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
However, EM completely replaces how LimeSurvey internally deals with Conditions.  Although you can still use the Conditions Editor to create and manage conditions, LimeSurvey 1.92 will convert those to the equivalent Relevance Equations.  As part of the upgrade, LimeSurvey 1.92 will auto-convert all existing Conditions to Relevance Equations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
This should give you the best of both worlds - you can continue using LimeSurvey as you are used to, but will see the Relevance Equation equivalent so you can gradually migrate to Relevance Equations directly whenever you see fit.&lt;br /&gt;
&lt;br /&gt;
==Can I mix use of Conditions and Relevance?== &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
Yes. You can use the Conditions editor for some questions and the Relevance editor for others.  Conditions are auto-converted to Relevance when you save the question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
Note, we assume that if you are using the Conditions editor, that you want those Conditions to over-write any manually entered Relevance equation.  So, if you have existing Conditions and want to manually edit the Relevance, please delete the Conditions for that question first.  Specifically, copy the generated relevance equation to a text editor, use the Conditions menu to delete all of the conditions for that question (which will also delete the relevance), then edit the question and paste the generated relevance equation from the text editor back into the relevance field for that question (and save the question).  If there is enough demand for deleting conditions without deleting the generated relevance equation, we could add a bulk conversion process.&lt;br /&gt;
&lt;br /&gt;
==How should I choose between Conditions and Relevance?== &amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
Here is a list of pros and cons of each style:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Style!!Pros!!Cons&lt;br /&gt;
|-&lt;br /&gt;
|Conditions||1. Nice GUI for creating simple conditions &amp;lt;br/&amp;gt;2. GUI well documented and understood by support team||1. Only supports simple comparisons and does not AND/OR conditions well &amp;lt;br/&amp;gt;2. Cascading conditions work erratically &amp;lt;br/&amp;gt;3. Slow - database intensive, so can slow down long surveys &amp;lt;br/&amp;gt;4. Some reported problems with re-loading conditions &amp;lt;br/&amp;gt;5. GUI doesn&#039;t scale well when there are dozens, hundreds, or thousands of questions &amp;lt;br/&amp;gt;6. May be slow to convert paper-based surveys since must use SGQA names &amp;lt;br/&amp;gt;7. Often need a programmer to custom-code logic needed for complex branching&lt;br /&gt;
|-&lt;br /&gt;
|Relevance||1. Supports very complex logic, including 80+ functions and math/string operators &amp;lt;br/&amp;gt;2. Perfect support for cascading logic &amp;lt;br/&amp;gt;3. Fast - no extra database calls, so supports 1000+ question surveys &amp;lt;br/&amp;gt;4. No problems with re-loading logic since does not require SGQA codes &amp;lt;br/&amp;gt;5. Syntax-highlighting scales to 1000+ question surveys &amp;lt;br/&amp;gt;6. Easy and fast to use for groups wanting to computerize existing paper-based suveys.  &amp;lt;br/&amp;gt;7. Easily supports semi-structured interviews and epidemiological surveys without needing a programmers||1. No GUI for simple conditions - use syntax-highlighting instead &amp;lt;br/&amp;gt;2. New, so support teams have not mastered EM yet.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
The bottom is that if you are happy with how LimeSurvey 1.91+ works, there is no reason to change what you do.&lt;br /&gt;
&lt;br /&gt;
==What are some other benefits of using EM?== &amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
Here are some of the other reasons you might want to use EM.&lt;br /&gt;
#Calculations - you can create any calculation you can think of:&lt;br /&gt;
#*You have access to all common mathematical operators and functions&lt;br /&gt;
#*You have access to 70+ mathematical, date, and string processing functions&lt;br /&gt;
#*It is fairly easy for developers to add new functions if users need them&lt;br /&gt;
#Storing Calculations to Database&lt;br /&gt;
#*You can now compute simple and complex calculations and/or scale scores AND have them stored in the database without needing JavaScript.&lt;br /&gt;
#*You use the Equation question type to accomplish this.&lt;br /&gt;
#Assessments&lt;br /&gt;
#*You can now create assessments or scale scores from any question type, not just the subset that used to be supported&lt;br /&gt;
#*You can use Tailoring to show running or total assessment scores anywhere needed - even on the same page&lt;br /&gt;
#*You have more control over the reports generated based upon those assessment scores&lt;br /&gt;
#*You can store assessment scores in the database without needing JavaScript&lt;br /&gt;
#*You can hide assessment scores without needing JavaScript or CSS&lt;br /&gt;
#Replacement Fields&lt;br /&gt;
#*Instead of using {INSERTANS:SGQA}, you can just use the Question Code - this makes it easier to read and validate.&lt;br /&gt;
#*This also avoids the common need to edit questions to change the SGQA code to make everything work.&lt;br /&gt;
#Tailoring - you can conditionally display text based upon other values&lt;br /&gt;
#*Use the appropriate title for a subject, like (e.g. &amp;quot;Hello &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Mr./Mrs.] Smith&amp;quot;)&lt;br /&gt;
#*Output gramatically correct sentences based when singular/plural matter:  (e.g. &amp;quot;You have 1 child&amp;quot; vs. &amp;quot;You have 2 children&amp;quot;)&lt;br /&gt;
#*Appropriately conjugate verbs and decline nouns based upon subject&#039;s gender and plurality.&lt;br /&gt;
#New Variable Attributes - you can access the following to do your tailoring:&lt;br /&gt;
#* (no suffix) -  an alias for qcode.code&lt;br /&gt;
#*.code - the selected response code for the question if it is relevant (otherwise blank), or the text value if it is not a coded question&lt;br /&gt;
#*.NAOK - same as .code, but can be part of calculations or lists even if irrelevant&lt;br /&gt;
#*.value - the assessment value for the question if it is relevant (otherwise blank), or the text value if it is not a coded question&lt;br /&gt;
#*.valueNAOK - same as .value, but can be part of calculations or lists even if irrelevant&lt;br /&gt;
#*.shown - the answer as displayed to the user (this is what {INSERTANS:xxx}  does)&lt;br /&gt;
#*.qid - the question ID&lt;br /&gt;
#*.gid - the group ID&lt;br /&gt;
#*.sgqa - the SGQA value for the question&lt;br /&gt;
#*.jsName - the correct javascript variable name for the question, regardless whether defined on this page or another&lt;br /&gt;
#*.qseq - the question sequence (starting from 0)&lt;br /&gt;
#*.gseq - the group sequence (starting from 0)&lt;br /&gt;
#*.mandatory - whether the question is mandatory (Y/N)&lt;br /&gt;
#*.question - the text of the question&lt;br /&gt;
#*.relevance - the relevance equation for the question&lt;br /&gt;
#*.grelevance - the relevance equation for the group&lt;br /&gt;
#*.relevanceStatus - whether or not the question is currently relevant (1 if true, 0 if false)&lt;br /&gt;
#*.type - the question type (the one character code)&lt;br /&gt;
#Dynamic On-Page Changes&lt;br /&gt;
#*All Relevance, Calculation, and Tailoring works dynamically on a page - so changes in values instantly update the page&lt;br /&gt;
#*So, you have questions dynamically appear/disappear based upon whether they are relevant&lt;br /&gt;
#*Questions are also dynamically tailored based upon responses on the page, so you can see running totals, tailored sentences and customized reports.&lt;br /&gt;
#New Data Entry Screen&lt;br /&gt;
#*In addition to using the current data-entry system, you can just use Survey-All-In-One.&lt;br /&gt;
#*This supports the on-page relevance and tailoring, so data entry clerks can quickly tab through and they will only have to enter the relevant responses&lt;br /&gt;
#*This can be critical if your data entry person needs to see the tailoring, which is also dynamic.&lt;br /&gt;
#Eliminates the need for most custom JavaScript&lt;br /&gt;
#*EM easily supports complicated computations, scoring, tailoring and conditional logic.&lt;br /&gt;
#*Some things will still need JavaScript (like custom layouts and conditionally hiding question sub-elements), but your JavaScript can use the EM functions so that you can access questions by their Qcode instead of SGQA, and access any of the question properties listed above.&lt;br /&gt;
&lt;br /&gt;
==What are some other helpful new features enabled by EM?== &amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
Regardless of whether you continue to use the Conditions Editor or manually compose Relevance Equations, you get these additional benefits:&lt;br /&gt;
#You can create more complex validation criteria&lt;br /&gt;
#*All of the advanced question attribute (like max_answers, min_num_value_n, max_num_value) can use Expressions.  So, you min/max criteria can be easily adjusted based upon prior responses, even if they are on the same page.&lt;br /&gt;
#*EM also handles all regular-expression-based validation, so you can robustly combine preg and equation-based question attributes.&lt;br /&gt;
#Easy Re-ordering (or deleting) of Questions and Groups&lt;br /&gt;
#*Prior to version 1.92, you could not re-order questions or groups if LimeSurvey thought that such-re-ordering could break conditions in which they were used.  Similarly, you could not delete questions if any other questions depended upon them.&lt;br /&gt;
#*With EM&#039;s syntax highlighting, it is easy to see and validate whether you try to use questions before they are declared.  So, we now let you re-order or delete questions and groups whenever you like.  EM will update all of the syntax highlighting to show you potential errors.&lt;br /&gt;
#*The re-order questions view has been enhanced to help with such review.  It now shows the question&#039;s relevance equation and tailoring, so you can immediately see whether any variables become pink (meaning they are used before being declared).&lt;br /&gt;
#The Question/Group Navigation Index is always available and accurate&lt;br /&gt;
#*Prior to version 1.92, these indexes were not available if there were complex conditions&lt;br /&gt;
#*With EM, we can guarantee that they are accurate.&lt;br /&gt;
#*Subjects can even jump back, to a prior question, change the answer, then jump forward (or submit)&lt;br /&gt;
#**When jumping forwards, EM will re-validate all of the intervening questions/groups.&lt;br /&gt;
#**If any questions become irrelevant, they will be NULLed in the database so that your data is internally consistent&lt;br /&gt;
#**If any questions become relevant or newly fail mandatory or validation rules, EM will stop on that page and force the user to answer those questions before jumping to their final destination.&lt;br /&gt;
#Auto-conversion of Conditions to Relevance&lt;br /&gt;
#*When you upgrade your database, all existing surveys that have conditions will have relevance equations generated for them&lt;br /&gt;
#*Whenever you import a survey, relevance equations will be created as needed&lt;br /&gt;
#*Whenever you add, delete, or modify conditions, EM will generate the appropriate relevance equation.&lt;br /&gt;
#Convenient Syntax Highlighting&lt;br /&gt;
#*When EM shows the relevance equation, it will show the Qcode, even if you entered an SGQA code, as we assume this will be easier to read.&lt;br /&gt;
#*All variables are color coded to show whether they were declared before or after the current question (or before or after the current group).  This lets you quickly detect and fix cases where you try to use variables for relevance (including array_filter), tailoring, or validation equations prior to declaring them.&lt;br /&gt;
#*In addition, if you hover your mouse over the color-coded variable, you will see the most important metadata about that question.   This includes the Group Sequence #, Question Sequence #, Qcode, Text of the question, and all available answer choices (if it is a question type with enumerated answer choices).&lt;br /&gt;
#**The list of answer choices uses this syntax:  &#039;answers&#039;:{key:val, ... }.&lt;br /&gt;
#**&#039;&#039;key&#039;&#039; has the syntax &#039;&#039;&#039;&#039;scale~code&#039;&#039;&#039;&#039; where &#039;&#039;scale&#039;&#039; is the answer scale (e.g. for dual scale), and &#039;&#039;code&#039;&#039; is the answer code.&lt;br /&gt;
#**&#039;&#039;val&#039;&#039; has the syntax &#039;&#039;&#039;&#039;value~shown&#039;&#039;&#039;&#039; where &#039;&#039;value&#039;&#039; is the assessment value (if using assessments, otherwise &#039;&#039;code&#039;&#039;)(e.g. Qcode.value), and &#039;&#039;shown&#039;&#039; is the display value as seen by the subject (e.g. Qcode.shown)&lt;br /&gt;
#**This means that many surveys can use calculations without needing assessment mode.  If you have enumerated answer options  that are unique, non-decimal, and non-negative, you can simply do calculations on the Qcode.code values.&lt;br /&gt;
#Easy review of entire survey logic and content&lt;br /&gt;
#*There is a new Show Survey Logic feature that lets you see everything about the survey (or group or question) on a single page.&lt;br /&gt;
#*It shows the Group, Question, Sub-Question, and Answer-level details for the selected scope (survey vs. group vs. question)&lt;br /&gt;
#*It also shows the relevance, sub-question-level relevance (for array_filter and array_filter_exclude), and generated validation equation (for preg and any validation rules like min/max sum/number of values), and all non-blank question attributes.&lt;br /&gt;
#*Everything is syntax-highlighted so that you can see potential syntax errors (like unbalanced parentheses or use of variables before they were declared)&lt;br /&gt;
#*The syntax-highligting supports rapid navigation and editing of the survey.&lt;br /&gt;
#**If you click on a variable name, it opens a browser window (or tab) that shows you that question and lets you edit it.&lt;br /&gt;
#**If you click on a group name, it opens a browser window (or tab) showing the group-reorder view so that you can easily move questions around.&lt;br /&gt;
#**All of the question attributes are also syntax highlighted.  This lets you set and see expressions within advanced question options (like basing the max/min number/sum of values on an expression)&lt;br /&gt;
#*The EM author used similar view (a little cleaner) to let his collaborating Epidemiologists and Institutional Review Board validate and authorize surveys with thousands of questions in highly branched and tailored structured interviews&lt;br /&gt;
&lt;br /&gt;
==How Backwards Compatible is EM with 1.91+?== &amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
LimeSurvey 1.92 is fully backwards-compatible with 1.91+ with one exception/caveat:  1.92 handles less-than / greater-than comparisons against empty values differently than 1.91+.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
One of the LimeSurvey demo surveys uses a set of conditions that translates to this relevance equation:  {(age &amp;lt; 16) or (age == 20) or ... or (age == 80)}. In LimeSurvey 1.91+, (age &amp;lt; 16) is FALSE when there is no answer (the value is blank).  However, in LimeSurey 1.92, (age &amp;lt; 16) is TRUE when there is no answer, since both PHP and JavaScript treat blank as 0 in mathematical comparisons.  Thus, 1.91+ would hide that question when age was unanswered, but 1.92 would show it.  We went to great pains to prevent this, but since we needed to have the Expressions generate identical results in PHP and JavaScript, there was no way to make 1.92 treat &amp;quot;&amp;quot; &amp;lt; 16 as FALSE.  Fortunately, there is an easy work-around for this.  If you want (age &amp;lt; 16) to be FALSE, then use this expression instead: {(!is_empty(age) and age &amp;lt; 16)}.  You can use the new [[Show Logic File|Survey Logic File]] view to quickly identify and fix any such comparisons in your survey.&lt;br /&gt;
&lt;br /&gt;
=Getting Started= &amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
The best way to get started with EM is to:&lt;br /&gt;
*Install the latest stable version from http://www.limesurvey.org/en/download &lt;br /&gt;
*Import and explore the [[Expression Manager Sample Surveys|sample surveys]].&lt;br /&gt;
*Explore the [[Expression Manager HowTos|use cases and HowTos]] and [[Expression Manager Examples|step-by-step examples]].&lt;br /&gt;
*Explore the EM documentation (this page)&lt;br /&gt;
*Examine the built-in EM test suite&lt;br /&gt;
**From any survey, under tools, select the EM option&lt;br /&gt;
**Available Functions lists the 70+ functions and syntax&lt;br /&gt;
**Unit Tests of Isolated Expressions&lt;br /&gt;
***shows examples of using all EM functions and operators, and the PHP and JavaScript results&lt;br /&gt;
***note there are few functions that generate different results in the PHP and JavaScript versions, so this page lets you plan your EM logic accordingly.&lt;br /&gt;
&lt;br /&gt;
=What Functionality does Expression Manager Extend/Replace? (LimeSurvey &amp;lt;= 1.91+)= &amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conditions =&amp;gt; Relevance== &amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
Conditions controlled which  questions are visible.  The general syntax was &#039;&#039;SGQA operator Value&#039;&#039;, like &#039;&#039;111X2X3 == &amp;quot;Y&amp;quot;&#039;&#039;.  Conditions could be ANDed or ORed together, but mixing ANDs and ORs was difficult.  The conditions themselves were stored in a separate table, and large portion of LimeSurvey&#039;s code was devoted to managing Conditions.  Because of extensive database access, processing large numbers of conditions could cause noticable performance problems.  Furthermore, once you had conditions assigned to questions or groups, you were often not allowed to re-order or delete them.&lt;br /&gt;
&lt;br /&gt;
==Assessments =&amp;gt; Equations and  Micro-Tailoring== &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
Assessments let users create scale scores from a collection of questions.  However, they could not dynamically change on the current page, and their values were not stored to the database.&lt;br /&gt;
&lt;br /&gt;
==Replacements =&amp;gt; Micro-Tailoring== &amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
Users could tailor some messages and questions based  upon prior responses.  For example, a question might be, &#039;&#039;{TOKEN:FIRSTNAME}, you said {INSERTANS:111X3X4} was your favorite sport&#039;&#039;.  However, it was not possible to do conditional tailoring (like say &amp;quot;Mr.&amp;quot; or &amp;quot;Mrs.&amp;quot; depending upon the person&#039;s gender), or conjugate verbs or decline nouns without fancy JavaScript.  Authors could implement surveys that seemed to tailor questions, but it required separate questions for each permutation, and complex conditions to decide which questions to display.&lt;br /&gt;
&lt;br /&gt;
==Validation== &amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
Question could be validated with Regular expressions, or minimum/maximum values, or let an SGQA response serve as the minimum or maximum value.  However, validations could not be based upon calculations of other variables without fancy JavaScript.&lt;br /&gt;
&lt;br /&gt;
==Equations== &amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
Equations were not supported without fancy JavaScript.&lt;br /&gt;
&lt;br /&gt;
==Equation Question Type== &amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
Equations could not be saved to the database (e.g. the final score for an assessment) without fancy JavaScript.&lt;br /&gt;
&lt;br /&gt;
=How Will Expression Manager Replace/Extend That Functionality?= &amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
The Expression Manager is a new core module within LimeSurvey that makes it much easier to support the type of complex functionality that used to require custom JavaScript.  It is also replacing the way LimeSurvey currently manages Conditions and Assessments.&lt;br /&gt;
&lt;br /&gt;
==New Terminology When Referring to Expression Manager (EM)== &amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
EM &amp;quot;thinks&amp;quot; of its functionality in the following terms:&lt;br /&gt;
*&#039;&#039;&#039;Relevance-based Branching&#039;&#039;&#039; - if a question is relevant, then ask it, otherwise don&#039;t (e.g. make it invisible, and mark it as NULL in the database).  There is a new Relevance field for all Question types, and also for each Group (so you can apply a set of conditions to an entire group without having to copy the same condition to each question, and/or combine group and question-level conditional logic).&lt;br /&gt;
*&#039;&#039;&#039;Tailoring&#039;&#039;&#039; - Once you know which questions should be asked, tailoring (sometimes called &#039;&#039;piping&#039;&#039;) specifies how the question should be asked. This lets you support not only simple subsitution (like {TOKEN:FIRSTNAME}), but also conjugation of verbs and declination of nouns based upon the gender or number of your subjects.  It also lets you change the message you deliver to a subject based upon whether they answered (or how they answered) other questions.&lt;br /&gt;
*&#039;&#039;&#039;Equations&#039;&#039;&#039; - EM adds a new question type called Equation which stores the result of an Expression.  These equations results are computed and written to the database, even if you hide them on the page.  Thus, they are useful for hidden scoring calculations, navigation based upon complex equations, assessments, and reports that should be generated and easily available within the database.&lt;br /&gt;
&lt;br /&gt;
===Relevance and Cascading Relevance=== &amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
Every question type now has a Relevance option which controls whether the question is displayed.  EM processes each of the Relevance Equations in the order they should appear in the survey.  If the expression is true (or missing - to support legacy surveys), the question will be diplayed. If it is not relevant, then the question will be hidden, and the value will be NULLed in the database.  If there are no relevant questions in a group, the entire group will be skipped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
Moreover, if any of the variables within an expression is irrelevant, then the expression always evaluates to false.  This enables Cascading Relevance so that you do not have to write very long Relevance equations for each question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
Say you have 5 questions Q1-Q5, and you only want to show Q2 if Q1 was answered, and Q3 if Q2 was answered, etc.  The relevance equations might be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Question Code!!Relevance!!Question&lt;br /&gt;
|-&lt;br /&gt;
|Q1||1||What is your name?&lt;br /&gt;
|-&lt;br /&gt;
|Q2||Q1||{Q1}, how old are you?&lt;br /&gt;
|-&lt;br /&gt;
|Q3||Q2||So, you are {Q2} years old.  Are you married?&lt;br /&gt;
|-&lt;br /&gt;
|Q4||Q3 == &amp;quot;Y&amp;quot;||{Q1}, how long have you been married?&lt;br /&gt;
|-&lt;br /&gt;
|Q5||Q4||How many children do you have, {Q1}?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
The relevance calculations also work in JavaScript - so you could put all the above questions on one page and it would still work as expected.  In fact, EM totally replaces how EM processes Survey vs. Group vs. Question-at-a-time survey formats.  They now all use the exactly same navigation engine so they work identically regardless of survey style.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
As long as you are on the same page, any data you entered will still be there, just hidden.  So, if you enter some information, then choose and option that makes them irrelevant, then make them relevant again, your answers will still be available.  However, as soon as you move to a different page, all irrelevant responses will be lost to integrity of the dataset.&lt;br /&gt;
&lt;br /&gt;
===Group-Level Relevance=== &amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
Expression Manager also supports group-level relevance.  This makes it easier to implement looping.   Say you want to collect information about up to 10 entities (such a products or people in a household), where you first deterimine how many entities need follow-up (such as by asking how many people live in a household, or having people check which products they like from a long list).  After knowning how many entities need follow-up, you can use Group-level relevance like {count &amp;gt;= 1}, {count &amp;gt;=2}, ... {count &amp;gt;= 10} for each of the 10 groups of follow-up questions.  Within each group, you can have question-level conditional logic (e.g. gender or age-specific follow-up questions for each subject).  The question and group-level relevance equations are ANDed together to determine which should be shown.&lt;br /&gt;
&lt;br /&gt;
===Tailoring / Piping=== &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
Anything within curly braces is now treated as an Expression (with one exception described below).  Expressions have acccess to all of the LimeReplacementFields, all of the variables (via several aliases), all typical equation operators (mathematical, logical, and comparison), and dozens of functions (that even work dynamically on the client-side).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
Using these equations, you can do things such as:&lt;br /&gt;
#Conditionally show tailored messages to the respondants based upon prior responses&lt;br /&gt;
#Create Assessments and show Assessment results (or conditionally branch or show messages) based upon those results, all without using the Assessments module itself&lt;br /&gt;
#Conjugate verbs and decline nouns within questions, answers, and reports.&lt;br /&gt;
#Show summaries of responses before the &amp;quot;Show your answers&amp;quot; page at the end of the survey&lt;br /&gt;
&lt;br /&gt;
===Equations=== &amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
There is a new question type called  Equation.  It is like a Boilerplate questions, except that it stores the value of what is displayed in the database.  So, if the Equation Question text contains an Assessment computation, that value would be stored in the database in a variable that can be displayed within public or private statistics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
This solves a common request for storing Assessment scores within the database&lt;br /&gt;
&lt;br /&gt;
==Syntax== &amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
Anything contained within curly braces is now considered an Expression (with one exception:  there must be no leading or trailing whitespace - this is needed to ensure the Expression Manager does not try to process embedded JavaScript).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
Note, it is OK for expressions to span multiple lines, as long as there is no whitespace after the opening  curly brace or before the closing curly brace.  This is especially helpful for nested if() statements like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;{if(is_empty(PFTotals),&lt;br /&gt;
 &#039;&#039;,&lt;br /&gt;
 if(PFTotals &amp;gt;= -5 &amp;amp;&amp;amp; PFTotals &amp;lt;= -4,&lt;br /&gt;
   &#039;Very Soft&#039;,&lt;br /&gt;
   if(PFTotals &amp;gt;= -3 &amp;amp;&amp;amp; PFTotals &amp;lt;= -2,&lt;br /&gt;
     &#039;Soft&#039;,&lt;br /&gt;
     if(PFTotals == -1,&lt;br /&gt;
       &#039;Somewhat Soft&#039;,&lt;br /&gt;
       if(PFTotals == 0,&lt;br /&gt;
         &#039;Moderate&#039;,&lt;br /&gt;
         if(PFTotals == 1,&lt;br /&gt;
           &#039;Somewhat Hard&#039;,&lt;br /&gt;
           if(PFTotals &amp;gt;= 2 &amp;amp;&amp;amp; PFTotals &amp;lt;= 3,&lt;br /&gt;
             &#039;Hard&#039;,&lt;br /&gt;
             if(PFTotals &amp;gt;= 4 &amp;amp;&amp;amp; PFTotals &amp;lt;= 5,&lt;br /&gt;
               &#039;Very Hard&#039;,&lt;br /&gt;
               &#039;&#039;&lt;br /&gt;
             )&lt;br /&gt;
           )&lt;br /&gt;
         )&lt;br /&gt;
       )&lt;br /&gt;
     )&lt;br /&gt;
   )&lt;br /&gt;
 )&lt;br /&gt;
)}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
Expression Manager supports the following syntax:&lt;br /&gt;
*All standard mathematical operators (e.g. +,-,*,/,!)&lt;br /&gt;
*All standard comparison operators (e.g. &amp;lt;,&amp;lt;=,==,!=,&amp;gt;,&amp;gt;=, plus these equivalents:  lt,le,eq,ne,gt,ge)&lt;br /&gt;
*Parentheses (so you can group sub-expressions)&lt;br /&gt;
*Conditional operators (e.g. &amp;amp;&amp;amp;,| | and these equivalents: and,or)&lt;br /&gt;
*Single and double-quoted strings (which can each embed strings with the other quote type)&lt;br /&gt;
*Comma operator (so can have a list of expressions and just return the final result)&lt;br /&gt;
*Assignment operator (=)&lt;br /&gt;
*Pre-defined variables (to refer to questions, question attributes, and responses) - e.g. all of the SGQA codes&lt;br /&gt;
*Pre-defined functions (there are already 70+, and it is easy to add more)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
EM syntax follows normal operator precedence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:140--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Level!!Operator(s)!!Description&lt;br /&gt;
|-&lt;br /&gt;
|1||()||parentheses for grouping or calling functions&lt;br /&gt;
|-&lt;br /&gt;
|2||! - +||unary operators: not, negation, unary-plus&lt;br /&gt;
|-&lt;br /&gt;
|3||* /||times, divide&lt;br /&gt;
|-&lt;br /&gt;
|4||+ -||plus, minus&lt;br /&gt;
|-&lt;br /&gt;
|5||&amp;lt; &amp;lt;= &amp;gt; &amp;gt;= lt le gt ge||relative comparisons&lt;br /&gt;
|-&lt;br /&gt;
|6||== != eq ne||equality comparisons&lt;br /&gt;
|-&lt;br /&gt;
|7||and||logical AND&lt;br /&gt;
|-&lt;br /&gt;
|8||or||logical OR&lt;br /&gt;
|-&lt;br /&gt;
|9||=||assignment operator&lt;br /&gt;
|-&lt;br /&gt;
|10||,||comma operator&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
Note, for consistency between JavaScript and PHP, the plus operator (+) does addition if both operands are numeric, but does concatenation if both parts are non-numeric strings.  However, we recommend using the join() function for concatenation, as that makes your intent more clear, and avoids unexpected results if you were expecting strings but got numbers instead (or vice versa).&lt;br /&gt;
&lt;br /&gt;
===Caution about using Assignment Operator (=)=== &amp;lt;!--T:142--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:143--&amp;gt;&lt;br /&gt;
Note, you should avoid using the assignment operators unless absolutely necessary, since they may cause unexpected side-effects.  For example, if you change the value of a previous response, the cascading relevance and validation logic between that question and the current question is not re-computed, so you could end up with internally inconsistent data (e.g. questions that stay answered but should have been NULLed, or questions that are skipped but should have been answered).  In general, if you want to assign a value to a variable, you sould create an Equation question type, and use an expression to set its value.  However, there are some rare times that people really need this operator, so we made it available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:144--&amp;gt;&lt;br /&gt;
To help caution you about this operator, it is shown in red font within the syntax equations (so that you don&#039;t confuse it with &amp;quot;==&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
The main reasons you may want to use assignment are:&lt;br /&gt;
*You need to set the default value for a question that does not accept defaults via equation (such as list radio, where the user interface lets you pick one of the answer options, but does not let you enter an equation).  However, be careful, as LimeSurvey will not be able to validate that your equation generates one of the allowable answers for that question.&lt;br /&gt;
*You need to forcibly change the response to a previous question based upon a later response&lt;br /&gt;
&lt;br /&gt;
==Access to Variables== &amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
Expression Manager provides read-only access to whichever variables we might need.  For backwards compatibility, it provides access to the following:&lt;br /&gt;
*TOKEN:xxx - the value of a TOKEN (e.g. TOKEN:FIRSTNAME, TOKEN:ATTRIBUTE_5)&lt;br /&gt;
*INSERTANS:SGQA - the display value of an answer (e.g. &amp;quot;Yes&amp;quot;)&lt;br /&gt;
*All {XXX} values used by templates&lt;br /&gt;
*In question text, you can use {QID} replaced by the question id and {SGQ} replaced by the SGQA of the question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
In addition, Expression Manager lets you refer to variables by the Question Code (the &#039;title&#039; column in the questions table within the database).  This is also the variable label used when you export your data to SPSS, R, or SAS.  For example, if you have questions about name, age, and gender, you could call those variables &#039;&#039;name&#039;&#039;, &#039;&#039;age&#039;&#039;, and &#039;&#039;gender&#039;&#039; instead of &#039;&#039;12345X13X22&#039;&#039;, &#039;&#039;12345X13X23&#039;&#039;, and  &#039;&#039;12345X13X24&#039;&#039;.  This makes equations easier for everyone to read and validate the logic, plus makes it possible to shuffle questions around without having to keep track of group or question numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
Furthermore, Expression Manager lets you access many properties of the Question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:150--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax!!Meaning!!Example!!Example Result&lt;br /&gt;
|-&lt;br /&gt;
|Qcode||an alias for Qcode.code||{implode(&#039;,&#039;,name,gender)}||&#039;Tom&#039;,&#039;M&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.code||the selected response code for the question if it is relevant (otherwise blank), or the text value if it is not a coded question||{implode(&#039;,&#039;,name.code,gender.code)}||&#039;Tom&#039;,&#039;M&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.NAOK||same as Qcode - see discussion of NAOK||{gender.NAOK}||&#039;M&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.value||the assessment value for the question if it is relevant (otherwise blank), or the text value if it is not a coded question||{gender.value}||&#039;1&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.valueNAOK||same as Qcode.value - see discussion about NAOK||{gender.valueNAOK}||&#039;1&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.shown||the dispay value for the question||{implode(&#039;,&#039;,name.shown,gender.shown)}||&#039;Tom&#039;,&#039;Male&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.question||the text of the question||{gender.question}||&#039;What is your gender?&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.mandatory||whether the question is mandatory (Y/N)||{gender.mandatory}||&#039;N&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.qid||the internal question number (not the sequential number)||{gender.qid}||337&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.type||the question type||{gender.type}||&#039;G&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.jsName||the correct javascript name for the question, regardless whether declared on or off this page||{gender.jsName}||&#039;java1827X3X337&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.gid||the internal group number (not the sequential number)||{gender.gid}||3&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.qseq||the sequential number of the question, starting from 0||{gender.qseq}||5&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.gseq||the sequential number of the group, starting from 0||{gender.gseq}||1&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.relevanceStatus||whether the question is currently relevant (0 or 1)||{gender.relevanceStatus}||1&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.relevance||the question-level relevance equation||{gender.relevance}||&#039;!is_empty(name)&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.grelevance||the  group-level relevance equation||{gender.grelevance}||&#039;num_children &amp;gt;= 5&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Qcode.sgqa||the SGQA value for this question||{gender.sgqa}||&#039;1827X3X337&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Security issue=== &amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
For security issues, text entered by user are filtered. Some caracter are replaced by HTML entities.&lt;br /&gt;
* &amp;amp; by &amp;amp;amp;amp;&lt;br /&gt;
* &amp;lt; by &amp;amp;amp;lt;&lt;br /&gt;
* &amp;gt; by &amp;amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Qcode Variable Naming== &amp;lt;!--T:153--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
Here are the details of how to construct a Qcode (and access some properties) by question type.  In general, Qcodes are constructed as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
  QuestionCode . &#039;_&#039; . SubQuestionID . &#039;_&#039; . ScaleId&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:208--&amp;gt;&lt;br /&gt;
For comment and other, question code are QuestionCode_comment and QuestionCode_other&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Type!!Description!!Code!!SubQs!!Answer Options!!Scales!!Answer Code!!Answer Shown!!Relevance&lt;br /&gt;
|-&lt;br /&gt;
|5||5 Point Choice Radio-Buttons||Q1|| ||1-5|| ||{Q1}||{Q1.shown}||{Q1==3}&lt;br /&gt;
|-&lt;br /&gt;
|B||Array (10 Point Choice) Radio-Buttons||Q2||L1-L6||1-10|| ||{Q2_L2}||{Q2_L2.shown}||{Q2_L2==7}&lt;br /&gt;
|-&lt;br /&gt;
|A||Array (5 Point Choice) Radio-Buttons||Q3||1-5||1-5|| ||{Q3_1}||{Q3_1.shown}||{Q3_1&amp;gt;=3}&lt;br /&gt;
|-&lt;br /&gt;
|1||Array (Flexible Labels) Dual Scale||Q4||sq1-sq5||0:a1-a3||1:b1-b3||{Q4_sq1_0}||{Q4_sq1_1.shown}||{Q4_sq1_1==&#039;b2&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|H||Array (Flexible) - Column Format||Q5||1-5||s,m,t|| ||{Q5_1}||{Q5_1.shown}||{Q5_1==&#039;s&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|F||Array (Flexible) - Row Format||Q6||F1-F5||1-5|| ||{Q6_F3}||{Q6_F3.shown}||{Q6_F3==4}&lt;br /&gt;
|-&lt;br /&gt;
|E||Array (Increase/Same/Decrease) Radio-Buttons||Q7||1-7||I,S,D|| ||{Q7_4}||{Q7_4.shown}||{Q7_4==&#039;D&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|:||Array (Multi Flexi) 1 To 10||Q8||ls1,todo,ls2||min,max,avg|| ||{Q8_ls1_max}||{Q8_ls2_avg.shown}||{Q8_ls2_min==7}&lt;br /&gt;
|-&lt;br /&gt;
|;||Array (Multi Flexi) Text||Q9||hp,st,sw||1st,2nd,3rd|| ||{Q9_hp_3rd}||{Q9_hp_3rd.shown}||{Q9_hp_3rd==&#039;Peter&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|C||Array (Yes/Uncertain/No) Radio-Buttons||Q10||1-5||Y,N,U|| ||{Q10_1}||{Q10_1.shown}||{Q10_3==&#039;Y&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|X||Boilerplate Question||Q11|| || || || ||{Q11.shown}||&lt;br /&gt;
|-&lt;br /&gt;
|D||Date||Q12|| || || ||{Q12}||{Q12.shown}||&lt;br /&gt;
|-&lt;br /&gt;
|*||Equation||Q13|| || || ||{Q13}||{Q13.shown}||{Q13&amp;gt;5}&lt;br /&gt;
|-&lt;br /&gt;
|~124~||File Upload (records number of files uploaded)||Q14|| || || ||{Q14}|| ||{Q14&amp;gt;0}&lt;br /&gt;
|-&lt;br /&gt;
|G||Gender Drop-Down List||Q15|| ||M,F|| ||{Q15}||{Q15.shown}||{Q15==&#039;M&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|U||Huge Free Text||Q16|| || || ||{Q16}||{Q16.shown}||{strlen(Q16)&amp;gt;100}&lt;br /&gt;
|-&lt;br /&gt;
|I||Language Question||Q17|| || || ||{Q17}||{Q17.shown}||{Q17==&#039;en&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|!||List - Dropdown||Q18|| ||1-5|| ||{Q18}||{Q18.shown}||{Q18==3}&lt;br /&gt;
|-&lt;br /&gt;
|L||List Drop-Down/Radio-Button List||Q19|| ||A-Z|| ||{Q19}||{Q19.shown}||{Q19==&#039;X&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|O||List With Comment Drop-Down/Radio-Button List + Textarea||Q20|| ||A-F|| ||{Q20},{Q20comment}||{Q20.shown}||{Q20==&#039;B&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|T||Long Free Text||Q21|| || || ||{Q21}||{Q21.shown}||{strstr(Q21,&#039;hello&#039;)&amp;gt;0}&lt;br /&gt;
|-&lt;br /&gt;
|M||Multiple Choice Checkbox||Q22||A-F|| || ||{Q22_E}||{Q22_E.shown}||{Q22_E==&#039;Y&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|P||Multiple Choice With Comments Checkbox + Text||Q23||A-F|| || ||{Q23_D}, {Q23_Dcomment}||{Q23_D.shown}||{!is_empty(Q23)}&lt;br /&gt;
|-&lt;br /&gt;
|K||Multiple Numerical Question||Q24||self,mom,dad|| || ||{Q24_self}||{Q24_self.shown}||{Q24_self&amp;gt;30}&lt;br /&gt;
|-&lt;br /&gt;
|Q||Multiple Short Text||Q25||A-F|| || ||{Q25_B}||{Q25_B.shown}||{substr(Q25_B,1,1)==&#039;Q&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|N||Numerical Question Type||Q26|| || || ||{Q26}||{Q26.shown}||{Q26 &amp;gt; 30}&lt;br /&gt;
|-&lt;br /&gt;
|R||Ranking Style||Q27||1-4|| || ||{Q27_1}||{Q27_1.shown}||{Q27_1==3}&lt;br /&gt;
|-&lt;br /&gt;
|S||Short Free Text||Q28|| || || ||{Q28}||{Q28.shown}||{Q28==&#039;mine&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|Y||Yes/No Radio-Buttons||Q29|| || || ||{Q29}||{Q29.shown}||{Q29==&#039;Y&#039;}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The reserved &#039;this&#039;, &#039;self&#039;, and &#039;that&#039; variables== &amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
Quite often, you want to evalute all parts of a question, such as counting how many sub-questions have been answered, or summing the scores.  Other times, you want to process just certain rows or columns of a question (such as getting the row or column sums and storing them in the database).  These reserved variables make that process relatively painless.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
The &#039;this&#039; variable is used exclusively within the &amp;quot;Whole question validation equation&amp;quot; and &amp;quot;Sub-question validation equation&amp;quot; advanced question options.  It expands to the variable names of each of the cells within those questions.  So, if you want to make sure that each entry is greater than three, you would set the &amp;quot;Sub-question validation equation&amp;quot; to (this &amp;gt; 3).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
The &#039;self&#039; and &#039;that&#039; variable are more powerful, and serve as macros which are expanded prior to processing equations.  The syntax choices are:&lt;br /&gt;
*self&lt;br /&gt;
*self.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
*self.&#039;&#039;sub-selector&#039;&#039;&lt;br /&gt;
*self.&#039;&#039;sub-selector&#039;&#039;.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
&#039;&#039;suffix&#039;&#039; is any of the normal qcode suffixes (e.g. NAOK, value, shown)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
&#039;&#039;sub-selector&#039;&#039; is one of:&lt;br /&gt;
*comments - only subquestions that are comments (e.g. from multiple choice with comment and list with comment)&lt;br /&gt;
*nocomments - only subquestions that are not comments&lt;br /&gt;
*sq_X - where X is a row or column identifier.  Only sub-questions matching pattern X are selected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
*Has any part of a question been answered?  {count(self.NAOK)&amp;gt;0}&lt;br /&gt;
*What is the assessment score for this question?  {sum(self.value)}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
You can also use these to get row and column totals.  Say you have a array of numbers with rows A-E and columns 1-5.&lt;br /&gt;
*What is the grand total?  {sum(self.NAOK)}&lt;br /&gt;
*What is the total of row B?  {sum(self.sq_B.NAOK)}&lt;br /&gt;
*What is the total of column 3? {sum(self.sq_3.NAOK)}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
The &#039;that&#039; variable is like the &#039;self&#039; variable, but lets you refer to other questions.  Its syntax is:&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;.&#039;&#039;sub-selector&#039;&#039;&lt;br /&gt;
*that.&#039;&#039;qname&#039;&#039;.&#039;&#039;sub-selector&#039;&#039;.&#039;&#039;suffix&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
&#039;&#039;qname&#039;&#039; is the question name without any sub-question extensions.  So, say you create a question &#039;q1&#039;, that is its &#039;&#039;qname&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
*Has any part of question q1 been answered?  {count(that.q1.NAOK)&amp;gt;0}&lt;br /&gt;
*What is the assessment score for q2?  {sum(that.q2.NAOK)}&lt;br /&gt;
*What is the grand total of q3? {sum(that.q3.NAOK)}&lt;br /&gt;
*What is the total of row C in q4?  {sum(that.q4.sq_C.NAOK)}&lt;br /&gt;
*What is the total of column 2 in q4? {sum(that.q4.sq_2.NAOK)}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
The &#039;self&#039; and &#039;that&#039; variables can be used in any relevance,  validation, or tailoring.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
The one caveat is that when you use the [[Show Logic File|Show Logic File]] feature, it will show you the expanded value of &#039;self&#039; and &#039;that&#039;.  This lets you see the actual equation that will be generated so that you (and Expression Manager) can validate that the variables exist.  This may seem confusing since you may see quite lenghty equations.  However, if you edit the question, you will see the original equation using &#039;self&#039; and/or &#039;that&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
Also note that you should not use these variables if (a) you want to explicitly name each variable used in an equation, or (b) use variables that do not have sub-questions (e.g. single response questions).  In those cases, prefixing a variable with &#039;that&#039; is overkill, and you run the risk of getting unexpected results.&lt;br /&gt;
&lt;br /&gt;
==Access to Functions== &amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:172--&amp;gt;&lt;br /&gt;
Expression Manager provides access to mathematical, string, and user-defined functions, as shown below.  It has PHP and JavaScript equivalents for these functions so that they work identically on server-side (PHP) and client-side (JavaScript).  It is easy to add new functions.&lt;br /&gt;
&lt;br /&gt;
===Implemented Functions=== &amp;lt;!--T:173--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:174--&amp;gt;&lt;br /&gt;
The following functions are currently available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:175--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function!!Meaning!!Syntax&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.abs.php abs]||Absolute value||number abs(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.acos.php acos]||Arc cosine||number acos(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.addslashes.php addslashes]||Quote string with slashes||string addslashes(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.asin.php asin]||Arc sine||number asin(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.atan.php atan]||Arc tangent||number atan(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.atan2.php atan2]||Arc tangent of two variables||number atan2(number, number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.ceil.php ceil]||Round fractions up||number ceil(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.checkdate.php checkdate]||Returns true(1) if it is a valid date in gregorian calendar||bool checkdate(month,day,year)&lt;br /&gt;
|-&lt;br /&gt;
|convert_value||Convert a numerical value using a inputTable and outputTable of numerical values||number convert_value(fValue, iStrict, sTranslateFromList, sTranslateToList)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.cos.php cos]||Cosine||number cos(number)&lt;br /&gt;
|-&lt;br /&gt;
|count||count the number of answered (non-blank)questions in the list||number count(arg1, arg12, ..., argN)&lt;br /&gt;
|-&lt;br /&gt;
|countif||Count the number of answered questions in the list equal the first argument||number countif(matches, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|countifop||Count the number of answered questions in the list which pass the criteria (arg op value)||number countifop(op, value, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.date.php date]||Format a local date/time||string date(format &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, timestamp=time()])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.exp.php exp]||Calculates the exponent of e||number exp(number)&lt;br /&gt;
|-&lt;br /&gt;
|fixnum||Display numbers with comma as radix separator, if needed||string fixnum(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.floor.php floor]||Round fractions down||number floor(number)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.gmdate.php gmdate]||Format a GMT date/time||string gmdate(format &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, timestamp=time()])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.html-entity-decode.php html_entity_decode]||Convert all HTML entities to their applicable characters (always uses ENT_QUOTES and UTF-8)||string html_entity_decode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.htmlentities.php htmlentities]||Convert all applicable characters to HTML entities (always uses ENT_QUOTES and UTF-8)||string htmlentities(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.htmlspecialchars.php expr_mgr_htmlspecialchars]||Convert special characters to HTML entities (always uses ENT_QUOTES and UTF-8)||string htmlspecialchars(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.htmlspecialchars-decode.php expr_mgr_htmlspecialchars_decode]||Convert special HTML entities back to characters (always uses ENT_QUOTES and UTF-8)||string htmlspecialchars_decode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.idate.php idate]||Format a local time/date as integer||string idate(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, timestamp=time()])&lt;br /&gt;
|-&lt;br /&gt;
|if||Excel-style if(test,result_if_true,result_if_false)||if(test,result_if_true,result_if_false)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.implode.php implode]||Join array elements with a string||string implode(glue,arg1,arg2,...,argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.intval.php intval]||Get the integer value of a variable||int intval(number &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, base=10])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.empty.php is_empty]||Determine whether a variable is considered to be empty||bool is_empty(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-float.php is_float]||Finds whether the type of a variable is float||bool is_float(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-int.php is_int]||Find whether the type of a variable is integer||bool is_int(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-nan.php is_nan]||Finds whether a value is not a number||bool is_nan(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-null.php is_null]||Finds whether a variable is NULL||bool is_null(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-numeric.php is_numeric]||Finds whether a variable is a number or a numeric string||bool is_numeric(var)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.is-string.php is_string]||Find whether the type of a variable is string||bool is_string(var)&lt;br /&gt;
|-&lt;br /&gt;
|join{{NewIn|2.0|b=130129}}||Join elements as a new string||join(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|list||Return comma-separated list of non-blank values||string list(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.log.php log]|| The logarithm of number to base, if given, or the natural logarithm. ||number log(number,base=e)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.ltrim.php ltrim]||Strip whitespace (or other characters) from the beginning of a string||string ltrim(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, charlist])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.max.php max]||Find highest value||number max(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.min.php min]||Find lowest value||number min(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.mktime.php mktime]||Get UNIX timestamp for a date (each of the 6 arguments are optional)||number mktime([hour [, minute [, second [, month [, day [, year ]]]]]])&lt;br /&gt;
|-&lt;br /&gt;
|modulo-function||The modulo function is &#039;&#039;&#039;not supported&#039;&#039;&#039; yet. You can use the floor() function instead||floor(x/y)==(x/y)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.nl2br.php nl2br]||Inserts HTML line breaks before all newlines in a string||string nl2br(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.number-format.php number_format]||Format a number with grouped thousands||string number_format(number)&lt;br /&gt;
|-&lt;br /&gt;
|pi||Get value of pi||number pi()&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.pow.php pow]||Exponential expression||number pow(base, exp)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.quoted-printable-decode.php quoted_printable_decode]||Convert a quoted-printable string to an 8 bit string||string quoted_printable_decode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.quoted-printable-encode.php quoted_printable_encode]||Convert a 8 bit string to a quoted-printable string||string quoted_printable_encode(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.quotemeta.php quotemeta]||Quote meta characters||string quotemeta(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.rand.php rand]||Generate a random integer, see [[Expression Manager Sample Surveys#Randomly Ask One Question Per Group|this example]]||int rand() OR int rand(min, max)&lt;br /&gt;
|-&lt;br /&gt;
|regexMatch||compare a string to a [[Using regular expressions|regular expression]]||bool regexMatch(pattern,input)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.round.php round]||Rounds a number to an optional precision||number round(val &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, precision])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.rtrim.php rtrim]||Strip whitespace (or other characters) from the end of a string||string rtrim(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, charlist])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.sin.php sin]||Sine||number sin(arg)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.sprintf.php sprintf]||Return a formatted string||string sprintf(format, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.sqrt.php sqrt]||Square root||number sqrt(arg)&lt;br /&gt;
|-&lt;br /&gt;
|stddev||Calculate the Sample Standard Deviation for the list of numbers||number stddev(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.str-pad.php str_pad]||Pad a string to a certain length with another string||string str_pad(input, pad_length &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, pad_string])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.str-repeat.php str_repeat]||Repeat a string||string str_repeat(input, multiplier)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.str-replace.php str_replace]||Replace all occurrences of the search string with the replacement string||string str_replace(search, replace, subject)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strcasecmp.php strcasecmp]||Binary safe case-insensitive string comparison||int strcasecmp(str1, str2)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strcmp.php strcmp]||Binary safe string comparison||int strcmp(str1, str2)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strip-tags.php strip_tags]||Strip HTML and PHP tags from a string||string strip_tags(str, allowable_tags)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.stripos.php stripos]||Find position of first occurrence of a case-insensitive string||int stripos(haystack, needle &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, offset=0])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.stripslashes.php stripslashes]||Un-quotes a quoted string||string stripslashes(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.stristr.php stristr]||Case-insensitive strstr||string stristr(haystack, needle &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, before_needle=false])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strlen.php strlen]||Get string length||int strlen(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strpos.php strpos]||Find position of first occurrence of a string||int strpos(haystack, needle &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt; offset=0])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strrev.php strrev]||Reverse a string||string strrev(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strstr.php strstr]||Find first occurrence of a string||string strstr(haystack, needle)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strtolower.php strtolower]||Make a string lowercase||string strtolower(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strtotime.php strtotime]||Parse about any English textual datetime description into a Unix timestamp||int strtotime(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.strtoupper.php strtoupper]||Make a string uppercase||string strtoupper(string)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.substr.php substr]||Return part of a string||string substr(string, start &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, length])&lt;br /&gt;
|-&lt;br /&gt;
|sum||Calculate the sum of values in an array||number sum(arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|sumifop||Sum the values of answered questions in the list which pass the criteria (arg op value)||number sumifop(op, value, arg1, arg2, ... argN)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.tan.php tan]||Tangent||number tan(arg)&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.time.php time]||Return current UNIX timestamp||number time()&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.trim.php trim]||Strip whitespace (or other characters) from the beginning and end of a string||string trim(string &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;, charlist])&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.php.net/manual/en/function.ucwords.php ucwords]||Uppercase the first character of each word in a string||string ucwords(string)&lt;br /&gt;
|-&lt;br /&gt;
|unique||Returns true if all non-empty responses are unique||boolean unique(arg1, ..., argN)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Functions that are Planned or Being Considered=== &amp;lt;!--T:176--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:177--&amp;gt;&lt;br /&gt;
Other functions that are planned (or being considered) but which are not implemented yet include the following.  Some of these are for backwards compatability with another survey tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Syntax!!Meaning!!Comments&lt;br /&gt;
|-&lt;br /&gt;
|e()||returns the value of e||&lt;br /&gt;
|-&lt;br /&gt;
|formatDate(X,PAT)||return the string value of date X formatted according to Java data format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|formatNumber(X,PAT)||return the string value of number X formatted according to Java number format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|getAnsOption(X)||returns the text corresponding to the selected option for answer X||this is the same as X.shown&lt;br /&gt;
|-&lt;br /&gt;
|getAnsOption(X,Y)||returns the text corresponding to the option at index Y of node X||&lt;br /&gt;
|-&lt;br /&gt;
|getRelevance(X)||returns the relevance equation for question X||&lt;br /&gt;
|-&lt;br /&gt;
|getStartTime()||returns the date corresponding to the system time when the interview was started||&lt;br /&gt;
|-&lt;br /&gt;
|getType(X)||returns the string name of the datatype - e.g. *NA* if isNA()||&lt;br /&gt;
|-&lt;br /&gt;
|gotoFirst()||jumps to the first relevant set of questions - this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|gotoNext()||jumps to the next set of relevant questions - this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|gotoPrevious()||jumps to the previous set of relevant questions - this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|isAsked(X)||returns true if the answer is neither *NA*, *INVALID*, nor *UNASKED*||&lt;br /&gt;
|-&lt;br /&gt;
|isInvalid(X)||returns true if the answer is of type *INVALID*||&lt;br /&gt;
|-&lt;br /&gt;
|isNA(X)||returns true if the answer is of type *NA*||&lt;br /&gt;
|-&lt;br /&gt;
|isNotUnderstood(X)||returns true if the answer if of type *HUH*||&lt;br /&gt;
|-&lt;br /&gt;
|isRefused(X)||returns true if the answer is of type *REFUSED*||&lt;br /&gt;
|-&lt;br /&gt;
|isSpecial(X)||returns true if the answer is of type *UNASKED*, *NA*, *REFUSED*, *INVALID*, *UNKNOWN*, or *HUH*||&lt;br /&gt;
|-&lt;br /&gt;
|isUnknown(X)||returns true if the answer is of type *UNKNOWN*||&lt;br /&gt;
|-&lt;br /&gt;
|jumpTo(X)||jump to the group containing the named question -- this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|jumpToFirstUnasked()||jump to the first unasked question &amp;lt;strike&amp;gt; thus bypassing previous answered questions &amp;lt;/strike&amp;gt; this violates the normal flow of the system||&lt;br /&gt;
|-&lt;br /&gt;
|lastIndexOf(X,Y)||returns the last index (base 0) of string Y in string X. Returns -1 if Y is not contained within X||&lt;br /&gt;
|-&lt;br /&gt;
|list(X,...)||a string containing a comma separated list of the positive values with &amp;quot;and&amp;quot; separating the last two||&lt;br /&gt;
|-&lt;br /&gt;
|mean(X,...)||returns the mean of a list of values||&lt;br /&gt;
|-&lt;br /&gt;
|numAnsOptions(X)||returns the number of answer options that question X has||&lt;br /&gt;
|-&lt;br /&gt;
|orlist(X,...)||a string containing a comma separated list of the positive values, with &amp;quot;or&amp;quot; separting the last two||&lt;br /&gt;
|-&lt;br /&gt;
|parseDate(X,PAT)||returns the date value of string X parsed with Java date format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|parseNumber(X,PAT)||returns the numerical value of string X parsed with Java number format pattern PAT||&lt;br /&gt;
|-&lt;br /&gt;
|showAllResponsesExcept( questionList,attributeList,attributeTitleList)||questionList = pipe-delimited list of question identifiers; attributeList = pipe-delimited list of attributes (like question#, title, text, type - so you can decide what to show); attributeTitleList = pipe-delimited list of table headers, so can internationalize the report.||&lt;br /&gt;
|-&lt;br /&gt;
|showTheseResponses( questionList,attributeList,attributeTitleList)||questionList = pipe-delimited list of question identifiers; attributeList = pipe-delimited list of attributes (like question#, title, text, type - so you can decide what to show); attributeTitleList = pipe-delimited list of table headers, so can internationalize the report.|| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Expression Manager Knows Which Variables are Local== &amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:180--&amp;gt;&lt;br /&gt;
In order to properly build the JavaScript for page, Expression Manager needs to know which variables are set on the page, and what their JavaScript ID is (e.g. for document.getElementById(x)).  It also must know which variables are set on other pages (so that it can ensure that the needed &amp;lt;input type=&#039;hidden&#039; value=&#039;x&#039;&amp;gt; fields are present and populated).&lt;br /&gt;
&lt;br /&gt;
==Cascading Conditions== &amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:182--&amp;gt;&lt;br /&gt;
If any of the variables are irrelevant, the whole equation will be irrelevant (false).  For example, in the following table, N/A means that one of the variables was not relevant&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:183--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Operator!!Example!!a!!b!!Result&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;+ (unary)&amp;lt;/nowiki&amp;gt;||&amp;lt;nowiki&amp;gt;+a&amp;lt;/nowiki&amp;gt;||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|- (unary)||-a||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|!||!a||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|== (or eq)||a == b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|== (or eq)||a == b||N/A||0||false&lt;br /&gt;
|-&lt;br /&gt;
|== (or eq)||a == b||N/A||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|!= (or ne)||a != b||N/A||5|| false&lt;br /&gt;
|-&lt;br /&gt;
|!= (or ne)||a != b||N/A||N/A|| false&lt;br /&gt;
|-&lt;br /&gt;
|!= (or ne)||a != b||N/A||0||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt; (or gt)||a &amp;gt; b||N/A||5|| false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;= (or ge)||a &amp;gt;= b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt; (or lt)||a &amp;lt; b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;= (or le)||a &amp;lt;= b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|and||a and b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|and||a and b||N/A||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|or||a or b||N/A||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|or||a or b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;+&amp;lt;/nowiki&amp;gt;||a + b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|-||a - b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|*||a * b||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|/||a / b||5||N/A||false&lt;br /&gt;
|-&lt;br /&gt;
|()||(a)||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|(exp)||(a &amp;amp;&amp;amp; b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|(exp) op (exp)||(b + b) &amp;gt; (a &amp;amp;&amp;amp; b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||sum(a,b,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||max(a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||min(a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||implode(&#039;, &#039;,a,b,a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||if(a,a,b)||N/A||5||false&lt;br /&gt;
|-&lt;br /&gt;
|function||is_empty(a)||N/A|| ||false&lt;br /&gt;
|-&lt;br /&gt;
|function||is_empty(a)||0 (or blank)|| ||true&lt;br /&gt;
|-&lt;br /&gt;
|function||!is_empty(a)||N/A|| ||false&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Overriding Cascading Conditions=== &amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:185--&amp;gt;&lt;br /&gt;
Say you want to show a running total of all relevant answers.  You might try to use the equation {sum(q1,q2,q3,...,qN)}.  However, this gets translated internally to LEMif(LEManyNA(&#039;q1&#039;,&#039;q2&#039;,&#039;q3&#039;,...,&#039;qN&#039;),&#039;&#039;,sum(LEMval(&#039;q1&#039;),LEMval(&#039;q2&#039;),LEMval(&#039;q3&#039;),...,LEMval(&#039;qN&#039;))).  So, if any of the values q1-qN are irrelevant, the equation will always return false.  In this case, the sum() will show 0 until all questions are answered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:186--&amp;gt;&lt;br /&gt;
To get around this, each variable can have a &amp;quot;.NAOK&amp;quot; suffix (meaning that Not Applicable is OK) added to it.  In such cases, the following behavior occurs.  Say you have a variable q1.NAOK&lt;br /&gt;
#q1 is not added to the LEManyNA() clause&lt;br /&gt;
#LEMval(&#039;q1&#039;) will  continue to check whether the response is relevant, and will return &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt; if it is not (so individual irrelevant responses will be ignored, but they will not void the entire expression).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:187--&amp;gt;&lt;br /&gt;
So, the solution to the running total problem is to use the equation sum(q1.NAOK,q2.NAOK,q3.NAOK,...,qN.NAOK).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
The use of the .NAOK suffix also lets authors design surveys that have several possible paths but then converage on common paths later.  For example, say subjects answer a survey in a way that is outside the normal range of responses.  The author could alert the subjects that they may not get valid results, and ask them whether they really want to  continue with the survey.  If they say Yes, then the rest of the questions will be shown.  The condition for the &amp;quot;rest of the questions&amp;quot; would check whether the initial responses were answered within the normal range OR whether the subject said Yes to the question that is only relevant if they answered outside the normal range.&lt;br /&gt;
&lt;br /&gt;
==How does Expression Manager Support Conditional Micro-Tailoring?== &amp;lt;!--T:189--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:190--&amp;gt;&lt;br /&gt;
Here is an example of micro-tailoring (where Question Type==&#039;expr&#039; means an Equation):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:191--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Question Code!!Relevance!!Question Type!!Question&lt;br /&gt;
|-&lt;br /&gt;
|name||1||text||What is your name?&lt;br /&gt;
|-&lt;br /&gt;
|age||1||text||How old are you?&lt;br /&gt;
|-&lt;br /&gt;
|badage||!is_empty(age)||expr||{(age&amp;lt;16) or (age&amp;gt;80)}&lt;br /&gt;
|-&lt;br /&gt;
|agestop||badage||message||Sorry, {name}, you are too {if( (age&amp;lt;16),&#039;young&#039;,if( (age&amp;gt;80),&#039;old&#039;,&#039;middle-aged&#039;) ) } for this test.&lt;br /&gt;
|-&lt;br /&gt;
|kids||!badage||yesno||Do you have children?&lt;br /&gt;
|-&lt;br /&gt;
|parents||1||expr||{!badage &amp;amp;&amp;amp; kids==&#039;Y&#039;}&lt;br /&gt;
|-&lt;br /&gt;
|numKids||parents||text||How many children do you have?&lt;br /&gt;
|-&lt;br /&gt;
|kid1||parents &amp;amp;&amp;amp; numKids &amp;gt;= 1||text||How old is your first child?&lt;br /&gt;
|-&lt;br /&gt;
|kid2||parents &amp;amp;&amp;amp; numKids &amp;gt;= 2||text||How old is your second child?&lt;br /&gt;
|-&lt;br /&gt;
|kid3||parents &amp;amp;&amp;amp; numKids &amp;gt;= 3||text||How old is your third child?&lt;br /&gt;
|-&lt;br /&gt;
|kid4||parents &amp;amp;&amp;amp; numKids &amp;gt;= 4||text||How old is your fourth child?&lt;br /&gt;
|-&lt;br /&gt;
|kid5||parents &amp;amp;&amp;amp; numKids &amp;gt;= 5||text||How old is your fifth child?&lt;br /&gt;
|-&lt;br /&gt;
|sumage||1||expr||{sum(kid1.NAOK,kid2.NAOK,kid3.NAOK,kid4.NAOK,kid5.NAOK)}&lt;br /&gt;
|-&lt;br /&gt;
|report||parents||yesno||{name}, you said you are {age} and that you have {numKids}.  The sum of ages of your first {min(numKids,5)} kids is {sumage}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
All of these questions can be on a single page (e.g. in the same group), and only the relevant questions will display.  Moreover, as you enter the ages of children, the sum() expression in the last question will dynamically update on the page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:193--&amp;gt;&lt;br /&gt;
Expression Manager provides this functionality by surrounding each expression with a named &amp;lt;span&amp;gt; element.  Every time a value changes, it recomputes the expression that should appear in that &amp;lt;span&amp;gt; element and regenerates the display.  You can have dozens, or even hundreds, of such tailored expressions on the same page, and the page will re-display all of them in a single screen refresh.&lt;br /&gt;
&lt;br /&gt;
==Mapping of LimeSurvey 1.91+ to Expression Manager Functionality== &amp;lt;!--T:194--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:195--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Old Feature!!New Feature!!Comments&lt;br /&gt;
|-&lt;br /&gt;
|Conditions||Relevance||You can use very complex conditional equations, and access a broader range of variables&lt;br /&gt;
|-&lt;br /&gt;
|Assessments||Equation||Any assessment scores can be re-structured into an Equation. This both ensures that the score is written to the database, and also lets you see dynamic changes to the score value on the current page&lt;br /&gt;
|-&lt;br /&gt;
|Replacements||Expression Manager||The core engine takes the input string and treats everything within curly braces as an Expression - so it handles all historical replacements types.  To avoid messing up embedded JavaScript, Expression Manager only processes content between curly braces as long as (a)  there is no leading or trailing whitespace within the curly braces - e.g. {expr} is an expression, but { expr}, {expr }, and { expr } are not expressions.  Furthermore, Expression Manager does not process content within its own strings (e.g. {list(&#039;hi&#039;,&#039;there {braces}&#039;)} generates &amp;quot;hi there {braces}&amp;quot;).  It also ignores escaped curly braces (e.g. \{this is not an expression\})&lt;br /&gt;
|-&lt;br /&gt;
|Validation||Expression Manager||The plan is to take the current min/max Question Attributes and have Expression Manager process them.  That way the min/max values can be expressions themselves&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Syntax Highlighting= &amp;lt;!--T:196--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:197--&amp;gt;&lt;br /&gt;
To help with entering and validating expressions, EM provides syntax highlighting with the following features:&lt;br /&gt;
&lt;br /&gt;
==Types and Meanings of Syntax Highlighting== &amp;lt;!--T:198--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:199--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Color!!Sample!!Meaning!!Tooltip!!Comments&lt;br /&gt;
|-&lt;br /&gt;
|tan background||style=&#039;background-color: #eee8aa&#039;|Sample||the whole equation||none||Anything within curly braces that is recognized as an equation (e.g. there is no leading or trailing whitepace) will be color-coded with a tan background to help distinguish it from surrounding text&lt;br /&gt;
|-&lt;br /&gt;
|blue bold text||style=&#039;color:blue; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||function name||meaning and allowable syntax||function names, or things that should be functions since they are followed by an opening parenthesis, are presented in bold blue text.  Tooltips show the meaning and allowable syntax for the function.&lt;br /&gt;
|-&lt;br /&gt;
|grey text||style=&#039;color:grey; background-color:#eee8aa&#039;|Sample||string||none||single and double-quoted strings are shown in grey text&lt;br /&gt;
|-&lt;br /&gt;
|bold maroon text||style=&#039;color:maroon; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on the same page, but after the current question||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on the same page but after the current question is shown in bold maroon text.  This color coding should alert authors to possible errors in question sequencing; but it is allowed since some authors may want this sequence of variables a page, especially for dynamic reports.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold cyan text||style=&#039;color:#4C88BE; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on the same page, prior to the current question||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on the same page and prior to the current question is shown in bold cyan text.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold green text||style=&#039;color:green; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on a prior page||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on a prior page is shown in bold green text.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold pink text||style=&#039;color:#FF00FF; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||variable set on a later page||&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;name or SGQA code]: question; value; answerList showing codes for each value||Any variable that is set on a prior page is shown in bold pink text.  These are erorrs since the variable is  being used before it is declareed.  The tooltip shows its name (if you used INSERTANS:xxx) or SGQA code (if you used the new naming system), the actual question, and its current value (or blank if not set).  If the question type expects responses from an enumerated value set, the mapping of the codes to display values is show.&lt;br /&gt;
|-&lt;br /&gt;
|bold tan text||style=&#039;color:#996600; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||a lime replacement value||the value||Lime Replacement Strings (like {TOKEN:xxx}, {PRIVACY_MESSAGE}) are shown in bold tan text.  &lt;br /&gt;
|-&lt;br /&gt;
|red text||style=&#039;color:red; background-color:#eee8aa&#039;|Sample||assignment operator||warning message||If you use one of the assignment operator (=) that operator will be displayed in red text.  This is meant to help prevent accidental re-assignment of values when you really meant to check whether a == b instead of  setting the value of a = b.&lt;br /&gt;
|-&lt;br /&gt;
|normal black text||style=&#039;color:black; background-color:#eee8aa&#039;|Sample||punctuation||none||All other punctuation within the expression is shown as normal black text.&lt;br /&gt;
|-&lt;br /&gt;
|red-boxed text||a bold red line surrounds the error||syntax error||description of the error||Any detected syntax errors are shown by surrounding the error with a red box.  The tooltip shows the error.  Examples include unmatched parentheses, use of undefined functions, passing the wrong number of arguments to functions, poorly structured expressions (e.g. missing operators between variables), trying to assign a new value to a read-only variable, trying to assign values to non-variables, or using unsupported syntax.  Note that the syntax error dectection system may only report one error in an expression even if there are multiple errors; however, if any errors are detected, at least one error will be shown.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Relationship to LimeSurvey Ideas / Feature Requests= &amp;lt;!--T:200--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:201--&amp;gt;&lt;br /&gt;
Expression Manager provides complete or partial solutions to each of the following:&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/1 Conditions]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/3/ Answercounts]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/5 Advanced reporting for assessments]&lt;br /&gt;
**partial: Equations let one store the Assessment value in the database, and micro-tailoring can generate simple formatted reports.  Authors can access those Equation values if they have more complex reporting needs.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/6 Assessment reports]&lt;br /&gt;
**partial:  Since Equations store the Assessment score, it should be possible to use Statistics to show distributions of those scores, and Quotas to limit the number of responses with those scores.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/7 Store assessment results for further evaluation]&lt;br /&gt;
**Equations let one store the Assessment value in the database, completely solving this problem&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/22/ More advanced condition rules]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/28 Open Answertable up so that we can alter formatting]&lt;br /&gt;
**partial:  All of the question attributes are available, so authors can create custom AnswerTable equivalents as a Question.  Once implatemented, they can also use the showTheseResponses() or showAllResponsesExecpt() functions&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/37 Export survey results with full questions to include images]&lt;br /&gt;
**since Tailoring has access to the full question text, it can include images in the export&lt;br /&gt;
**if subjects choose Print Your Answers after finishing the survey, those printouts will be fully tailored&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/63 List of question codes and SGQA identifiers]&lt;br /&gt;
**The Show Survey Logic view shows that mapping (plus much more information)&lt;br /&gt;
**In addition, you no longer have to use SGQA codes to refer to variables - you can use the Question code/title.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/69 Branch/jump to another question (earlier or later) based on current question]&lt;br /&gt;
**You can use the Navigation Index for this in most cases&lt;br /&gt;
**Once implemented, you can use the JumpTo() function.  Like the Navigation Index, if you try to jump forward, it will stop on an intervening page if there are any of the relevant mandatory questions are unanswered, or if any relevant questions fail validation tests.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/86 set quota for total responses]&lt;br /&gt;
**If the final question is an Equation that flags a survey as completed (so is NULL if a respondant does not get to that page), you can use Quotas on that question to control the number of completed responses.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/101 Review all conditions]&lt;br /&gt;
**The [[Show Logic File|Show Logic File]] view shows this (and much more)&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/105 Review all questions + Review all groups]&lt;br /&gt;
**The [[Show Logic File|Show Logic File]] view shows this (and much more)&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/107 How to visualize questions, logic &amp;amp; conditions]&lt;br /&gt;
**The [[Show Logic File|Show Logic File]] view shows this (and much more)&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/113 Offline Surveys]&lt;br /&gt;
**Running a survey with all of the questions on the same page would let you do off-line data collection  (e.g. email the html page and associated JavaScript).  However, you would still want a way to submit the results so that they did not get lost.  It may be possible to use Save As HTML to save partially completed responses.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/120 Remove INSERTANS from question text at survey results]&lt;br /&gt;
**INSERTANS is no longer needed.  You can refer to a variable by its SGQA code (without prefixing it with INSERTANS:), or by its question code.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/137 Informed Consent and Authorization Functionality]&lt;br /&gt;
**You can show the informed consent on the welcome page, then ask any additional questions needed (to ensure they meet the study inclusion/exclusion criteria), and ask them a Yes/No question whether they give their consent.  Then, make all of the remaining questions conditional on that yesNo.  For example, if the question is named &#039;&#039;consent&#039;&#039;, you would set the relevance to the remaining questions to &#039;&#039;consent == &amp;quot;Y&amp;quot;&#039;&#039; (possibly &#039;&#039;and&#039;&#039;ing that with whatever additional conditions you needed to support your branching needs).&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/199 Show codes instead of of answers using INSERTANS]&lt;br /&gt;
**{Qcode} returns the code instead of the response text (which you can get via {INSERTANS:SGQA}, or {Qcode.shown})&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/204 Need group mean or calculations for assessments]&lt;br /&gt;
**Say you have N variables of which N-X were answered, you could compute the mean of the answered variables as {sum(var1, var2, ..., varN) / count(var1, var2, ..., varN)}&lt;br /&gt;
**Computing the mean across a set of respondants would require extension of the Quota functionality.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/222 To insert a language dependent text]&lt;br /&gt;
**Tailoring lets you conjugate verbs and decline nouns in each language&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/225 Surveyors should approve their answers]&lt;br /&gt;
**Custom Questions with tailoring, or the showAllResponsesExcept() function will let respondants see all of the questions and responses before clicking Submit. If the Navigation Menu option is enabled, it is easy to go back and correct answers.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/1.92 Suppliment to #answernnXnnXnnn method of targetting form elements]&lt;br /&gt;
**You can now refer to questions and answers by their Question Code, so there is no longer a need to modify SGQA values.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/262 More flexibility with hidden questions]&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/265 Remove specific conditions from multiple questions]&lt;br /&gt;
**You can now use Relevance, which is easier to manage than Conditions.  If  needed, they can all be exported from the database, edited in a spreadsheet, and re-imported.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/268 Cross Survey Reporting]&lt;br /&gt;
**By using question codes that are unique across your surveys and versions, you can consolidate data from multiple surveys and/or compare them&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/275 Simplifying integration with other tools]&lt;br /&gt;
**Expression Manager uses Question Codes instead of SGQA, making it easier to integrate with other tools.&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/1.92 Expose assessment score to 3rd party app processing]&lt;br /&gt;
**This can be done with Equation question type&lt;br /&gt;
*[http://ideas.limesurvey.org/ideatorrent/idea/309 Multiple thank you pages]&lt;br /&gt;
**This can be supported via conditional relevance branching and tailoring&lt;br /&gt;
&lt;br /&gt;
=Additional Reading= &amp;lt;!--T:202--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager Sample Surveys|Expression Manager Sample Surveys]]== &amp;lt;!--T:203--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager HowTos|Use Cases and HowTos]]== &amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager Examples|Step-by-Step Examples]].== &amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager for developers|Reference for Developers]]== &amp;lt;!--T:206--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager Roadmap|RoadMap/Status/ToDo List]]== &amp;lt;!--T:207--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=QS:Array_filter_exclude&amp;diff=57534</id>
		<title>QS:Array filter exclude</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=QS:Array_filter_exclude&amp;diff=57534"/>
		<updated>2013-10-10T07:26:03Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Array exclusion filter (array_filter_exclude)=== &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
The Array filter exclusion advanced setting allows you to use a multiple choice question to select or set which responses &#039;&#039;&#039;won&#039;t&#039;&#039;&#039; display in a subsequent list, array or multiple choice question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Starting in 1.92, subsequent questions can be filtered on any array question types, including:&lt;br /&gt;
*Multiple choice&lt;br /&gt;
*Multiple choice with comments&lt;br /&gt;
*Multiple short text&lt;br /&gt;
*Multiple numeric&lt;br /&gt;
*Array (5 point, 10 point, Yes/No/Unknown, Increase/Same/Decrease, Column)&lt;br /&gt;
*Array (Dual Scale, Text, Numbers)&lt;br /&gt;
*Ranking&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
Furthermore, each of these types of questions can filtered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
The only exception is Array (Column), which can filter other questions, but can not itself be filtered.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;To set a filter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
Enter the question code of a multiple options question to use as the source information. For example, if your source multiple option question code is &amp;quot;Q1&amp;quot; enter &amp;quot;Q1&amp;quot; into &#039;Array filter exclusion&#039; input in the &#039;&#039;&#039;advanced settings&#039;&#039;&#039; of the question you want to filter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Starting in 1.92, you can enter multiple array_filter_exclude options for a single question, separated by semicolons&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
The source question has to contain exactly the same list of answers/subquestion as the question you wish to filter. Your question will then only display those answers/subquestion that were not selected in the multiple options question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
If the questions do not have exactly the same set of answers/subquestions and codes, then the filters will break.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Starting in 1.92, if Q2 has sub-questions that are not present in Q1, they will always be displayed rather than breaking the filters.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Cascading&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
The Array filter exclusions settings will cascade &amp;amp;ndash; that is you can select a question which filters another question, which filters another question, and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
Ticking items &#039;One&#039; and &#039;Three&#039; in the first question results in those questions not being displayed in the subsequent question which uses array filter exclusion&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
Multi Option Question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
Code:Q1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
Question: Which animals do you like?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
1 Cat&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
2 Dog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
3 Zebra&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
Array 5 Point Choice Question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
[[Category:Question Settings]][[Category:Advanced Question Settings]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=How_to_join_the_LimeSurvey_project_team&amp;diff=57533</id>
		<title>How to join the LimeSurvey project team</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=How_to_join_the_LimeSurvey_project_team&amp;diff=57533"/>
		<updated>2013-10-10T00:23:45Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=We need you!= &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
So.. you think LimeSurvey is a great product and you would like to contribute?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Hey, you do not have to necessarily write code! You also could be a tester, translator, supporter or all of it. You are welcome! Or maybe you hacked a little in the source and created a nifty new feature and/or you would like to do future development in this project? We love you!&lt;br /&gt;
&lt;br /&gt;
=How to become a LimeSurvey developer/translator/team member?= &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Common requirements== &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
*Be a team player, nice &amp;amp; polite.&lt;br /&gt;
*Communicate much and often with the other team members. Show up to the development meetings. Show up in our IRC channel ([irc://irc.freenode.net/limesurvey]) to get a glimpse what is going on.&lt;br /&gt;
*Share your thoughts. Don&#039;t be single minded. Discuss your ideas with the other team members.&lt;br /&gt;
*Real life comes first - but give us a small notice if and for how long you will be gone.&lt;br /&gt;
*Developers come and go in an open source project - that is absolutely normal. However if you leave the project please give us a notice and tell us how far you are, what you did and if there are things still to do so that someone else can pick up your work.&lt;br /&gt;
*Attend to the developers meeting which take place every Monday on 22:00 Berlin time on the channel #limesurvey-team on irc.freenode.org (ask Carsten Schmitz for the password - see below)&lt;br /&gt;
&lt;br /&gt;
==First steps== &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
If you agree to the above points please follow these steps:&lt;br /&gt;
#Create a personal account on the limesurvey.org website here (if you don&#039;t have one): [http://www.limesurvey.org/en/component/comprofiler/registers]&lt;br /&gt;
#Create a personal account on gitHub here (if you don&#039;t have one): [https://github.com/signup/free]&lt;br /&gt;
#Make sure you subscribe to the limesurvey-developer mailing list at [http://sourceforge.net/p/limesurvey/mailman/?source=navbar]. If you want to get notified of any changes in the development source code then subscribe to the limesurvey-git list too.&lt;br /&gt;
#If you use a Windows System get the Git client SmartGit (there are others but we recommend this one) to access the source code gitHub. You can download it from [http://www.syntevo.com/smartgithg/]&lt;br /&gt;
#Introduce yourself on the limesurvey-developer mailing list and provide the following information:&lt;br /&gt;
## A short resume (so we can see what your background is)&lt;br /&gt;
## Tell us why you would like to work in the LimeSurvey project (&#039;I am bored to death!&#039;, &#039;I like your style...&#039;) (:wink:)&lt;br /&gt;
## Tell us in what area you would like to help (coding, patching, support etc.)&lt;br /&gt;
# Carsten Schmitz will get back to you as soon as possible. He is a very nice guy and will give you an introduction and will provide more information on the next steps.&lt;br /&gt;
# Visit the [http://www.limesurvey.org/en/community-services/live-chat official LimeSurvey IRC Channel] and SAY HELLO TO US!&amp;lt;br /&amp;gt;([irc://irc.freenode.net/limesurvey])&lt;br /&gt;
&lt;br /&gt;
==Additional information for new developers== &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
LimeSurvey contains a lot of old and mess code - but by now we strictly pay attention to coding guidelines which are very important.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
Coding Guidelines and Generic Code Implementation will help you and any developers working on your code at a later time by easier understanding your code and making it more modular.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
To ensure this quality we are mentoring new developers using the following steps:&lt;br /&gt;
# At first we only assign small tasks to the new developer. What task is assigned will be decided together with the new developer.&lt;br /&gt;
# The developer sends the code to the mentor for review.&lt;br /&gt;
# If the mentor is satisfied with the code quality the developer may commit the code to the repository.&lt;br /&gt;
# Rinse and repeat Step 1 to 3 until the mentor states that the new developer is ready to submit patches freely to the repository.&lt;br /&gt;
&lt;br /&gt;
==Additional information for new supporters== &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
Giving support is a specialty since you are interacting with lots of different persons, friendly and not so friendly, strict or sloppy, eager or calm.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Therefore we have a special request to persons who give support in the channel or forums:&lt;br /&gt;
*&#039;&#039;&#039;Don&#039;t be caught by support burnout&#039;&#039;&#039;.  It&#039;s nearly impossible to answer every technical question that is asked in the forum. In many cases, the problem doesn&#039;t lie in the technical aspects of the question; cultural barriers may get in the way of communication, or it may be difficult to explain to a newbie just where to begin. When you try to answer every question, regardless of difficulty, you set yourself up for support burnout. &amp;lt;br /&amp;gt;Support burnout is nearly always accompanied by the feeling that you&#039;re losing control of your time, that the people you&#039;ve set out to help are making unreasonable demands. The problem is that you&#039;re taking on too much responsibility; but it begins to appear instead that the problem is the end user who&#039;s asking for help.&amp;lt;br /&amp;gt;Different people react to support burnout in different ways. Some offer malicious advice, some insist that every question a newbie asks should be answered with a URL or by lists of manual references. &amp;lt;br /&amp;gt;Such arbitrary rule sets tend to grow longer over time, because they don&#039;t solve the real problem. You can&#039;t answer every question, and you shouldn&#039;t try. Be gentle, be courteous, be flexible and be as patient and helpful as you can - but let someone else try to answer questions that you find too frustrating. Don&#039;t try to be a superhuman support machine. Also leave room for user-to-user help. If you support every user and answer every question you do not necessarily boost the community thinking because too much activity takes away any other user motivation to help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=How_to_join_the_LimeSurvey_project_team&amp;diff=57532</id>
		<title>How to join the LimeSurvey project team</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=How_to_join_the_LimeSurvey_project_team&amp;diff=57532"/>
		<updated>2013-10-10T00:22:31Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt; &amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=We need you!= &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
So.. you think LimeSurvey is a great product and you would like to contribute?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Hey, you do not have to necessarily write code! You also could be a tester, translator, supporter or all of it. You are welcome! Or maybe you hacked a little in the source and created a nifty new feature and/or you would like to do future development in this project? We love you!&lt;br /&gt;
&lt;br /&gt;
=How to become a LimeSurvey developer/translator/team member?= &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Common requirements== &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
*Be a team player, nice &amp;amp; polite.&lt;br /&gt;
*Communicate much and often with the other team members. Show up to the development meetings. Show up in our IRC channel ([irc://irc.freenode.net/limesurvey]) to get a glimpse what is going on.&lt;br /&gt;
*Share your thoughts. Don&#039;t be single minded. Discuss your ideas with the other team members.&lt;br /&gt;
*Real life comes first - but give us a small notice if and for how long you will be gone.&lt;br /&gt;
*Developers come and go in an open source project - that is absolutely normal. However if you leave the project please give us a notice and tell us how far you are, what you did and if there are things still to do so that someone else can pick up your work.&lt;br /&gt;
*Attend to the developers meeting which take place every Monday on 22:00 Berlin time on the channel #limesurvey-team on irc.freenode.org (ask Carsten Schmitz for the password - see below)&lt;br /&gt;
&lt;br /&gt;
==First steps== &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
If you agree to the above points please follow these steps:&lt;br /&gt;
#Create a personal account on the limesurvey.org website here (if you don&#039;t have one): [http://www.limesurvey.org/en/component/comprofiler/registers]&lt;br /&gt;
#Create a personal account on gitHub here (if you don&#039;t have one): [https://github.com/signup/free]&lt;br /&gt;
#Make sure you subscribe to the limesurvey-developer mailing list at [http://sourceforge.net/p/limesurvey/mailman/?source=navbar]. If you want to get notified of any changes in the development source code then subscribe to the limesurvey-git list too.&lt;br /&gt;
#If you use a Windows System get the Git client SmartGit (there are others but we recommend this one) to access the source code gitHub. You can download it from [http://www.syntevo.com/smartgithg/]&lt;br /&gt;
#Introduce yourself on the limesurvey-developer mailing list and provide the following information:&lt;br /&gt;
## A short resume (so we can see what your background is)&lt;br /&gt;
## Tell us why you would like to work in the LimeSurvey project (&#039;I am bored to death!&#039;, &#039;I like your style...&#039;) (:wink:)&lt;br /&gt;
## Tell us in what area you would like to help (coding, patching, support etc.)&lt;br /&gt;
# Carsten Schmitz will get back to you as soon as possible. He is a very nice guy and will give you an introduction and will provide more information on the next steps.&lt;br /&gt;
# Visit the [http://www.limesurvey.org/en/community-services/live-chat official LimeSurvey IRC Channel] and SAY HELLO TO US!&amp;lt;br /&amp;gt;([irc://irc.freenode.net/limesurvey])&lt;br /&gt;
&lt;br /&gt;
==Additional information for new developers== &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
LimeSurvey contains alot of old and mess code - but by now we strictly pay attention to coding guidelines which are very important.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
Coding Guidelines and Generic Code Implementation will help you and any developers working on your code at a later time by easier understanding your code and making it more modular.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
To ensure this quality we are mentoring new developers using the following steps:&lt;br /&gt;
# At first we only assign small tasks to the new developer. What task is assigned will be decided together with the new developer.&lt;br /&gt;
# The developer sends the code to the mentor for review.&lt;br /&gt;
# If the mentor is satisfied with the code quality the developer may commit the code to the repository.&lt;br /&gt;
# Rinse and repeat Step 1 to 3 until the mentor states that the new developer is ready to submit patches freely to the repository.&lt;br /&gt;
&lt;br /&gt;
==Additional information for new supporters== &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
Giving support is a specialty since you are interacting with lots of different persons, friendly and not so friendly, strict or sloppy, eager or calm.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Therefore we have a special request to persons who give support in the channel or forums:&lt;br /&gt;
*&#039;&#039;&#039;Don&#039;t be caught by support burnout&#039;&#039;&#039;.  It&#039;s nearly impossible to answer every technical question that is asked in the forum. In many cases, the problem doesn&#039;t lie in the technical aspects of the question; cultural barriers may get in the way of communication, or it may be difficult to explain to a newbie just where to begin. When you try to answer every question, regardless of difficulty, you set yourself up for support burnout. &amp;lt;br /&amp;gt;Support burnout is nearly always accompanied by the feeling that you&#039;re losing control of your time, that the people you&#039;ve set out to help are making unreasonable demands. The problem is that you&#039;re taking on too much responsibility; but it begins to appear instead that the problem is the end user who&#039;s asking for help.&amp;lt;br /&amp;gt;Different people react to support burnout in different ways. Some offer malicious advice, some insist that every question a newbie asks should be answered with a URL or by lists of manual references. &amp;lt;br /&amp;gt;Such arbitrary rule sets tend to grow longer over time, because they don&#039;t solve the real problem. You can&#039;t answer every question, and you shouldn&#039;t try. Be gentle, be courteous, be flexible and be as patient and helpful as you can - but let someone else try to answer questions that you find too frustrating. Don&#039;t try to be a superhuman support machine. Also leave room for user-to-user help. If you support every user and answer every question you do not necessarily boost the community thinking because too much activity takes away any other user motivation to help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=QS:Array_filter_exclude&amp;diff=57513</id>
		<title>QS:Array filter exclude</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=QS:Array_filter_exclude&amp;diff=57513"/>
		<updated>2013-10-08T20:43:57Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Array exclusion filter (array_filter_exclude)=== &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
The Array filter exclusion advanced setting allows you to use a multiple choice question to select or set which responses &#039;&#039;&#039;won&#039;t&#039;&#039;&#039; display in a subsequent list, array or multiple choice question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Starting in 1.92, subsequent questions can be filtered on any array question types, including:&lt;br /&gt;
*Multiple choice&lt;br /&gt;
*Multiple choice with comments&lt;br /&gt;
*Multiple short text&lt;br /&gt;
*Multiple numeric&lt;br /&gt;
*Array (5 point, 10 point, Yes/No/Unknown, Increase/Same/Decrease, Column)&lt;br /&gt;
*Array (Dual Scale, Text, Numbers)&lt;br /&gt;
*Ranking&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
Furthermore, each of these types of questions can filtered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
The only exception is Array (Column), which can filter other questions, but can not itself be filtered.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;To set a filter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
Enter the question code of a multiple options question to use as the source information. For example, if your source multiple option question code is &amp;quot;Q1&amp;quot; enter &amp;quot;Q1&amp;quot; into &#039;Array filter exclusion&#039; input in the &#039;&#039;&#039;advanced settings&#039;&#039;&#039; of the question you want to filter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Starting in 1.92, you can enter multiple array_filter_exclude options for a single question, separated by semicolons&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
The source question has to contain exactly the same list of answers/subquestion as the question you wish to filter. Your question will then only display those answers/subquestion that were not selected in the multiple options question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
If the questions do not have exactly the same set of answers/subquestions and codes, then the filters will break.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Starting in 1.92, if Q2 has sub-questions that are not present in Q1, they will always be displayed rather than breaking the filters.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Cascading&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
The Array filter exclusions settings will cascade &amp;amp;ndash; that is you can select a question which filters another question, which filters another question, and so on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
Ticking items &#039;One&#039; and &#039;Three&#039; in the first question results in those questions not being displayed in the subsequent question which users array filter exclusion&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
Multi Option Question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
Code:Q1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
Question: Which animals do you like?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
1 Cat&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
2 Dog&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
3 Zebra&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
Array 5 Point Choice Question&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
[[Category:Question Settings]][[Category:Advanced Question Settings]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=How_to_design_a_good_survey_(guide)&amp;diff=57140</id>
		<title>How to design a good survey (guide)</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=How_to_design_a_good_survey_(guide)&amp;diff=57140"/>
		<updated>2013-10-06T15:10:37Z</updated>

		<summary type="html">&lt;p&gt;Nery: /* Matrix questions. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A Simple Guide to Making a Good Survey.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
LimeSurvey makes it easy to put together a survey very quickly. Unfortunately, that makes putting a bad survey together very easy too.&lt;br /&gt;
&lt;br /&gt;
In this page, you&#039;ll find a simple guide to putting together a survey which will not only be painless for your audience to answer, but will give you meaningful answers too.&lt;br /&gt;
&lt;br /&gt;
=Before making a survey.=&lt;br /&gt;
&lt;br /&gt;
Some important questions need to be answered before designing any questionnaire - actually even before deciding whether a questionnaire is the right way to go.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;What is is that you really want to find out with your research?&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on that:&lt;br /&gt;
*&#039;&#039;&#039;Will a survey help me for this problem? &#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;How the survey can help me to answer the problem?&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;Who are the right people to ask?&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;How can you reach them?&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;What is needed to make them understand your questions?&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;Which - if any - are the statistical methods you want/need to use on the data?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These are just a few of the issues you need to be clear about to even decide weather LimeSurvey is the right tool for you. LimeSurvey is great for fully structured (you know all the questions you might need to ask before you start the interview), standardized (everyone gets more or less the same questionnaire), mostly quantitative (it is mainly about numbers or questions with predefined answers) questionnaires which are collected online.&lt;br /&gt;
&lt;br /&gt;
To some extend you can of course vary from this: You can use LimeSurvey to collect answers to some sorts of phone interviews. You can use LimeSurvey to collect qualitative data, e.g. by using text questions.&lt;br /&gt;
&lt;br /&gt;
But at some point you might get to the conclusion that other research methods are more suitable.&lt;br /&gt;
&lt;br /&gt;
==Structuring a questionnaire.==&lt;br /&gt;
&lt;br /&gt;
To decide in which order to ask questions and how to group them, there  some aspects to consider, e.g.&lt;br /&gt;
&lt;br /&gt;
If possible, start with questions that are easy to answer and which all participants are comfortable answering. Often this will be screening questions anyway, i.e. questions you need to ask to find out whether you are asking the right people (use [[Setting conditions|conditions]] and/or [[Quotas|quotas]] to deal with these screening questions).&lt;br /&gt;
&lt;br /&gt;
Putting these ice breaking questions at the beginning might help to avoid participants to interrupt your survey as people might be less likely to terminate once they have already put some work into answering the questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;Which of the following fruit do you like?&lt;br /&gt;
#Apples   ()&lt;br /&gt;
#Bananas  ()&lt;br /&gt;
#Cherries ()&lt;br /&gt;
&lt;br /&gt;
(single choice)&lt;br /&gt;
&lt;br /&gt;
You can use Conditions, to make next question appear about cherries, if participant choosed answer &#039;&#039;cherries&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Why do you preffer cherries?&lt;br /&gt;
#They are tasty&lt;br /&gt;
#I love the color&lt;br /&gt;
#They are healthy&lt;br /&gt;
#They are juicy&lt;br /&gt;
#I love cherry pie.&lt;br /&gt;
&lt;br /&gt;
(multi choice (or single choice, depends if you need exact data) question)&lt;br /&gt;
&lt;br /&gt;
How much do you like cherries?&lt;br /&gt;
#1) Not much more than other fruit&lt;br /&gt;
#2) Like them pretty much, more than other fruit&lt;br /&gt;
#3) It&#039;s one of my favourite fruits!&lt;br /&gt;
#4) I ADORE CHERRIES!&lt;br /&gt;
&lt;br /&gt;
(single choice)&lt;br /&gt;
&lt;br /&gt;
Do you know any recipes releated to cherries?&lt;br /&gt;
&lt;br /&gt;
[textfield]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above is an example of easy attractive questions followed by main question.&lt;br /&gt;
&lt;br /&gt;
The point was to gather recipes releated to cherries, apples and bananas.&lt;br /&gt;
&lt;br /&gt;
On the other hand.&lt;br /&gt;
&lt;br /&gt;
If you need to ask problematic questions, you might think about using different pages (one page per group or one page per question) and putting theses questions at the very end. By this, if participants decide to interrupt, at least their former answers are saved.&lt;br /&gt;
&lt;br /&gt;
Another aspect for structure is to avoid biases introduced by the questionnaire itself.&lt;br /&gt;
&lt;br /&gt;
For example, in market research there are concepts which require unaided and aided questions. An example for an unaided question would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;quot;Which brands of chocolate do you know?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
(followed by an empty text box) &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The corresponding example for an aided question would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt; &amp;quot;Which of the following brands of chocolate do you know?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
(followed by a list of brands (multiple choice))&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you would like to include both into the same questionnaire, you should again make sure to put them on different pages and put the unaided version before the aided on - otherwise you will basically teach or at least actively remind participants about existing brands which will invalidate your results for a following unaided question.&lt;br /&gt;
&lt;br /&gt;
==Individual questions==&lt;br /&gt;
&lt;br /&gt;
Questions should be non-suggestive. So &amp;quot;What is your opinion about LimeSurvey?&amp;quot; is an acceptable question while &amp;quot;Don&#039;t you agree that LimeSurvey is a really great tool?&amp;quot; is most likely not.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
People may say &#039;&#039;&#039;&amp;quot;yes&amp;quot;&#039;&#039;&#039; to donate money if you ask the questions this way&lt;br /&gt;
* &#039;&#039;Do you love nature?&#039;&#039;&lt;br /&gt;
* &#039;&#039;Will you donate money to help the river?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
But probably will say &#039;&#039;&#039;&amp;quot;no&amp;quot;&#039;&#039;&#039; if you ask the questions this way:&lt;br /&gt;
* &#039;&#039;Is lack of money a problem for you?&#039;&#039;&lt;br /&gt;
* &#039;&#039;Will you donate money to help the river?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To avoid this kind of thing, try to have your questions go:&lt;br /&gt;
*from the least sensitive to the most sensitive&lt;br /&gt;
*from the more general to the more specific&lt;br /&gt;
*from questions about facts to questions about opinions&lt;br /&gt;
&lt;br /&gt;
Also, a survey question can be:&lt;br /&gt;
*&#039;&#039;&#039;Open-ended&#039;&#039;&#039; (the person can answer in any way they want), or&lt;br /&gt;
*&#039;&#039;&#039;Closed-ended&#039;&#039;&#039; (the person chooses from one of several options)&lt;br /&gt;
&lt;br /&gt;
Closed ended questions are much easier to total up later on, but may stop people giving an answer they really want.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;quot;&#039;&#039;What is your favorite color?&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Open-ended&#039;&#039;&#039;: Someone may answer &amp;quot;dark fuchsia&amp;quot;, in which case you will need to have a category &amp;quot;dark fuchsia&amp;quot; in your results.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Closed-ended&#039;&#039;&#039;: With a choice of only 12 colors your work will be easier, but they may not be able to pick their exact favorite color.&lt;br /&gt;
&lt;br /&gt;
Look at each of your questions and decide if they should be open-ended or closed ended (take the opportunity to rewrite any questions, too)&lt;br /&gt;
&lt;br /&gt;
Example: &amp;quot;&#039;&#039;What do you think is the best way to clean up the river&#039;&#039;?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Make it &#039;&#039;&#039;Open-ended&#039;&#039;&#039;: the answers won&#039;t be easy to put in a table or graph, but you may get some good ideas, and there may be some good quotes for your report.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;quot;&#039;&#039;How often do you visit the river?&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Make it &#039;&#039;&#039;Closed-ended&#039;&#039;&#039; with the following options:&lt;br /&gt;
*Nearly every day&lt;br /&gt;
*At least 5 times a year&lt;br /&gt;
*1 to 4 times a year&lt;br /&gt;
*Almost never&lt;br /&gt;
&lt;br /&gt;
You will be able to present this data in a neat bar graph.&lt;br /&gt;
&lt;br /&gt;
When working with multiple choices or single choice questions make sure to choose the right one and formulate both question and answers appropriately.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;Which of the following fruit do you like?&lt;br /&gt;
#Apples   ()&lt;br /&gt;
#Bananas  ()&lt;br /&gt;
#Cherries ()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is a typical multiple choice question, as you can like several of those - in contrary &amp;quot;Which of the following fruit do you prefer?&amp;quot; is a single choice question.&lt;br /&gt;
&lt;br /&gt;
Both fruit examples have been formulated to make clear that is is only about the fruit listed as answers. If your question would be &amp;quot;Which is you favorite fruit?&amp;quot; you should either have a really exhaustive list of fruit or - more likely, use LimeSurvey&#039;s setting to add an &amp;quot;other&amp;quot; field. More generally, answer options in most cased need to be complete, mutually exclusive and definite.&lt;br /&gt;
&lt;br /&gt;
If you have multiple or single choice questions with a lot of options for answers, you need to be aware that this might introduce another bias, as participants are likely to pay more attention to the very first options than to those in the middle. LimeSurvey offers a nice option to randomize the order of questions and to some extend diminish this problem.&lt;br /&gt;
&lt;br /&gt;
==What makes a good survey?==&lt;br /&gt;
&lt;br /&gt;
There are 3 features of a survey which might make it useful:&lt;br /&gt;
# The questions are clear and precise, collectively allowing for detailed,unambiguous and meaningful answers.&lt;br /&gt;
# All predefined answers provided and their formats are appropriate to the question.&lt;br /&gt;
# There is room for people to add additional information if they need.&lt;br /&gt;
&lt;br /&gt;
Adding to that, always keep the user experience in mind. Reading, scrolling and clicking are tyring activites, so:&lt;br /&gt;
# Avoid any unnecessary question&lt;br /&gt;
# Use conditions to avoid asking questions not relevant for a specific participant&lt;br /&gt;
# Keep questions and answers short easily readable - use appropriate markup&lt;br /&gt;
# Think about the trade-off between scrolling and clicking. Display everything on one page for short questionnaires (5-15 questions, depending on question complexity). Use groups wisely for longer questionnaires, i.e. group questions comprehensible; use group descriptions to give a clear statement about the topic of the following questions.&lt;br /&gt;
# Avoid confusing participants with different scales, i.e. limit the amount of different scales types, scale scopes and different scales descriptions as much as possible. Try not to change the direction of scales. (There are some methodological exceptions).&lt;br /&gt;
#For rating scales it might be useful use an even number of rating options so the user has to decide for a certain direction (see below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;Example for good answer scales:&lt;br /&gt;
&lt;br /&gt;
1. Very good&lt;br /&gt;
&lt;br /&gt;
2. Good&lt;br /&gt;
&lt;br /&gt;
3. Quite good&lt;br /&gt;
&lt;br /&gt;
4. Not that good&lt;br /&gt;
&lt;br /&gt;
5. Bad&lt;br /&gt;
&lt;br /&gt;
6. Very bad&lt;br /&gt;
&lt;br /&gt;
Example for bad answer scales:&lt;br /&gt;
&lt;br /&gt;
1. Good&lt;br /&gt;
&lt;br /&gt;
2. Fair&lt;br /&gt;
&lt;br /&gt;
3. Bad&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The best way to start designing a survey is to take a second to imagine your ideal feedback. It goes without saying that meaningful responses are the most useful ones, so try to create questions which invite these answers.&lt;br /&gt;
&lt;br /&gt;
How can you go about that? The best method is to split up all the areas and decide on what information you need.&lt;br /&gt;
&lt;br /&gt;
For example, imagine you held an event, open to the public, and needed to get some general feedback about the event.&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;bad&amp;quot; survey might be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;Did you enjoy the Event?&lt;br /&gt;
&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
How good was the wifi?&lt;br /&gt;
&lt;br /&gt;
1 2 3 4 5 6 7 8 9 10&lt;br /&gt;
&lt;br /&gt;
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )&lt;br /&gt;
&lt;br /&gt;
Did you arrive OK?&lt;br /&gt;
&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
Was the provided map OK?&lt;br /&gt;
&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
Were how did you feel about the mixture of speakers?&lt;br /&gt;
&lt;br /&gt;
( ) Very sad ( ) Sad( ) Neutral ( ) Happy ( ) Very Happy&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Survey Bias==&lt;br /&gt;
&lt;br /&gt;
In obtaining market research, one of the most critical things to avoid is the issue of survey bias - that is, asking the respondent questions which may influence the results he or she provides and thus invalidates or skews your data.  It is very easy and common for a company or individual without the proper market research education and experience to err in this way.  This extends to many things, such as the way a question is phrased, to the types of responses which are available, to the way that an interviewer presents the questions if data is being collected by phone or in-person.&lt;br /&gt;
&lt;br /&gt;
For example, a biased survey question may be written as such:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;How much did you enjoy the event?&lt;br /&gt;
&lt;br /&gt;
( )Very much&lt;br /&gt;
&lt;br /&gt;
( )A little bit&lt;br /&gt;
&lt;br /&gt;
( )Not very much&lt;br /&gt;
&lt;br /&gt;
( )Not at all&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At first glance, it appears that there is no problem with the structure of this question.  After all, the respondent is able to provide his or her answer from &amp;quot;very much&amp;quot; to &amp;quot;not at all&amp;quot;.  However, the problem appears in the question phrasing itself.  By asking the respondent &amp;quot;How much&amp;quot; he or she enjoyed the event, the interview has already established a bias by assuming that the respondent enjoyed the event in some way or another, which may not be the case.&lt;br /&gt;
&lt;br /&gt;
The following example would be a far better what to ask the question which does not lead or bias the respondent in any way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;How would you rate your overall enjoyment of the event on a 1 to 5 scale, where 1 is &amp;quot;Not at all enjoyed&amp;quot; and 5 is &amp;quot;Completely enjoyed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
1 2 3 4 5&lt;br /&gt;
&lt;br /&gt;
( ) ( ) ( ) ( ) ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using this modified question, the respondent is not led to the assumption that any enjoyment was had, and is able to supply an answer in a numerical way that makes it easy for him or her to specify the enjoyment level, and makes it easy for the survey solicitor to tabulate and compare the results with other respondents.&lt;br /&gt;
&lt;br /&gt;
This is just one minor example of a good survey design principle.  This understanding extends to all things.&lt;br /&gt;
&lt;br /&gt;
==Matrix questions.==&lt;br /&gt;
&lt;br /&gt;
That may be a bit of a generalisation, but its a good rule to live by. &lt;br /&gt;
Anything that involves a scale of any sort should be avoided &lt;br /&gt;
unless you want an answer that can be measured on a scale, like age, time (maybe) or quantities. &lt;br /&gt;
Similarly, a matrix of compulsory questions can be a bit of a deterrent for your audience as not only are they badly structured, &lt;br /&gt;
but they don&#039;t allow for any extra information.&lt;br /&gt;
&lt;br /&gt;
Chances are if someone is completing your survey they want to give feedback, and if they don&#039;t think they can share anything useful they&#039;ll just close the window and move on.&lt;br /&gt;
&lt;br /&gt;
So what&#039;s wrong with the survey above?&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at each question step by step.&lt;br /&gt;
&lt;br /&gt;
Question 1 doesn&#039;t really achieve anything. Imagine receiving 100 &amp;quot;no&amp;quot; responses. Firstly you&#039;d be sad, but secondly you would have absolutely nothing to do with the information. We&#039;ll look at a possible improvement to this in a moment.&lt;br /&gt;
&lt;br /&gt;
Question 2 is so bad it&#039;s painful. If we go back to our 3 steps, we see that the questions need to be clear and precise. I&#039;m not an expert in Wifi but I&#039;m fairly certain you don&#039;t measure it in &amp;quot;goods&amp;quot;. What&#039;s more, it doesn&#039;t allow for a meaningful answer &amp;amp;ndash; What will you do with the knowledge that while 33% of people rated your wifi as being 6 good, only 23% rated it as 7 good? Point number 2 tells us that the predefined answers need to be appropriate to the question.&lt;br /&gt;
&lt;br /&gt;
It&#039;s fairly obvious that a scale of 1 to 10 won&#039;t help you improve on the quality of your wifi. The real killer in this one is the need to have space for people to add additional information. How could someone report a specific problem?&lt;br /&gt;
&lt;br /&gt;
In this case? It&#039;s impossible. Surveys are all about finding out something you can work with or learn from.&lt;br /&gt;
&lt;br /&gt;
The next two questions have the same result &amp;amp;ndash; they provide a platform for people to say yes or no. And neither of those questions allow for detail. In a better survey, which we&#039;ll consider in a moment, you could learn particular problems from specific people.&lt;br /&gt;
&lt;br /&gt;
The final question is another painful one. Asking for the level of satisfaction about something is pretty much useless, as every person has different interests, and so everyone will likely have different opinions on each speaker. It&#039;s another example of where a range question is being used and shouldn&#039;t be.&lt;br /&gt;
&lt;br /&gt;
Have a look at the improved survey there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;Did you make use of the in-house wifi?&lt;br /&gt;
&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
Did you experience any problems?&lt;br /&gt;
&lt;br /&gt;
( ) No problems at all&lt;br /&gt;
&lt;br /&gt;
( ) A couple of small issues, nothing major&lt;br /&gt;
&lt;br /&gt;
( ) One or two severe issues&lt;br /&gt;
&lt;br /&gt;
( ) The wifi was nearly totally unusable.&lt;br /&gt;
&lt;br /&gt;
If you experienced problems, could you briefly describe them? (Text field)&lt;br /&gt;
&lt;br /&gt;
Did you arrive ok?&lt;br /&gt;
&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
How did you come to our event?&lt;br /&gt;
&lt;br /&gt;
( ) Train&lt;br /&gt;
&lt;br /&gt;
( ) Car&lt;br /&gt;
&lt;br /&gt;
( ) Bus&lt;br /&gt;
&lt;br /&gt;
( ) Light Rail (IE Tube, Tram)&lt;br /&gt;
&lt;br /&gt;
( ) Walk&lt;br /&gt;
&lt;br /&gt;
Did you use the map from our website?&lt;br /&gt;
&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
If you looked at the map, was it detailed enough?&lt;br /&gt;
&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
( ) It gave me a rough idea, I used another map for more detail though&lt;br /&gt;
&lt;br /&gt;
( ) Not detailed at all.&lt;br /&gt;
&lt;br /&gt;
If you didn&#039;t use the map, why not?&lt;br /&gt;
&lt;br /&gt;
( ) Not enough detail&lt;br /&gt;
&lt;br /&gt;
( ) I used a satnav/google maps instead&lt;br /&gt;
&lt;br /&gt;
( ) I didn&#039;t even know it existed!&lt;br /&gt;
&lt;br /&gt;
Generally speaking, were the speakers interesting? Did you enjoy the presentations?&lt;br /&gt;
&lt;br /&gt;
( ) Nearly all were interesting and thoroughly enjoyable&lt;br /&gt;
&lt;br /&gt;
( ) Mainly enjoyable, but a handful of less interesting talks.&lt;br /&gt;
&lt;br /&gt;
( ) A 50 &amp;amp;ndash; 50 split&lt;br /&gt;
&lt;br /&gt;
( ) More dull than interesting&lt;br /&gt;
&lt;br /&gt;
( ) Didn&#039;t find any interesting.&lt;br /&gt;
&lt;br /&gt;
Please elaborate on your answer to the question above. Feel free to reference any&lt;br /&gt;
&lt;br /&gt;
particular people/talks. (Text field)&lt;br /&gt;
&lt;br /&gt;
If we could improve the range of talks, or you have any other interesting ideas regarding&lt;br /&gt;
&lt;br /&gt;
the talks, list them below (Text field)&lt;br /&gt;
&lt;br /&gt;
If you have any other recommendations or ideas, please list them below. (Text field)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This survey may be a little longer, but it&#039;s a lot easier to both answer and interpret the answers from. Asking two or three questions about each of the topics means that when it comes to processing the results you can do a little more analysis. For example. Imagine, in response to the first survey you received 30 people saying they didn&#039;t arrive OK.&lt;br /&gt;
&lt;br /&gt;
This would have been as much information as you could possibly extract from the results, but with our new set of answers it would be possible to deduce which forms of transport presented people with trouble. What&#039;s more, you could go on to see whether they were using a provided map or another form, and use this to target improvements for the future.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Keep in mind, that after 50 questions, the user is most likely to not read the question anymore.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Other important additions are the text field questions &amp;amp;ndash; these allow your audience to give specific feedback which you can draw from. It&#039;s a good idea to not make these compulsory though, as they may put people off answering.&lt;br /&gt;
&lt;br /&gt;
To conclude, when writing a survey you should aim to create one which asks specific questions targeted to the issues you need to answer. Also remember that it doesn&#039;t do any harm to gather a little extra background information as you can use it all to get better information from the result.&lt;br /&gt;
&lt;br /&gt;
It&#039;s also important to phrase your questions well, as if people need to answer the questions and they don&#039;t understand them, they&#039;ll close the window and move on. Try to hand your survey to someone else to proof read before making it publicly available to ensure its definitely crystal clear what the question is asking.&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Workarounds:_Survey_behaviour&amp;diff=57139</id>
		<title>Workarounds: Survey behaviour</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Workarounds:_Survey_behaviour&amp;diff=57139"/>
		<updated>2013-10-06T13:27:51Z</updated>

		<summary type="html">&lt;p&gt;Nery: /* Loop question(s) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
LimeSurvey users have been very creative in finding out how to change the behavior of a survey. All their workarounds are listed here. You can find some &#039;&#039;&#039;similar approaches&#039;&#039;&#039; at:&lt;br /&gt;
* [[Workarounds: Manipulating a survey at runtime using Javascript]]&lt;br /&gt;
* [[Workarounds: Question design, layout and templating]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&amp;lt;center&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;&#039;Please keep in mind that these workarounds are not official LimeSurvey extensions - they are solutions that users have created for themselves.&amp;lt;br /&amp;gt;&amp;lt;span style=&#039;color:#EE0000,#FFFFFF&#039;&amp;gt;Therefore LimeSurvey can&#039;t offer guarantees or support for these solutions.&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;If you have questions, please contact the users that, thankfully, shared their solutions with the community.&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Respond multiple times using the same computer=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With this workaround it will be possible to respond multiple times to the same survey. Normally there will be a message saying that the computer already received the answers. To prevent this you have to add the following code to the URL that leads to the survey &#039;&#039;&amp;quot;&amp;amp;newtest;=Y&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example of the &amp;quot;new&amp;quot; url:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.yourdomain.org/limesurvey/index.php?sid=12345&amp;amp;newtest;=Y&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Allow Multiple Survey Invitations to the same Email Address to be completed in the Same Browser Session=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039; When Multiple Surveys Invitations are activated during the same browser session, the second and subsequent survey activation results in a system message stating that the survey has already been completed. A user would have to close the browser and reopen in order to complete the next survey inviation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Workaround:&#039;&#039;&#039; Edit the Survey Invitation Email (also the reminder) Template. Append &amp;quot;&amp;amp;newtest;=Y&amp;quot; to the {SURVEYURL} line so it looks like this {SURVEYURL}&amp;amp;newtest;=Y&lt;br /&gt;
&lt;br /&gt;
Save the edited templates.&lt;br /&gt;
&lt;br /&gt;
Note: The save of this template edit does not seem to work when using HTML invitations, only text based invitations.&lt;br /&gt;
&lt;br /&gt;
=Add a data field to manually add data=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to add some additional data after a user has finished a survey you can use the dataentry screen of the admin panel. You have to set up the survey as follows:&lt;br /&gt;
# Create a question that can store the needed data at the end of the survey.&lt;br /&gt;
# Use [[Setting conditions|conditions]] on the previous question so that whatever is answered at the previous question the following question &#039;&#039;&#039;doesn&#039;t appear&#039;&#039;&#039;.&lt;br /&gt;
# To enter several questions repeat steps 1-2. Don&#039;t forget to adapt the conditions.&lt;br /&gt;
# Go to the admin panel, chose the survey from the list and go to &#039;&#039;Dataentry screen for survey&#039;&#039;.&lt;br /&gt;
# Enter the additional data&lt;br /&gt;
&lt;br /&gt;
=Randomization=&lt;br /&gt;
&lt;br /&gt;
Often you want to randomize certain elements of a survey, here are some approaches:&lt;br /&gt;
&lt;br /&gt;
==Totally random survey order==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you want to use random order globally for all questions in your survey, you can do it like this, depending on what type of question routine you use.&lt;br /&gt;
# If you use Group by Group add &amp;quot;shuffle($_SESSION&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&#039;grouplist&#039;]);&amp;quot; at the end of UpdateSessionGroupList($language) function in index.php&lt;br /&gt;
# If you use Question by Question or All-in-one put &amp;quot;shuffle($_SESSION&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&#039;fieldarray&#039;])&amp;quot; at the end of buildsurveysession() function in index.php&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; This modifications affect all surveys in application, you may want to use an if statement with surveyid to make this work with specific surveys e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if ($surveyid==12345)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
  do_some_shuffling()&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*Saving survey is not possible because this workaround doesn&#039;t save random order for specyfic tokens.&lt;br /&gt;
*Solution doesn&#039;t care about language changes so if you have on in your survey this will not work.&lt;br /&gt;
*Using conditions is not possible because conditions rely on a fixed and pre-determined order of questions.&lt;br /&gt;
&lt;br /&gt;
==Randomize the order of &#039;&#039;sequences of groups&#039;&#039; in a survey==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: 1.86&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can randomize the order of subsequences of groups in a survey. E.g., you may have a survey comprising the below group structure&lt;br /&gt;
*demographics&lt;br /&gt;
*itemgroup1&lt;br /&gt;
*itemgroup2&lt;br /&gt;
*itemgroup3&lt;br /&gt;
*interlude&lt;br /&gt;
*itemgroup4&lt;br /&gt;
*itemgroup5&lt;br /&gt;
*itemgroup6&lt;br /&gt;
*closingcomments&lt;br /&gt;
&lt;br /&gt;
and want to separately randomize the presentation order of itemgroup1...3 and itemgroup4...6 while maintaining the position of the other three groups. A working code modification is described in the PDF file [http://bugs.limesurvey.org/file_download.php?file_id=1228&amp;amp;type;=bug randomize_groups] which is downloadable from the Bugtracker at [http://bugs.limesurvey.org/view.php?id=557].&lt;br /&gt;
* &#039;&#039;&#039;Note:&#039;&#039;&#039; The code will randomize the order of subsequent groups in isolation, not across different sequences. Hence in the above example, you might get &#039;&#039;itemgroup1, 3, 2&#039;&#039; but never &#039;&#039;itemgroup1, 4, 2&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Note:&#039;&#039;&#039; The survey presentation format must be &#039;&#039;Group by Group&#039;&#039; not &#039;&#039;Question by Question&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Note:&#039;&#039;&#039; If you wish to select only a limited number of groups from a larger set, replace&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;$scratcharr = array_merge($scratcharr, $randarr);&amp;lt;/syntaxhighlight&amp;gt;with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;$scratcharr = array_merge($scratcharr, array_slice($randarr,0,x));&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where x is the number of elements/groups that you wish to include. In the example above &#039;&#039;&#039;$scratcharr = array_merge($scratcharr, array_slice($randarr,0,2));&#039;&#039;&#039; would select two out of the possible three groups in each group set.&lt;br /&gt;
* &#039;&#039;&#039;Warning:&#039;&#039;&#039; The code is compatible with conditions operating on items within a group but most possibly produces erroneous behavior with conditions between groups&lt;br /&gt;
* &#039;&#039;&#039;Warning:&#039;&#039;&#039; In a multi-language survey, the groups get randomized each time the language is changed. A simple workaround is to remove the language changer from the question pages of the survey leaving it on the welcome page only. (Though not totally foolproof this does lower the risk of unnecessary language changes.)&lt;br /&gt;
&lt;br /&gt;
==Selective Question Randomization==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: 1.82&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With this workaround you are able to select which groups within a survey should have their questions randomized and not kept in order. This workaround also adds a tab in the question ordering page. The extra tab allows you to enable / disable question randomization for the selected group.&lt;br /&gt;
&lt;br /&gt;
A working code and database modification is described in the PDF file [http://bugs.limesurvey.org/file_download.php?file_id=1939&amp;amp;type;=bug selective_random_questions] which is downloadable from the Bugtracker at [http://bugs.limesurvey.org/view.php?id=3107].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This might not work when adding conditions or assessments to the survey.&lt;br /&gt;
&lt;br /&gt;
==Randomize the order of questions within individual groups - JavaScript solution==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: 1.85+ (7557), IE 6/7, Firefox 3.0, Safari 3.2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This workaround allows you to randomize the order of questions in individual groups. It uses JavaScript/jQuery to apply this randomization to only those groups that you wish and requires no modification of the core files when updating the installation.&lt;br /&gt;
&lt;br /&gt;
The script uses a cookie to &amp;quot;remember&amp;quot; the shuffled order of the questions for the duration of the session so if a respondent navigates away from the group and returns, they will see the same question order. However if the survey is submitted or the session expires the questions will be re-shuffled.&lt;br /&gt;
&lt;br /&gt;
A couple of cautions about the script are:&lt;br /&gt;
#If the survey is saved, the questions will be re-shuffled when it is accessed again (as with the PHP solution).&lt;br /&gt;
#The question shuffling may play havoc with conditions within a group (as with the PHP solution).&lt;br /&gt;
#The script has been tested with all templates shipped with 1.85+ but if you have a custom template with &amp;quot;question&amp;quot; in the ID of division(s) (ie &amp;lt;div id=&amp;quot;&amp;lt;span style=&#039;color:red&#039;&amp;gt;question&amp;lt;/span&amp;gt;Holder&amp;quot;&amp;gt;) it may fail - the script looks for all divs with IDs starting with &amp;quot;question&amp;quot; and adds them to an array to be shuffled.&lt;br /&gt;
&lt;br /&gt;
There is a small demonstration [http://www.partnersinc.biz/surveys//index.php?sid=84767&amp;amp;newtest=Y&amp;amp;lang=en here].&lt;br /&gt;
&lt;br /&gt;
Put simply, the script:&lt;br /&gt;
#Checks cookies to see if the questions have already been shuffled for this group and session.&lt;br /&gt;
#If so - displays the questions in that order.&lt;br /&gt;
#If not - creates an array of all of the questions in the group, shuffles the array, sets a cookie with the shuffled array contents, displays the questions in the shuffled order.&lt;br /&gt;
&lt;br /&gt;
Implementation is as follows:&lt;br /&gt;
#Turn off &#039;&#039;$filterxsshtml&#039;&#039; to allow insertion of JavaScript (see [[Optional settings#Security|documentation here]])..&lt;br /&gt;
#Create your group and questions.&lt;br /&gt;
#In the source of the group description add the following onload function (see [[Workarounds: Manipulating a survey at runtime using Javascript#How to use Script (eg. JavaScript etc.) in LimeSurvey?|How to use script]]).&lt;br /&gt;
&lt;br /&gt;
Onload code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   $(document).ready(function() {&lt;br /&gt;
&lt;br /&gt;
       function shuffleQuestions() {&lt;br /&gt;
&lt;br /&gt;
           // Create an array to hold question IDs&lt;br /&gt;
&lt;br /&gt;
           var qArray = new Array();&lt;br /&gt;
&lt;br /&gt;
           // Find the group ID of the page&lt;br /&gt;
&lt;br /&gt;
           var fieldNames = $( &#039;input#fieldnames&#039; ).attr(&#039;value&#039;);&lt;br /&gt;
&lt;br /&gt;
           var tmp = fieldNames.split(&#039;X&#039;);&lt;br /&gt;
&lt;br /&gt;
           var sID = tmp[0];&lt;br /&gt;
&lt;br /&gt;
           var gID = tmp[1];&lt;br /&gt;
&lt;br /&gt;
           // A function to get the value of a cookie by name&lt;br /&gt;
&lt;br /&gt;
           function getCookie ( cookieName ) {&lt;br /&gt;
&lt;br /&gt;
               var results = document.cookie.match ( &#039;(&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;|;) ?&#039; + cookieName + &#039;=([&amp;lt;/div&amp;gt;;]*)(;|$)&#039; );&lt;br /&gt;
&lt;br /&gt;
               if ( results ) {&lt;br /&gt;
&lt;br /&gt;
                   return ( unescape ( results[2] ) );&lt;br /&gt;
&lt;br /&gt;
               }&lt;br /&gt;
&lt;br /&gt;
               else {&lt;br /&gt;
&lt;br /&gt;
                   return null;&lt;br /&gt;
&lt;br /&gt;
               }&lt;br /&gt;
&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
           // Get the session name&lt;br /&gt;
&lt;br /&gt;
           var sessionName = getCookie ( &#039;PHPSESSID&#039; );&lt;br /&gt;
&lt;br /&gt;
           // Check to see if the question order has already been shuffled in this session&lt;br /&gt;
&lt;br /&gt;
           var cookieArray = getCookie ( &#039;sArray&#039; + gID + &#039;_&#039; + sessionName );&lt;br /&gt;
&lt;br /&gt;
           // If already shuffled, use that question order&lt;br /&gt;
&lt;br /&gt;
           if ( cookieArray ) {&lt;br /&gt;
&lt;br /&gt;
               //qArray = $.trim(cookieArray);&lt;br /&gt;
&lt;br /&gt;
               qArray = cookieArray.split(&#039;,&#039;);&lt;br /&gt;
&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
           // If not, go ahead and shuffle&lt;br /&gt;
&lt;br /&gt;
           else {&lt;br /&gt;
&lt;br /&gt;
               // Load the IDs of all questions on the page into the array&lt;br /&gt;
&lt;br /&gt;
               $( &#039;div[id&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;=&amp;quot;question&amp;quot;]&#039; ).each(function(i) {&lt;br /&gt;
&lt;br /&gt;
                   qArray.push($( this ).attr(&#039;id&#039;));&lt;br /&gt;
&lt;br /&gt;
               });&lt;br /&gt;
&lt;br /&gt;
               // Shuffle the questions array&lt;br /&gt;
&lt;br /&gt;
               function shuffle(o){&lt;br /&gt;
&lt;br /&gt;
                   for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);&lt;br /&gt;
&lt;br /&gt;
                   return o;&lt;br /&gt;
&lt;br /&gt;
               }&lt;br /&gt;
&lt;br /&gt;
               shuffle(qArray);&lt;br /&gt;
&lt;br /&gt;
               // Set a cookie with the value of the shuffled array&lt;br /&gt;
&lt;br /&gt;
               var today = new Date();&lt;br /&gt;
&lt;br /&gt;
               today.setTime( today.getTime() );&lt;br /&gt;
&lt;br /&gt;
               var expires = 2 * 1000 * 60 * 60 * 24; // Expire the cookie in 2 days&lt;br /&gt;
&lt;br /&gt;
               var expiresDate = new Date( today.getTime() + (expires) );&lt;br /&gt;
&lt;br /&gt;
               document.cookie = &#039;sArray&#039; + gID + &#039;_&#039; + sessionName + &#039;=&#039; + qArray + &#039;;expires=&#039; + expiresDate.toGMTString();&lt;br /&gt;
&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
           // Wrap the questions in a div&lt;br /&gt;
&lt;br /&gt;
           $( &#039;div[id&amp;lt;/div&amp;gt;=&amp;quot;question&amp;quot;]&#039; ).wrapAll( document.createElement(&#039;div&#039;) );&lt;br /&gt;
&lt;br /&gt;
           $( &#039;div[id&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;=&amp;quot;question&amp;quot;]:eq(0)&#039; ).parent().attr(&#039;id&#039;, &#039;qWrapper&#039;);&lt;br /&gt;
&lt;br /&gt;
           $( &#039;div#qWrapper&#039; ).css({&lt;br /&gt;
&lt;br /&gt;
               &#039;padding&#039;:0,&lt;br /&gt;
&lt;br /&gt;
               &#039;margin&#039;:0&lt;br /&gt;
&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
           // Insert the questions into the wrapper in the shuffled order&lt;br /&gt;
&lt;br /&gt;
           $.each(qArray, function(i, val){&lt;br /&gt;
&lt;br /&gt;
               $( &#039;div#&#039; + val + &#039;&#039; ).appendTo( $( &#039;#qWrapper&#039; ) );&lt;br /&gt;
&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
       shuffleQuestions();&lt;br /&gt;
&lt;br /&gt;
   });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Randomise the order of questions &#039;&#039;within&#039;&#039; groups==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can randomize the order questions of within groups (i.e. without interleaving questions from different groups) like this:&lt;br /&gt;
&lt;br /&gt;
1 Call a custom function from the last line of buildsurveysession() before the return statement in index.php:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$_SESSION[&#039;fieldarray&#039;] = withinGroupsShuffle();&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Add these custom functions at the end of the same file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$currentGid;&lt;br /&gt;
&lt;br /&gt;
function withinGroupsShuffle() {&lt;br /&gt;
&lt;br /&gt;
   global $currentGid;&lt;br /&gt;
&lt;br /&gt;
   $groupArray = array();&lt;br /&gt;
&lt;br /&gt;
   $shuffledArray = array();&lt;br /&gt;
&lt;br /&gt;
   foreach ($_SESSION[&#039;grouplist&#039;] as $group)    {&lt;br /&gt;
&lt;br /&gt;
       $currentGid = $group[0];&lt;br /&gt;
&lt;br /&gt;
       $groupArray = array_filter($_SESSION[&#039;fieldarray&#039;], &amp;quot;questionInGroup&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
       shuffle($groupArray);&lt;br /&gt;
&lt;br /&gt;
       $tmp = $shuffledArray;&lt;br /&gt;
&lt;br /&gt;
       $shuffledArray = array_merge($tmp, $groupArray);&lt;br /&gt;
&lt;br /&gt;
       $groupArray = array();&lt;br /&gt;
&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   return $shuffledArray;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function questionInGroup($question) {&lt;br /&gt;
&lt;br /&gt;
   global $currentGid;&lt;br /&gt;
&lt;br /&gt;
   return ($question[5] == $currentGid) ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(&#039;&#039;I&#039;m new to PHP, so please make changes if you can make the code shorter or more elegant&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
This could be combined with the method mentioned above for shuffling the order of groups:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shuffle($_SESSION[&#039;grouplist&#039;]);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know how this code affects or is affected by conditions or tokens! This code has the same limitations as the global randomisation above: it applies to all groups in all surveys. It would be nice to add a group-level parameter like randomise_questions = [0|1], but I can&#039;t find a mechanism for doing that.&lt;br /&gt;
&lt;br /&gt;
==Randomize all questions in &amp;quot;All In One&amp;quot; mode - even if they are place in groups.==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: 1.91, IE 7/8, Firefox 3.6, Safari 3.2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This workaround will randomize all questions when using &amp;quot;All In One&amp;quot; mode, even if they are place in groups. This may be useful if you want to use group assessments and display all questions on a single page in a random order.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
*The workaround is tested in the default template and may need slight tweaks for others.&lt;br /&gt;
*It is NOT tested with conditions.&lt;br /&gt;
&lt;br /&gt;
Implementation is as follows:&lt;br /&gt;
#[[Workarounds: Manipulating a survey at runtime using Javascript#How to use Script (eg. JavaScript etc.) in LimeSurvey?|Set up your survey to use JavaScript]].&lt;br /&gt;
#Add the following script to the source of one of the questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   $(document).ready(function() {&lt;br /&gt;
&lt;br /&gt;
       shuffleQuestions();&lt;br /&gt;
&lt;br /&gt;
       function shuffleQuestions() {&lt;br /&gt;
&lt;br /&gt;
           // Hide the group wrappers&lt;br /&gt;
&lt;br /&gt;
           $(&#039;div[id&amp;lt;/div&amp;gt;=&amp;quot;group-&amp;quot;]&#039;).hide();&lt;br /&gt;
&lt;br /&gt;
           // Create and insert a new question wrapper&lt;br /&gt;
&lt;br /&gt;
           var qWrapper = &#039;&amp;lt;div id=&amp;quot;qWrapper&amp;quot;&amp;gt;\&lt;br /&gt;
&lt;br /&gt;
                       &amp;lt;table class=&amp;quot;group&amp;quot;&amp;gt; \&lt;br /&gt;
&lt;br /&gt;
                           &amp;lt;tbody&amp;gt; \&lt;br /&gt;
&lt;br /&gt;
                               &amp;lt;tr&amp;gt; \&lt;br /&gt;
&lt;br /&gt;
                                   &amp;lt;td&amp;gt; \&lt;br /&gt;
&lt;br /&gt;
                                   &amp;lt;/td&amp;gt; \&lt;br /&gt;
&lt;br /&gt;
                               &amp;lt;/tr&amp;gt; \&lt;br /&gt;
&lt;br /&gt;
                           &amp;lt;/tbody&amp;gt; \&lt;br /&gt;
&lt;br /&gt;
                       &amp;lt;/table&amp;gt;\&lt;br /&gt;
&lt;br /&gt;
                   &amp;lt;/div&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
           $(&#039;div[id&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;=&amp;quot;group-&amp;quot;]:last&#039;).after(qWrapper);&lt;br /&gt;
&lt;br /&gt;
           $( &#039;div#qWrapper td&#039; ).css({&#039;padding-top&#039;:&#039;10px&#039;});&lt;br /&gt;
&lt;br /&gt;
           // Create an array to hold question IDs&lt;br /&gt;
&lt;br /&gt;
           var qArray = new Array();&lt;br /&gt;
&lt;br /&gt;
           // Load the IDs of all questions on the page into the array&lt;br /&gt;
&lt;br /&gt;
           $(&#039;div[id&amp;lt;/div&amp;gt;=&amp;quot;question&amp;quot;]&#039;).each(function(i) {&lt;br /&gt;
&lt;br /&gt;
               qArray.push($(this).attr(&#039;id&#039;));&lt;br /&gt;
&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
           // Shuffle the questions array&lt;br /&gt;
&lt;br /&gt;
           function shuffle(o){&lt;br /&gt;
&lt;br /&gt;
               for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);&lt;br /&gt;
&lt;br /&gt;
               return o;&lt;br /&gt;
&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
           shuffle(qArray);&lt;br /&gt;
&lt;br /&gt;
           // Insert the questions into the new question wrapper in the shuffled order&lt;br /&gt;
&lt;br /&gt;
           $.each(qArray, function(i, val){&lt;br /&gt;
&lt;br /&gt;
               $(&#039;div#&#039; + val + &#039;&#039;).appendTo($(&#039;#qWrapper td:first&#039;));&lt;br /&gt;
&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
   });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Random question sets==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: 1.85+ (7557), IE 6/7, Firefox 3.0, Safari 3.2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This workaround, in conjunction with the [[Workarounds: Survey behaviour#Randomize the order of questions within individual groups - JavaScript solution|randomizing questions script]], allows you to display a random set of questions in a group.&lt;br /&gt;
&lt;br /&gt;
There is a small demonstration [http://www.partnersinc.biz/surveys//index.php?sid=84767&amp;amp;newtest=Y&amp;amp;lang=en here] (page 2).&lt;br /&gt;
&lt;br /&gt;
JavaScript is used to first shuffle the question order and then hide the number of questions that you stipulate, effectively giving respondents a random question set. So if, as in the demo, you have 5 questions in your group and choose to hide 2, the respondents will be presented with a random 3 questions.&lt;br /&gt;
&lt;br /&gt;
A brief explanation of the script is:&lt;br /&gt;
*The questions are shuffled (see [[Workarounds: Survey behaviour#Randomize the order of questions within individual groups -  JavaScript solution|randomizing questions]]) and their IDs placed in an array.&lt;br /&gt;
*The number of questions to be shown is calculated and their IDs are moved to a new array.&lt;br /&gt;
*All questions in the first array are hidden - this effectively hides the first &#039;&#039;&#039;&#039;&#039;n&#039;&#039;&#039;&#039;&#039; questions on the page so you&#039;ll get a random set of questions displayed.&lt;br /&gt;
*An asterisk is prepended to the remaining questions (remove this if your questions are not mandatory).&lt;br /&gt;
*When the next/submit button is clicked, all remaining questions are checked for an answer. If any are unanswered, their text is turned red, an alert is popped up and the next/submit is aborted (remove this if your questions are not mandatory).&lt;br /&gt;
&lt;br /&gt;
A cookie is used to &amp;quot;remember&amp;quot; the shuffled order of the questions for the duration of the session so if a respondent navigates away from the group and returns, they will see the same question set. However if the survey is submitted or the session expires, the questions will be re-shuffled and a new set will be displayed. Therefor this workaround should not be used with surveys that can be saved.&lt;br /&gt;
&lt;br /&gt;
A couple of cautions about the script are:&lt;br /&gt;
#If the survey is saved, the questions will be re-shuffled when it is accessed again and a new question set will be displayed.&lt;br /&gt;
#The question shuffling may play havoc with conditions within a group.&lt;br /&gt;
#The script has been tested with all templates shipped with 1.85+ but if you have a custom template with &amp;quot;question&amp;quot; in the ID of division(s) (ie &amp;lt;div id=&amp;quot;&amp;lt;span style=&#039;color:red&#039;&amp;gt;question&amp;lt;/span&amp;gt;Holder&amp;quot;&amp;gt;) it may fail - the script looks for all divs with IDs starting with &amp;quot;question&amp;quot; and adds them to an array to be shuffled.&lt;br /&gt;
#The script may need to be modified to display the &amp;quot;Mandatory&amp;quot; asterisk in templates other than the default - see below.&lt;br /&gt;
&lt;br /&gt;
Implementation is as follows:&lt;br /&gt;
#Turn off &#039;&#039;$filterxsshtml&#039;&#039; to allow insertion of JavaScript (see [[Optional settings#Security|documentation here]]).&lt;br /&gt;
#Create your group with all questions non-mandatory (we&#039;ll make them mandatory later with JavaScript).&lt;br /&gt;
#In the source of the group description add the following onload function (see [[Workarounds: Manipulating a survey at runtime using Javascript#How to use Script (eg. JavaScript etc.) in LimeSurvey?|How to use script here]]).&lt;br /&gt;
#Modify the function call at the end of the script for the number of questions to be hidden and the mandatory error text.&lt;br /&gt;
&lt;br /&gt;
Onload code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   $(document).ready(function() {&lt;br /&gt;
&lt;br /&gt;
       function shuffleQuestions() {&lt;br /&gt;
&lt;br /&gt;
           // Create an array to hold question IDs&lt;br /&gt;
&lt;br /&gt;
           var qArray = new Array();&lt;br /&gt;
&lt;br /&gt;
           // Find the group ID of the page&lt;br /&gt;
&lt;br /&gt;
           var fieldNames = $( &#039;input#fieldnames&#039; ).attr(&#039;value&#039;);&lt;br /&gt;
&lt;br /&gt;
           var tmp = fieldNames.split(&#039;X&#039;);&lt;br /&gt;
&lt;br /&gt;
           var sID = tmp[0];&lt;br /&gt;
&lt;br /&gt;
           var gID = tmp[1];&lt;br /&gt;
&lt;br /&gt;
           // A function to get the value of a cookie by name&lt;br /&gt;
&lt;br /&gt;
           function getCookie ( cookieName ) {&lt;br /&gt;
&lt;br /&gt;
               var results = document.cookie.match ( &#039;(&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;|;) ?&#039; + cookieName + &#039;=([&amp;lt;/div&amp;gt;;]*)(;|$)&#039; );&lt;br /&gt;
&lt;br /&gt;
               if ( results ) {&lt;br /&gt;
&lt;br /&gt;
                   return ( unescape ( results[2] ) );&lt;br /&gt;
&lt;br /&gt;
               }&lt;br /&gt;
&lt;br /&gt;
               else {&lt;br /&gt;
&lt;br /&gt;
                   return null;&lt;br /&gt;
&lt;br /&gt;
               }&lt;br /&gt;
&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
           // Get the session name&lt;br /&gt;
&lt;br /&gt;
           var sessionName = getCookie ( &#039;PHPSESSID&#039; );&lt;br /&gt;
&lt;br /&gt;
           // Check to see if the question order has already been shuffled in this session&lt;br /&gt;
&lt;br /&gt;
           var cookieArray = getCookie ( &#039;sArray&#039; + gID + &#039;_&#039; + sessionName );&lt;br /&gt;
&lt;br /&gt;
           // If already shuffled, use that question order&lt;br /&gt;
&lt;br /&gt;
           if ( cookieArray ) {&lt;br /&gt;
&lt;br /&gt;
               //qArray = $.trim(cookieArray);&lt;br /&gt;
&lt;br /&gt;
               qArray = cookieArray.split(&#039;,&#039;);&lt;br /&gt;
&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
           // If not, go ahead and shuffle&lt;br /&gt;
&lt;br /&gt;
           else {&lt;br /&gt;
&lt;br /&gt;
               // Load the IDs of all questions on the page into the array&lt;br /&gt;
&lt;br /&gt;
               $( &#039;div[id&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;=&amp;quot;question&amp;quot;]&#039; ).each(function(i) {&lt;br /&gt;
&lt;br /&gt;
                   qArray.push($( this ).attr(&#039;id&#039;));&lt;br /&gt;
&lt;br /&gt;
               });&lt;br /&gt;
&lt;br /&gt;
               // Shuffle the questions array&lt;br /&gt;
&lt;br /&gt;
               function shuffle(o){&lt;br /&gt;
&lt;br /&gt;
                   for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);&lt;br /&gt;
&lt;br /&gt;
                   return o;&lt;br /&gt;
&lt;br /&gt;
               }&lt;br /&gt;
&lt;br /&gt;
               shuffle(qArray);&lt;br /&gt;
&lt;br /&gt;
               // Set a cookie with the value of the shuffled array&lt;br /&gt;
&lt;br /&gt;
               var today = new Date();&lt;br /&gt;
&lt;br /&gt;
               today.setTime( today.getTime() );&lt;br /&gt;
&lt;br /&gt;
               var expires = 2 * 1000 * 60 * 60 * 24; // Expire the cookie in 2 days&lt;br /&gt;
&lt;br /&gt;
               var expiresDate = new Date( today.getTime() + (expires) );&lt;br /&gt;
&lt;br /&gt;
               document.cookie = &#039;sArray&#039; + gID + &#039;_&#039; + sessionName + &#039;=&#039; + qArray + &#039;;expires=&#039; + expiresDate.toGMTString();&lt;br /&gt;
&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
           // Wrap the questions in a div&lt;br /&gt;
&lt;br /&gt;
           $( &#039;div[id&amp;lt;/div&amp;gt;=&amp;quot;question&amp;quot;]&#039; ).wrapAll( document.createElement(&#039;div&#039;) );&lt;br /&gt;
&lt;br /&gt;
           $( &#039;div[id&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;=&amp;quot;question&amp;quot;]:eq(0)&#039; ).parent().attr(&#039;id&#039;, &#039;qWrapper&#039;);&lt;br /&gt;
&lt;br /&gt;
           $( &#039;div#qWrapper&#039; ).css({&lt;br /&gt;
&lt;br /&gt;
               &#039;padding&#039;:0,&lt;br /&gt;
&lt;br /&gt;
               &#039;margin&#039;:0&lt;br /&gt;
&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
           // Insert the questions into the wrapper in the shuffled order&lt;br /&gt;
&lt;br /&gt;
           $.each(qArray, function(i, val){&lt;br /&gt;
&lt;br /&gt;
               $( &#039;div#&#039; + val + &#039;&#039; ).appendTo( $( &#039;#qWrapper&#039; ) );&lt;br /&gt;
&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
       shuffleQuestions();&lt;br /&gt;
&lt;br /&gt;
       function hideQuestions(numberToHide, mandatoryMsg) {&lt;br /&gt;
&lt;br /&gt;
           // Create an array of the IDs of all questions on the page&lt;br /&gt;
&lt;br /&gt;
           var questions = new Array();&lt;br /&gt;
&lt;br /&gt;
           $( &#039;div[id&amp;lt;/div&amp;gt;=&amp;quot;question&amp;quot;]&#039; ).each(function(i) {&lt;br /&gt;
&lt;br /&gt;
               questions.push($( this ).attr(&#039;id&#039;));&lt;br /&gt;
&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
           // Remove the &amp;quot;shown&amp;quot; questions and place them in a new array&lt;br /&gt;
&lt;br /&gt;
           var questionsLength = questions.length;&lt;br /&gt;
&lt;br /&gt;
           var shownQuestions = questions.splice(numberToHide,questionsLength-numberToHide);&lt;br /&gt;
&lt;br /&gt;
           // Hide the remaining questions&lt;br /&gt;
&lt;br /&gt;
           $.each(questions, function(i, val){&lt;br /&gt;
&lt;br /&gt;
               $( &#039;div#&#039; + val + &#039;&#039; ).hide();&lt;br /&gt;
&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
           // Add an asterisk to the &amp;quot;shown&amp;quot; questions&lt;br /&gt;
&lt;br /&gt;
           // NOTE: Comment this section out if questions are not mandatory&lt;br /&gt;
&lt;br /&gt;
           $( &#039;td.questiontext&#039; ).prepend( &#039;&amp;lt;span class=&amp;quot;asterisk&amp;quot;&amp;gt;*&amp;lt;/span&amp;gt;&#039;);&lt;br /&gt;
&lt;br /&gt;
           // Interrupt the submit function and validate mandatory questions&lt;br /&gt;
&lt;br /&gt;
           // NOTE: Comment this section out if questions are not mandatory&lt;br /&gt;
&lt;br /&gt;
           $(&#039;form#limesurvey&#039;).submit(function(){&lt;br /&gt;
&lt;br /&gt;
               // Override the built-in &amp;quot;disable navigation buttons&amp;quot; feature&lt;br /&gt;
&lt;br /&gt;
               $(&#039;#moveprevbtn, #movenextbtn, #movesubmitbtn&#039;).attr(&#039;disabled&#039;, &#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
               // Loop through all &amp;quot;shown&amp;quot; questions and check for answer&lt;br /&gt;
&lt;br /&gt;
               var answered = 0;&lt;br /&gt;
&lt;br /&gt;
               $.each(shownQuestions, function(i, val){&lt;br /&gt;
&lt;br /&gt;
                   if ( $( &#039;div#&#039; + val + &#039; input.radio:checked&#039; ).length == 0 ) {&lt;br /&gt;
&lt;br /&gt;
                       $( &#039;div#&#039; + val + &#039;&#039; ).css(&#039;color&#039;, &#039;red&#039;);&lt;br /&gt;
&lt;br /&gt;
                       answered = 1;&lt;br /&gt;
&lt;br /&gt;
                   }&lt;br /&gt;
&lt;br /&gt;
                   else {&lt;br /&gt;
&lt;br /&gt;
                       $( &#039;div#&#039; + val + &#039;&#039; ).css(&#039;color&#039;, &#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
                   }&lt;br /&gt;
&lt;br /&gt;
               });&lt;br /&gt;
&lt;br /&gt;
               if ( answered == 1 ) {&lt;br /&gt;
&lt;br /&gt;
                   alert ( mandatoryMsg );&lt;br /&gt;
&lt;br /&gt;
                   return false;&lt;br /&gt;
&lt;br /&gt;
               }&lt;br /&gt;
&lt;br /&gt;
               else {&lt;br /&gt;
&lt;br /&gt;
                   return true;&lt;br /&gt;
&lt;br /&gt;
               }&lt;br /&gt;
&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
       // Call the hide function&lt;br /&gt;
&lt;br /&gt;
       // Edit here for number of question to hide and mandatory message&lt;br /&gt;
&lt;br /&gt;
       hideQuestions(2, &#039;Please complete all questions&#039;);&lt;br /&gt;
&lt;br /&gt;
   });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add the asterisk to non default templates, replace &#039;&#039;$( &#039;td.questiontext&#039; ).prepend( &#039;&amp;lt;span class=&amp;quot;asterisk&amp;quot;&amp;gt;*&amp;lt;/span&amp;gt;&#039;);&#039;&#039;&#039;&#039; with:&lt;br /&gt;
&lt;br /&gt;
- basic - &#039;&#039;$( &#039;td.be&#039; ).prepend( &#039;&amp;lt;span class=&amp;quot;asterisk&amp;quot;&amp;gt;*&amp;lt;/span&amp;gt;&#039;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- bluengrey - Not possible to insert asterisk in correct location&lt;br /&gt;
&lt;br /&gt;
- business_grey - &#039;&#039;$( &#039;div.questiontext&#039; ).prepend( &#039;&amp;lt;span class=&amp;quot;asterisk&amp;quot;&amp;gt;*&amp;lt;/span&amp;gt;&#039;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- clear_logo - &#039;&#039;$( &#039;td.be&#039; ).prepend( &#039;&amp;lt;span class=&amp;quot;asterisk&amp;quot;&amp;gt;*&amp;lt;/span&amp;gt;&#039;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- default - &#039;&#039;$( &#039;td.questiontext&#039; ).prepend( &#039;&amp;lt;span class=&amp;quot;asterisk&amp;quot;&amp;gt;*&amp;lt;/span&amp;gt;&#039;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- eirenicon - Not possible to insert asterisk in correct location&lt;br /&gt;
&lt;br /&gt;
- limespired - &#039;&#039;$( &#039;div.survey-question-text&#039; ).prepend( &#039;&amp;lt;span class=&amp;quot;asterisk&amp;quot;&amp;gt;*&amp;lt;/span&amp;gt;&#039;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- mint_idea - &#039;&#039;$( &#039;div.survey-question-text&#039; ).prepend( &#039;&amp;lt;span class=&amp;quot;asterisk&amp;quot;&amp;gt;*&amp;lt;/span&amp;gt;&#039;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- sherpa - &#039;&#039;$( &#039;div.survey-question-text&#039; ).prepend( &#039;&amp;lt;span class=&amp;quot;asterisk&amp;quot;&amp;gt;*&amp;lt;/span&amp;gt;&#039;);&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- vallendar - Not possible to insert asterisk in correct location&lt;br /&gt;
&lt;br /&gt;
==Randomization - &#039;&#039;Assign People Randomly&#039;&#039; To Surveys==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a very easy way to assign people randomly to surveys, I think experts do it in other ways, but it works for me.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;LINK.PHP:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;?php &lt;br /&gt;
  $db = @file(&amp;quot;link.txt&amp;quot;); // path to .txt file &lt;br /&gt;
  $anz = @count($db); &lt;br /&gt;
  srand((double)microtime()*1000000); // random numbers &lt;br /&gt;
  $random = rand(1,$anz); &lt;br /&gt;
  print $db[$random-1]; &lt;br /&gt;
  ?&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;LINK.TXT:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;refresh&amp;quot; content=&amp;quot;1;url=http://www.survey1.com&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;refresh&amp;quot; content=&amp;quot;1;url=http://www.survey2.com&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&#039;&#039;Only one link per line!&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;INDEX.PHP:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&amp;lt;title&amp;gt;title&amp;lt;/title&amp;gt; &lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;?php &lt;br /&gt;
  include(&amp;quot;link.php&amp;quot;); &lt;br /&gt;
  ?&amp;gt; &lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;/head&amp;gt; &lt;br /&gt;
  &amp;lt;body&amp;gt; &lt;br /&gt;
  &amp;lt;!-- shows the loading statement --&amp;gt; &lt;br /&gt;
  &amp;lt;table width=100% height=100%&amp;gt;  &lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td valign=middle&amp;gt;&lt;br /&gt;
  &amp;lt;center&amp;gt;&amp;lt;font size=5&amp;gt;loading ... &amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt; &lt;br /&gt;
  &amp;lt;!-- shows the loading statement --&amp;gt; &lt;br /&gt;
  &amp;lt;/body&amp;gt; &lt;br /&gt;
  &amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Random Redirect responders to surveys==&lt;br /&gt;
&#039;&#039;Tested with: &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As the workaround above, this one assign randomly (uniform distribution) people to multiple surveys in easier way, but with the same outcome: every survey has the same probability to be accessed by a responder.&lt;br /&gt;
&lt;br /&gt;
1. Copy and paste the code below in a text editor. &lt;br /&gt;
2. Replace the URLs with those of your surveys, and save it as index.php &lt;br /&gt;
3. Create a new directory in your server.&lt;br /&gt;
4. Upload the file in that directory and give the link (http://www.yourdomain.com/newdirectory) to the responders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
$urls = array(&amp;quot;www.site1.com&amp;quot;, &lt;br /&gt;
              &amp;quot;www.site2.com&amp;quot;, &lt;br /&gt;
              &amp;quot;www.site3.com&amp;quot;); &lt;br /&gt;
$url = $urls[array_rand($urls)]; &lt;br /&gt;
header(&amp;quot;Location: http://$url&amp;quot;); &lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Prefilling survey elements==&lt;br /&gt;
&lt;br /&gt;
There are some ways to pre-fill elements in a survey. The data to prefill an answer can be passed by URL if it matches a certain format.&lt;br /&gt;
&lt;br /&gt;
==Prefilling survey answers using the survey URL==&lt;br /&gt;
&#039;&#039;Tested with: 1.80 and later&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can prefill answers to questions in your survey by passing the [[SGQA identifier]], and the answer, as a parameter of your survey URL. This feature will only work where the survey is commenced immediately upon entering the URL (so it won&#039;t work if you use CAPTCHA&#039;s to restrict access, or the registration page).&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need to ensure that the answer you pass is the correct format for the question you are attempting to prefill - for example - multiple option questions should contain a &amp;quot;Y&amp;quot; to check a box. List type questions need the correct answer code. To be certain which codes to pass, complete a survey manually with the prefilled answer(s) you want, and then export the results as question codes and answer codes(not full text). This will give you both the correct SGQA identifier (the name of the column), and the correct format for the answer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Starting with version 1.92+, you can use [[Expression Manager#Access to Variables|qcode naming]] for the variables in addition to, or instead of, using SGQA naming.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;In &#039;&#039;&#039;version 2.x&#039;&#039;&#039; the link for a prefill have to look like that:  http://www.example/index.php/survey/index/sid/712544/newtest/Y?712544X99X2151=gelb&amp;amp;712544X99X2152=12345 &amp;lt;br&amp;gt;&lt;br /&gt;
It&#039;s important to add &amp;quot;newtest/Y&amp;quot; to the link.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;http://www.example.../index.php?sid=1234&amp;amp;1234X43X123=Y&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With 2.0, if your url is like this /survey/sid/1234, you have to use:&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;http://www.example.../survey/sid/1234/1234X43X123/Y&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the user gets to that question, the &amp;quot;Y&amp;quot; will be prefilled as the answer to question 123 in group 43 in survey 1234.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Single-Choice:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;http://www.example.../index.php?sid=1234&amp;amp;1234X43X123=A2&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With 2.0, if your url is like this /survey/sid/1234, you have to use:&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;http://www.example.../survey/sid/1234/1234X43X123/A2&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you like to prefill a single choice question (answer-code A1 - X ), you have to write this. If you export the results of this question, you will see, that this kind of question save the answer code as result in table. Use in any case the capital &amp;quot;X&amp;quot; in the link!&lt;br /&gt;
&lt;br /&gt;
===Prefilling survey answers using the survey URL and hiding the Answer===&lt;br /&gt;
&lt;br /&gt;
Starting with version 1.87 every question has a property &#039;Always hide this question&#039; which can be used for this purpose.&lt;br /&gt;
&lt;br /&gt;
==Prefilling a date question with the current date==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: 1.80RC3&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Workaround created by user &amp;quot;Mazi&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Using the [[Workarounds: Survey behaviour#Prefilling survey answers using the survey URL|workaround mentioned above]] you can prefill the current date for a date question. Instead of using the common link to a survey which looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;http://www.yourdomain.org/limesurvey/index.php?sid=53298&amp;amp;newtest;=Y&amp;amp;lang;=de&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you create an additional script, let&#039;s call it date.php. This script contains the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
   $date = date(&amp;quot;Y-m-d&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   header(&amp;quot;Location: http://www.yourdomain.org/limesurvey/index.php?sid=53298&amp;amp;newtest;=Y&amp;amp;lang;=de&amp;amp;53298X15X102=$date&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script determines the current date and calls the survey with a certain URL. The current date is attached as the answer for a certain date question using [http://docs.limesurvey.org/tiki-index.php?page=SGQA+identifier SGQA identifier]. Don&#039;t forget to &#039;&#039;&#039;adjust the SID and SGQA identifier&#039;&#039;&#039; according to your survey/group/question ID!&lt;br /&gt;
&lt;br /&gt;
Upload the new &#039;&#039;date.php&#039;&#039; file into your limesurvey directory. You can then call the survey using this link:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;http://www.yourdomain.org/limesurvey/date.php&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Things to watch out for:&lt;br /&gt;
* Date questions always use the internal date data format of the database which has to be YYYY-MM-DD!&lt;br /&gt;
* You have to adjust the SID at the URl.&lt;br /&gt;
* Also adjust the SGQA identifier (SIDXGIDXQID) according to your survey.&lt;br /&gt;
* This solution doesn&#039;t work if you use tokens at your survey.&lt;br /&gt;
&lt;br /&gt;
=Offer option to change answers later=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When having a closed access survey using a token table it is possible to offer the opportunity to change answers later. Normally after having submitted the answers a token is marked as &amp;quot;used&amp;quot;. To prevent this do as follows:&lt;br /&gt;
* set your survey to question-by-question mode (or group-by-group mode)&lt;br /&gt;
* set the survey to Non anonymous + Allow persistence for token answers&lt;br /&gt;
* activate survey and create your token table&lt;br /&gt;
* add at least one question of type boilerplate (which contains just some text). This is necessaray to give some instructions to the user like &amp;quot;&#039;&#039;Your answers have been recorded to the DB, if you&#039;re sure you won&#039;t modify them, you can submit your response. If unsure, please quit your browser now and get back later with the private URL you&#039;ve received&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
By not submitting the survey the user is still able to change the answers later.&lt;br /&gt;
&lt;br /&gt;
=Use general password for accessing a survey=&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want to use tokens but a general password to access a survey you can set your survey to &amp;quot;allow public access&amp;quot;. Don&#039;t create a token table but use the following workaround:&lt;br /&gt;
# Create a short text question first&lt;br /&gt;
# Create the other questions&lt;br /&gt;
# Use conditions on all the other questions. You can use regular expressions to validate the string entered at the short text question. Just validate a certain password. If the password is correct the following questions are shown.&lt;br /&gt;
# Create a boilerplate question which just says &amp;quot;invalid password&amp;quot; which is shown if the user entered a wrong password.&lt;br /&gt;
&lt;br /&gt;
=Create token on the fly and Edit completed survey=&lt;br /&gt;
&lt;br /&gt;
Warning: The link for the code link is wrong (June 2013)&lt;br /&gt;
&lt;br /&gt;
When having a close token survey you can create a token on the fly by giving as parameters sid and token.&lt;br /&gt;
&lt;br /&gt;
In addition if someone has already completed a survey he can review his answers and correct them.&lt;br /&gt;
&lt;br /&gt;
[http://bugs.limesurvey.org/view.php?id=2982 Just put this script attached at the bugtracker ticket into limesurveys root directory]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Prerequisites&#039;&#039;&#039;:&lt;br /&gt;
# Anonymous answers? No (This survey is NOT anonymous.)&lt;br /&gt;
# Enable Token-based answers persistence? Yes&lt;br /&gt;
# Switch to closed-acces mode&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;http://www.yoururl.com/limesurvey180/newtoken.php?sid=98761&amp;amp;token;=12345&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where Survey id = 98761 your survey&#039;s id and token=12345 a token (any token actually)&lt;br /&gt;
# The first time the token will be created and you you will redirect to anwser the surrvey&lt;br /&gt;
# If you wont complete the survey and call the script with the same parameters you will be redirect to the same case in order to finish the survey&lt;br /&gt;
# If you finish the survey and call the script with the same parameters you will see restart the survey with your previews answers prefiled so you can change them&lt;br /&gt;
# Back to 3&lt;br /&gt;
&lt;br /&gt;
this is valid for all survey in the installation but you can make a filter so it wont be valid for every survey.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Relative posts&#039;&#039;&#039;&lt;br /&gt;
*LimeSurvey Bug &amp;amp; Feature Tracker&lt;br /&gt;
&lt;br /&gt;
[http://bugs.limesurvey.org/view.php?id=2982]&lt;br /&gt;
*the code&lt;br /&gt;
&lt;br /&gt;
http://bugs.limesurvey.org/file_download.php?file_id=1826&amp;amp;type=bug&lt;br /&gt;
&lt;br /&gt;
by user &amp;quot;janokary&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=multiple &#039;completed&#039; with only one token=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: 1.71&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Whit a closed survey, each token work only one time. Sometime we need the possibility to complete a particular survey several time with the same token. This works only if you survey is set to non-anonymous answers and to use datestamps.&lt;br /&gt;
&lt;br /&gt;
Here is an example for the survey id &#039;71314&#039;.  Don&#039;t forget to adapt your own sid.&lt;br /&gt;
&lt;br /&gt;
Edit &#039;&#039;index.php &#039;&#039; to in the function submittokens() replace lines ~ 1312 :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if (bIsTokenCompletedDatestamped($thissurvey))&lt;br /&gt;
&lt;br /&gt;
   {&lt;br /&gt;
&lt;br /&gt;
   $utquery .= &amp;quot;SET completed=&#039;$today&#039;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   else&lt;br /&gt;
&lt;br /&gt;
   {&lt;br /&gt;
&lt;br /&gt;
   $utquery .= &amp;quot;SET completed=&#039;Y&#039;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;with lines :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if (bIsTokenCompletedDatestamped($thissurvey))&lt;br /&gt;
&lt;br /&gt;
   {&lt;br /&gt;
&lt;br /&gt;
   //multiple token only for survey 71314&lt;br /&gt;
&lt;br /&gt;
   if ($surveyid == &#039;71314&#039;) {&lt;br /&gt;
&lt;br /&gt;
   $utquery .= &amp;quot;SET completed=&#039;N&#039;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   }else {&lt;br /&gt;
&lt;br /&gt;
   $utquery .= &amp;quot;SET completed=&#039;$today&#039;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   else&lt;br /&gt;
&lt;br /&gt;
   {&lt;br /&gt;
&lt;br /&gt;
   //$utquery .= &amp;quot;SET completed=&#039;Y&#039;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We never update the database with the completed date and time for this survey.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039; : a limitation of this code is that you never recieve a confirmation mail for the completed.&lt;br /&gt;
&lt;br /&gt;
=Loop question(s)=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tested with: 1.85&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There is no real loop option within LimeSurvey 1.x. To loop a question an initial question to determine the number of loops is needed. Looping is then done using a condition workaround:&lt;br /&gt;
&lt;br /&gt;
1. Create a single choice question asking &amp;quot;How many X do you want to rate&amp;quot;, possible answers 1, 2, 3, 4, 5.&lt;br /&gt;
&lt;br /&gt;
2. Create up to 5 following questions asking &amp;quot;Please rate item 1/2/3/...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3. Check manual -&amp;gt; conditions and read it carefully.&lt;br /&gt;
&lt;br /&gt;
4. Set conditions like&lt;br /&gt;
&lt;br /&gt;
a) &amp;quot;Only show Q3 (Rate item 2) IF Q1 (How many...) was answered 2&lt;br /&gt;
&lt;br /&gt;
OR Q1 (How many...) was answered 3&lt;br /&gt;
&lt;br /&gt;
OR Q1 (How many...) was answered 4&lt;br /&gt;
&lt;br /&gt;
OR Q1 (How many...) was answered 5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
b) &amp;quot;Only show Q4 (Rate item 3) IF Q1 (How many...) was answered 3&lt;br /&gt;
&lt;br /&gt;
OR Q1 (How many...) was answered 4&lt;br /&gt;
&lt;br /&gt;
OR Q1 (How many...) was answered 5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
c) Q5... see above&lt;br /&gt;
&lt;br /&gt;
d) Q6...&lt;br /&gt;
&lt;br /&gt;
Of course Q2 is always shown, the following question will be added by conditions depending on what the user answered at Q1.&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Manage_users&amp;diff=57110</id>
		<title>Manage users</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Manage_users&amp;diff=57110"/>
		<updated>2013-10-06T10:28:02Z</updated>

		<summary type="html">&lt;p&gt;Nery: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= User management= &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create users== &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
To create a new user open the user management (&#039;&#039;&#039;main menu&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Create/Edit users &#039;&#039;&#039; [[File:LimeSurveyBenuzerVerwaltung.jpg]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
[[File:LimeSurveyAddUser.jpg]]&lt;br /&gt;
* Enter the desired username into the textfield &#039;&#039;&#039;Username&#039;&#039;&#039;.&lt;br /&gt;
* Enter the email address into the textfield  &#039;&#039;&#039;Email&#039;&#039;&#039;. Please note&lt;br /&gt;
** If you don&#039;t want the user to receive the confirmation email with a link to the LimeSurvey installation, username and password you can use your own email address to send the confirmation email to you. After that you can change the email address to the address of the user.&lt;br /&gt;
** LimeSurvey sends out a confirmation email to the address enterd into &#039;&#039;&#039;Email&#039;&#039;&#039;. This email address will be used as standard contact email address for surveys created by this user.&lt;br /&gt;
* Enter the users full name into the textfield &#039;&#039;&#039;Full name&#039;&#039;&#039; . Please note&lt;br /&gt;
** The full name entered here will be used as standard contact person name for surveys created by this user.&lt;br /&gt;
* Click &#039;&#039;&#039;Add user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
So you created a new user. You will find out more about setting user permissions if you continue reading further.&lt;br /&gt;
&lt;br /&gt;
==Edit users== &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
You can use the pen symbol [[File:LimeSurveyBleistiftSymbol.jpg]] to edit a user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
You can set a new email address, full name and even change the password. If you have finished what you want to do click &#039;&#039;&#039;Save&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Delete users== &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
To delete a user account simply click the delete button [[File:LimeSurveyBenutzerLoeschen.jpg]] in the line with the user account that should be deleted and hit &#039;&#039;&#039;OK&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Global permissions= &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
Global permissions apply to the whole LimeSurvey installation. If you want to set permissions only for a specific survey you can use the Survey permissions settings.&lt;br /&gt;
&lt;br /&gt;
==Setting global permissions for a user== &amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
To set global permissions for a user just click the key symbol [[File:LimeSurveySchluesselSymbol.jpg]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
[[File:LimeSurveySetGlobalPermissions.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
You can now add or remove the following rights.&lt;br /&gt;
* &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039;: This right can only be added or removed by the user called &#039;&#039;&#039;admin&#039;&#039;&#039; and grants full rights to the whole LimeSurvey installation. &#039;&#039;&#039;Please note:&#039;&#039;&#039; This right is very powerful and you should be very carfefully with granting this right.&lt;br /&gt;
* &#039;&#039;&#039;Create survey&#039;&#039;&#039;: This right lets the user create a survey as well as start, stop and it . This is the standard permission for people creating their own surveys.&lt;br /&gt;
* &#039;&#039;&#039;Configurator&#039;&#039;&#039;: With this right a user can check data integrity, save the SQL database to an sql file and view the php info in the global settings.&lt;br /&gt;
* &#039;&#039;&#039;Create user&#039;&#039;&#039;: Having this right a user can create new users and delete users created with this account. The newly created users cannot have higher permissions than the parent. If this has to be done a &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039; has to grant the rights.&lt;br /&gt;
* &#039;&#039;&#039;Use all/manage templates&#039;&#039;&#039;: It allows the user to use all design templates and edit all non standard templates. A person with this right should have sufficient knowledge in terms of  HTML/php, Javascript and CSS. If a user not familar with this things should use a specific design template it would be better to use the template permissions.&lt;br /&gt;
* &#039;&#039;&#039;Manage labels&#039;&#039;&#039;: This right grants all rights regarding label sets (create, edit and delete).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
The most important use cases for granting user rights are collected at the &#039;&#039;&#039;use cases&#039;&#039;&#039; part of this article.&lt;br /&gt;
&lt;br /&gt;
==Setting template permissions for a user== &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
With template permissions you can set which design templates a user can select when creating or editing a survey. It might be a good idea to restrict the design templates a user can select in order to prevent unwanted use of design templates not suitable for a user/survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please note:&#039;&#039;&#039; If you have a specific design template for a group of users or customers you might want to restrict the access for them to use only the template created for their purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
To set/edit the template permissions for a user simply click the key symbol for design templates [[File:LimeSurveySchluesselSymbolTemplates.jpg]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
[[File:LimeSurveySetDesignTemplatesLS.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
You can now select the design templates this user can select. After you finished your selection/deselection just hit &#039;&#039;&#039;Save settings&#039;&#039;&#039; .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
The most important use cases for granting user rights are collected at the &#039;&#039;&#039;use cases&#039;&#039;&#039; part of this article.&lt;br /&gt;
&lt;br /&gt;
=Setting permissions for a single survey= &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
These permissions only apply for a single survey. If you want to set permissions for the whole system you can use the global permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Please note:&#039;&#039;&#039; An existing user account is required to set permissions for a single survey. If the account doesn&#039;t exist you have to create it first and then change the survey permissions. You don&#039;t have to apply any global rights to the user, it is just necessary that the user account itself exists.&lt;br /&gt;
&lt;br /&gt;
==Setting user permissions for a single survey== &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
To change the survey permissions you have to select &#039;&#039;&#039;Survey permissions&#039;&#039;&#039; from the &#039;&#039;&#039;Survey properties&#039;&#039;&#039; menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
[[File:LimeSurveySurveyPermissions.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
In the next step you select the user you want to change the survey rights and click &#039;&#039;&#039;Add user&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
[[File:LimeSurveyAddSurveyPermission.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
After you click &#039;&#039;&#039;Set survey permissions&#039;&#039;&#039; the survey permissions matrix for the survey and user will be shown.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
[[File:LimeSurveyUserPermissionMatrix.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
In this matrix you can set the rights for the different features and parts. You simply click  a checkbox if you want to add or remove this right. If you click a checkbox in the first column all rights for this line will be selected/removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
In the other columns you can choose whether a user can do a single actions from this feature/part.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
After you finished editing the survey permissions click &#039;&#039;&#039;Save now&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
The most important use cases for granting user rights are collected at the &#039;&#039;&#039;use cases&#039;&#039;&#039; part of this article.&lt;br /&gt;
&lt;br /&gt;
=Use cases= &amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
In this part of the article we&#039;ll provide a few ideas which use cases may exist and how and which rights would be a good choice.&lt;br /&gt;
&lt;br /&gt;
==A new person in charge for administrating LimeSurvey will be added== &amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
* login as &#039;&#039;&#039;admin&#039;&#039;&#039;&lt;br /&gt;
* Create a new user account&lt;br /&gt;
* Set global permissions for user to &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039;&lt;br /&gt;
* not necessary: Setting the template permissions (&#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039; has all permissions for all templates)&lt;br /&gt;
* not necessary: Setting the survey permissions (&#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039; has all permissions for all surveys)&lt;br /&gt;
&lt;br /&gt;
==A new user wants to create own surveys== &amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
* login as &#039;&#039;&#039;admin&#039;&#039;&#039; or user with &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039; permission.&lt;br /&gt;
* Create a new user account&lt;br /&gt;
* Set global permissions for user to &#039;&#039;&#039;Create survey&#039;&#039;&#039;&lt;br /&gt;
* Set template permissions for user to the template/s that should be used by the user/user-group&lt;br /&gt;
* not necessary: Setting the survey permissions (The creator of a survey has all permissions for his/her surveys)&lt;br /&gt;
&lt;br /&gt;
==The creator of a survey needs another person to edit his/her survey== &amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
* login as &#039;&#039;&#039;admin&#039;&#039;&#039; or user with &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039; permission.&lt;br /&gt;
* Create a new user account&lt;br /&gt;
* Set &#039;&#039;&#039;no global permissions&#039;&#039;&#039; for user&lt;br /&gt;
* Set &#039;&#039;&#039;no template permissions&#039;&#039;&#039; for user&lt;br /&gt;
* Set the survey permissions the way you want. It depends on what the new user should do and how much permissions he/she needs. If he/she should have all permissions for the survey you can select the first checkboxes in the first column with checkboxes (the one with the &#039;&#039;&#039;&amp;lt;&amp;lt;&#039;&#039;&#039; or &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039; button as header).&lt;br /&gt;
&lt;br /&gt;
==A person responsible for the survey wants to see the results of the survey and export them== &amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
* login as &#039;&#039;&#039;admin&#039;&#039;&#039; or user with &#039;&#039;&#039;SuperAdministrator&#039;&#039;&#039; permission.&lt;br /&gt;
* Create a new user account&lt;br /&gt;
* Set &#039;&#039;&#039;no global permissions&#039;&#039;&#039; for user&lt;br /&gt;
* Set &#039;&#039;&#039;no template permissions&#039;&#039;&#039; for user&lt;br /&gt;
* Set survey permissions to: &#039;&#039;&#039;Responses&#039;&#039;&#039;: &#039;&#039;&#039;View/read&#039;&#039;&#039; and &#039;&#039;&#039;export&#039;&#039;&#039; , &#039;&#039;&#039;Statistics&#039;&#039;&#039;: &#039;&#039;&#039;View/read&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
[[File:LimeSurveyCusomerOwnStatistics.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
To be moved somewhere else once better defined:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
There are several classes of possible people who access a LimeSurvey installation.  But only one set of people is actually termed a &#039;&#039;&#039;user&#039;&#039;&#039; in the code and documentation.  So lets understand what these classes of people are so we can better understand the terminology of the program.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|Class||Description&lt;br /&gt;
|-&lt;br /&gt;
|Installation Administrator || Those people who create login user accounts to allow others to create, edit, activate and/or view surveys and their results.  Often can be given access to edit the templates, labelsets and other key features independent of any particular survey stored.&lt;br /&gt;
|-&lt;br /&gt;
|Survey Administrator || A person with a login account that is given some management access to a particular survey.  Each survey can have its own set of users with specific rights to manipulate the survey.  These rights can be as broad as to activate a survey and possibly edit its question base.  They can be as minimum as simply able to review the results to date.&lt;br /&gt;
|-&lt;br /&gt;
|Participant || Those people who simply respond or participate in taking a survey.  They may or may not have token access.  They do not need a login account to the administrative interface and thus are not termed users.&lt;br /&gt;
|-&lt;br /&gt;
|Installer || A special class of person who has access to the MySQL (or similar) database server and possibly the command line interface of the computers operating system in order to install and configure the survey software.  This person is asked to setup the initial SuperAdmin user account from which other user login accounts can be created.&lt;br /&gt;
|-&lt;br /&gt;
|Developer || An very special class of person who has access to the source code and can manipulate it to change the programs behavior.  Generally only done with versions of the survey that are not available for live, active surveys. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Use one-time passwords= &amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
Since version 1.81 a user can call the limesurvey login at /limesurvey/admin and pass username and a one time password which was previously written into the users table (column one_time_pw) by an external application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
To enable this login method [[Optional settings#Use_one_time_passwords |a setting has to be turned on]] ($use_one_time_passwords = true;) in config.php.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
The URL has to contain the following variables:&lt;br /&gt;
* &#039;&#039;&#039;user:&#039;&#039;&#039; The username normally used to login into LimeSurvey. This username has to exist in the &#039;users&#039; table of the database.&lt;br /&gt;
* &#039;&#039;&#039;onepass:&#039;&#039;&#039; The plain text password which is then compared to the password in the &#039;users&#039; table&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
A valid URL to login using a one-time password will look like this...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
... for 1.81 to 1.92:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;http://www.yourdomain.org/limesurvey/admin/admin.php?user=myusername&amp;amp;onepass;=secretpassword&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
...for 2.0 or later:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;http://www.yourdomain.org/limesurvey/index.php/admin/authentication/login?user=myusername&amp;amp;onepass;=secretpassword&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Things to watch out for:&#039;&#039;&#039;&lt;br /&gt;
* One time passwords have to be enabled by setting &amp;quot;$use_one_time_passwords = true;&amp;quot; (for 1.92), respective &amp;quot;use_one_time_passwords =&amp;gt; true&amp;quot; (for 2.0 in config section) in config.php.&lt;br /&gt;
* The passed username has to exist in LimeSurvey&#039;s &#039;&#039;users&#039;&#039; table&lt;br /&gt;
* The one time password, which can be set by an external application, has to be stored as [http://www.php.net/md5 MD5 hash] in column &#039;&#039;one_time_pw&#039;&#039; of table &#039;&#039;users&#039;&#039;&lt;br /&gt;
* The passed plain text password will be hashed using md5() function and will then be compared to the stored hash in column &#039;&#039;one_time_pw&#039;&#039; of table &#039;&#039;users&#039;&#039;. Both passwords have to match.&lt;br /&gt;
* After the first login with the one time password this password is deleted from the database. The user won&#039;t be able to login with this password a second time.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nery</name></author>
	</entry>
</feed>