<?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=Mazi</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=Mazi"/>
	<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/Special:Contributions/Mazi"/>
	<updated>2026-08-10T13:31:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381348</id>
		<title>Available third party plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381348"/>
		<updated>2026-05-19T11:31:23Z</updated>

		<summary type="html">&lt;p&gt;Mazi: /* Export and statistics plugins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some plugins are listed in the [https://account.limesurvey.org/limestore Limestore]. If you have a plugin you would like to share with the world, feel free to add it to this page.&lt;br /&gt;
&lt;br /&gt;
== Authentication plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/extended-auth-ldap-limesurvey-plugin Free Auth LDAP Plugin]&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-saml-plugin/ SAML SSO Plugin]&lt;br /&gt;
* [https://github.com/technowhizz/LimeSurvey-RegDomainRestricter Registration Email Domain Restrictor] &lt;br /&gt;
* [http://extensions.sondages.pro/authentification-by-wordpress/ Authentification by WordPress user]&lt;br /&gt;
* [https://github.com/univlorraine/limesurvey-cas CAS Authentication plugin for LimeSurvey]&lt;br /&gt;
* [https://github.com/atlet/LimeSurvey-ShibbolethAuth LimeSurvey Shibboleth auth plugin]&lt;br /&gt;
* [https://framagit.org/Animafac/limesurvey/limesurvey-rememberme LimeSurvey RememberMe plugin]&lt;br /&gt;
* [https://github.com/SondagesPro/limesurvey-oauth2 OAuth2 authentication]&lt;br /&gt;
&lt;br /&gt;
== Export and statistics plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/free-limesurvey-reporting-plugin/ Free LimeSurvey Reporting Plugin]: Create live reports for your LimeSurvey data with custom charts and admin notifications. Ideal for automated evaluations and printable summaries.&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-codebook-plugin/ LimeSurvey Codebook Plugin – Export All Question &amp;amp; Answer Codes]: Generate a complete codebook of your LimeSurvey survey – all question codes, subquestion codes and answer codes on one screen. Export to CSV or JSON instantly.&lt;br /&gt;
* [http://extensions.sondages.pro/exportcompleteanswers/ exportCompleteAnswers : Complete New export system allowing export Answer code and answer text in CSV. Options is manageable by super admin.]&lt;br /&gt;
* [http://extensions.sondages.pro/triple-s-export/ exportTripleS : export in Triple-S XML2 or XML1.3 format survey structure and data.]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics extendAdminStatitistics : rewriting of core statistics, actually put sub question in same table and graph]&lt;br /&gt;
* [https://github.com/reportico-web/limesurvey-reportico Reportico Reporting module for LimeSurvey]: generate charts,tables and statistics from survey data&lt;br /&gt;
* [https://www.robotspaceship.ai/loesungen/limesurvey-ppt-exporter PowerPoint Export] Export answers to PowerPoint (.pptx) as bar, pie, grouping, matrix, or dual-array charts, including ranking questions and text word clouds.&lt;br /&gt;
&lt;br /&gt;
== Public survey plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/respondent-driven-sampling-rds-limesurvey-plugin/ Respondent Driven Sampling (RDS) Plugin]: Add respondent driven sampling (RDS) to your LimeSurvey setup. Tokens are generated on submit and stored for controlled participant invitations.&lt;br /&gt;
* [http://extensions.sondages.pro/hideemptycolumn-for-limesurvey/ hideEmptyColumn : A plugin to add a solution to hide column of array question type with ExpressionScript of LimeSurvey ]&lt;br /&gt;
* [http://extensions.sondages.pro/moreaccessibility/ moreAccessibility : some option to add accessibility to public survey] 2.6lts compatible onlmy, deprecated in 3.0&lt;br /&gt;
* [https://git.framasoft.org/Shnoulle/addQuestionCodeClass addQuestionCodeClass : add the question code at the question wrapper class]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/radioToStarRating radioToStarRating : set any radio list to star rating system]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/moveSomeAnswers moveSomeAnswers] : If using random_order attribute : allow to always move some answers at end.&lt;br /&gt;
&lt;br /&gt;
== Data editing plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/create-limesurvey-surveys-from-csv/ Copy Survey from CSV plugin]: Enables automated survey duplication based on CSV input – perfect for mass-creating standardized evaluations.&lt;br /&gt;
* [https://manual.limesurvey.org/MassAction_Plugin MassAction] : A plugin for faster survey editing by loading questions details into editable cells. Includes a search and replace feature.&lt;br /&gt;
&lt;br /&gt;
== Email plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/automatically-send-email-invitations/ Automatically send email invitations]: Script for automatically sending LimeSurvey email invitations using a cronjob. Allows setting email batch sizes.&lt;br /&gt;
* [https://survey-consulting.com/product/automatically-send-email-reminders/ Automatically send email reminders]: Script for automatically sending LimeSurvey email reminders using a cronjob. Helps you [https://survey-consulting.com/how-to-prevent-limesurvey-email-invitations-or-reminders-being-treated-as-spam/ solving spam issues] and working around email sending limits.&lt;br /&gt;
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample]&lt;br /&gt;
* [https://github.com/LimeSurvey/LimeSurvey/blob/develop/plugins/mailSenderToFrom/mailSenderToFrom.php mailSenderToFrom]&lt;br /&gt;
* [https://github.com/Xites/LS_mailDKIM mailDKIM]&lt;br /&gt;
* [https://github.com/Xites/LS_mailEmbedImages mailEmbedImages]&lt;br /&gt;
* [https://github.com/RegioneER/LsRerAntiphishing Anti Phishing Templates] this free software plugin, mandatory alters mail notifications templates, by displaying urls inside email messages.&lt;br /&gt;
&lt;br /&gt;
== Other plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/recomputeexpression-for-limesurvey Recompute Expressions:] A Plugin for LimeSurvey to recompute expression in survey with already submitted survey. Allow to update some relevance too.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/showAdvancedSettings showAdvancedSettings:] Show advanced settings in question edit by default.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/replaceRegister  replaceRegisterː] Extra option for Register, starting point for other plugin. &lt;br /&gt;
* [http://extensions.sondages.pro/fixmaxstep-for-question-index/ fixMaxStep : Fix question index for token answer persistence survey:] Example of usage : get the complete index when user come back to the survey.&lt;br /&gt;
* [http://extensions.sondages.pro/sendmailajax-all-email-in-one/ sendMailAjax : Send token email one by one with ajaxː] Allow to send all email in one click without restriction.&lt;br /&gt;
* [http://extensions.sondages.pro/mailing-management/sendmailcron sendMailCron: Automatically send invitations and reminders using cronjobsː] Automatically sends invitations and reminders in custom intervals. Extensive configuration and debugging options&lt;br /&gt;
* [https://github.com/SteveCohen/Piwik-for-Limesurvey Piwik-for-Limesurvey Piwik for LimeSurvey]: Plugs Piwik into LimeSurvey, so you can track your survey admin users and respondents.&lt;br /&gt;
* [https://github.com/SondagesPro/surveysModel Mark surveys as &amp;quot;Survey Model/Template&amp;quot;ː] Allow admins to mark a survey as &amp;quot;Survey Model&amp;quot;, a kind of &amp;quot;master survey&amp;quot; or &amp;quot;survey template&amp;quot; which only users with appropriate rights are allowed to edit. The common user is only allowed to create copies based on such a survey template.&lt;br /&gt;
* [https://github.com/SondagesPro/LS-toolsDomDocument toolsDomDocumentː] a tools for anothers plugin&lt;br /&gt;
* [https://github.com/TonisOrmisson/limesurvey-url-templates UrlTemplateChangerː] Set respondent&#039;s interview template over an URL parameter.&lt;br /&gt;
* [https://github.com/evently-nl/zesthook  ZestHookː] Makes it possible to send a Post request on every response submission. You can set the URL to post to, as well as several other options.&lt;br /&gt;
* [https://github.com/CEric-fr/limesurvey-rgpd Extension RGPD pour LimeSurvey] Each questionnaire owner is able to interact with these conditions of use via a new submenu added in the &amp;quot;questionnaire parameters&amp;quot; entitled: GDPR configuration.&lt;br /&gt;
* [https://github.com/projeto-cade-unb/Lime2Camunda Lime2Camunda] Plugin for integration with LimeSurvey with Camunda, which at the end of completing the survey it starts a process instance in Camunda submitting all questions and answers as process variables.&lt;br /&gt;
* [https://github.com/librecodecoop/lsTelegramNotify lsTelegramNotify]: Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud]: Save all survey responses and their attachments automatically to a folder in your Nextcloud.&lt;br /&gt;
&lt;br /&gt;
== Example and demo plugins ==&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendRemoteControl extendRemoteControl] : Show how to add function to [[RemoteControl_2_API]], show how to create a new admin page too (usage of public function actionIndex() )&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381347</id>
		<title>Available third party plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381347"/>
		<updated>2026-05-19T11:30:28Z</updated>

		<summary type="html">&lt;p&gt;Mazi: /* Public survey plugins */ Fixed list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some plugins are listed in the [https://account.limesurvey.org/limestore Limestore]. If you have a plugin you would like to share with the world, feel free to add it to this page.&lt;br /&gt;
&lt;br /&gt;
== Authentication plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/extended-auth-ldap-limesurvey-plugin Free Auth LDAP Plugin]&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-saml-plugin/ SAML SSO Plugin]&lt;br /&gt;
* [https://github.com/technowhizz/LimeSurvey-RegDomainRestricter Registration Email Domain Restrictor] &lt;br /&gt;
* [http://extensions.sondages.pro/authentification-by-wordpress/ Authentification by WordPress user]&lt;br /&gt;
* [https://github.com/univlorraine/limesurvey-cas CAS Authentication plugin for LimeSurvey]&lt;br /&gt;
* [https://github.com/atlet/LimeSurvey-ShibbolethAuth LimeSurvey Shibboleth auth plugin]&lt;br /&gt;
* [https://framagit.org/Animafac/limesurvey/limesurvey-rememberme LimeSurvey RememberMe plugin]&lt;br /&gt;
* [https://github.com/SondagesPro/limesurvey-oauth2 OAuth2 authentication]&lt;br /&gt;
&lt;br /&gt;
== Export and statistics plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/free-limesurvey-reporting-plugin/ Free LimeSurvey Reporting Plugin]: Create live reports for your LimeSurvey data with custom charts and admin notifications. Ideal for automated evaluations and printable summaries.&lt;br /&gt;
* [http://extensions.sondages.pro/exportcompleteanswers/ exportCompleteAnswers : Complete New export system allowing export Answer code and answer text in CSV. Options is manageable by super admin.]&lt;br /&gt;
* [http://extensions.sondages.pro/triple-s-export/ exportTripleS : export in Triple-S XML2 or XML1.3 format survey structure and data.]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics extendAdminStatitistics : rewriting of core statistics, actually put sub question in same table and graph]&lt;br /&gt;
* [https://github.com/reportico-web/limesurvey-reportico Reportico Reporting module for LimeSurvey]: generate charts,tables and statistics from survey data&lt;br /&gt;
* [https://www.robotspaceship.ai/loesungen/limesurvey-ppt-exporter PowerPoint Export] Export answers to PowerPoint (.pptx) as bar, pie, grouping, matrix, or dual-array charts, including ranking questions and text word clouds.&lt;br /&gt;
&lt;br /&gt;
== Public survey plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/respondent-driven-sampling-rds-limesurvey-plugin/ Respondent Driven Sampling (RDS) Plugin]: Add respondent driven sampling (RDS) to your LimeSurvey setup. Tokens are generated on submit and stored for controlled participant invitations.&lt;br /&gt;
* [http://extensions.sondages.pro/hideemptycolumn-for-limesurvey/ hideEmptyColumn : A plugin to add a solution to hide column of array question type with ExpressionScript of LimeSurvey ]&lt;br /&gt;
* [http://extensions.sondages.pro/moreaccessibility/ moreAccessibility : some option to add accessibility to public survey] 2.6lts compatible onlmy, deprecated in 3.0&lt;br /&gt;
* [https://git.framasoft.org/Shnoulle/addQuestionCodeClass addQuestionCodeClass : add the question code at the question wrapper class]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/radioToStarRating radioToStarRating : set any radio list to star rating system]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/moveSomeAnswers moveSomeAnswers] : If using random_order attribute : allow to always move some answers at end.&lt;br /&gt;
&lt;br /&gt;
== Data editing plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/create-limesurvey-surveys-from-csv/ Copy Survey from CSV plugin]: Enables automated survey duplication based on CSV input – perfect for mass-creating standardized evaluations.&lt;br /&gt;
* [https://manual.limesurvey.org/MassAction_Plugin MassAction] : A plugin for faster survey editing by loading questions details into editable cells. Includes a search and replace feature.&lt;br /&gt;
&lt;br /&gt;
== Email plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/automatically-send-email-invitations/ Automatically send email invitations]: Script for automatically sending LimeSurvey email invitations using a cronjob. Allows setting email batch sizes.&lt;br /&gt;
* [https://survey-consulting.com/product/automatically-send-email-reminders/ Automatically send email reminders]: Script for automatically sending LimeSurvey email reminders using a cronjob. Helps you [https://survey-consulting.com/how-to-prevent-limesurvey-email-invitations-or-reminders-being-treated-as-spam/ solving spam issues] and working around email sending limits.&lt;br /&gt;
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample]&lt;br /&gt;
* [https://github.com/LimeSurvey/LimeSurvey/blob/develop/plugins/mailSenderToFrom/mailSenderToFrom.php mailSenderToFrom]&lt;br /&gt;
* [https://github.com/Xites/LS_mailDKIM mailDKIM]&lt;br /&gt;
* [https://github.com/Xites/LS_mailEmbedImages mailEmbedImages]&lt;br /&gt;
* [https://github.com/RegioneER/LsRerAntiphishing Anti Phishing Templates] this free software plugin, mandatory alters mail notifications templates, by displaying urls inside email messages.&lt;br /&gt;
&lt;br /&gt;
== Other plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/recomputeexpression-for-limesurvey Recompute Expressions:] A Plugin for LimeSurvey to recompute expression in survey with already submitted survey. Allow to update some relevance too.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/showAdvancedSettings showAdvancedSettings:] Show advanced settings in question edit by default.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/replaceRegister  replaceRegisterː] Extra option for Register, starting point for other plugin. &lt;br /&gt;
* [http://extensions.sondages.pro/fixmaxstep-for-question-index/ fixMaxStep : Fix question index for token answer persistence survey:] Example of usage : get the complete index when user come back to the survey.&lt;br /&gt;
* [http://extensions.sondages.pro/sendmailajax-all-email-in-one/ sendMailAjax : Send token email one by one with ajaxː] Allow to send all email in one click without restriction.&lt;br /&gt;
* [http://extensions.sondages.pro/mailing-management/sendmailcron sendMailCron: Automatically send invitations and reminders using cronjobsː] Automatically sends invitations and reminders in custom intervals. Extensive configuration and debugging options&lt;br /&gt;
* [https://github.com/SteveCohen/Piwik-for-Limesurvey Piwik-for-Limesurvey Piwik for LimeSurvey]: Plugs Piwik into LimeSurvey, so you can track your survey admin users and respondents.&lt;br /&gt;
* [https://github.com/SondagesPro/surveysModel Mark surveys as &amp;quot;Survey Model/Template&amp;quot;ː] Allow admins to mark a survey as &amp;quot;Survey Model&amp;quot;, a kind of &amp;quot;master survey&amp;quot; or &amp;quot;survey template&amp;quot; which only users with appropriate rights are allowed to edit. The common user is only allowed to create copies based on such a survey template.&lt;br /&gt;
* [https://github.com/SondagesPro/LS-toolsDomDocument toolsDomDocumentː] a tools for anothers plugin&lt;br /&gt;
* [https://github.com/TonisOrmisson/limesurvey-url-templates UrlTemplateChangerː] Set respondent&#039;s interview template over an URL parameter.&lt;br /&gt;
* [https://github.com/evently-nl/zesthook  ZestHookː] Makes it possible to send a Post request on every response submission. You can set the URL to post to, as well as several other options.&lt;br /&gt;
* [https://github.com/CEric-fr/limesurvey-rgpd Extension RGPD pour LimeSurvey] Each questionnaire owner is able to interact with these conditions of use via a new submenu added in the &amp;quot;questionnaire parameters&amp;quot; entitled: GDPR configuration.&lt;br /&gt;
* [https://github.com/projeto-cade-unb/Lime2Camunda Lime2Camunda] Plugin for integration with LimeSurvey with Camunda, which at the end of completing the survey it starts a process instance in Camunda submitting all questions and answers as process variables.&lt;br /&gt;
* [https://github.com/librecodecoop/lsTelegramNotify lsTelegramNotify]: Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud]: Save all survey responses and their attachments automatically to a folder in your Nextcloud.&lt;br /&gt;
&lt;br /&gt;
== Example and demo plugins ==&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendRemoteControl extendRemoteControl] : Show how to add function to [[RemoteControl_2_API]], show how to create a new admin page too (usage of public function actionIndex() )&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381346</id>
		<title>Available third party plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381346"/>
		<updated>2026-05-19T11:28:57Z</updated>

		<summary type="html">&lt;p&gt;Mazi: /* Email plugins */ Description added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some plugins are listed in the [https://account.limesurvey.org/limestore Limestore]. If you have a plugin you would like to share with the world, feel free to add it to this page.&lt;br /&gt;
&lt;br /&gt;
== Authentication plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/extended-auth-ldap-limesurvey-plugin Free Auth LDAP Plugin]&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-saml-plugin/ SAML SSO Plugin]&lt;br /&gt;
* [https://github.com/technowhizz/LimeSurvey-RegDomainRestricter Registration Email Domain Restrictor] &lt;br /&gt;
* [http://extensions.sondages.pro/authentification-by-wordpress/ Authentification by WordPress user]&lt;br /&gt;
* [https://github.com/univlorraine/limesurvey-cas CAS Authentication plugin for LimeSurvey]&lt;br /&gt;
* [https://github.com/atlet/LimeSurvey-ShibbolethAuth LimeSurvey Shibboleth auth plugin]&lt;br /&gt;
* [https://framagit.org/Animafac/limesurvey/limesurvey-rememberme LimeSurvey RememberMe plugin]&lt;br /&gt;
* [https://github.com/SondagesPro/limesurvey-oauth2 OAuth2 authentication]&lt;br /&gt;
&lt;br /&gt;
== Export and statistics plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/free-limesurvey-reporting-plugin/ Free LimeSurvey Reporting Plugin]: Create live reports for your LimeSurvey data with custom charts and admin notifications. Ideal for automated evaluations and printable summaries.&lt;br /&gt;
* [http://extensions.sondages.pro/exportcompleteanswers/ exportCompleteAnswers : Complete New export system allowing export Answer code and answer text in CSV. Options is manageable by super admin.]&lt;br /&gt;
* [http://extensions.sondages.pro/triple-s-export/ exportTripleS : export in Triple-S XML2 or XML1.3 format survey structure and data.]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics extendAdminStatitistics : rewriting of core statistics, actually put sub question in same table and graph]&lt;br /&gt;
* [https://github.com/reportico-web/limesurvey-reportico Reportico Reporting module for LimeSurvey]: generate charts,tables and statistics from survey data&lt;br /&gt;
* [https://www.robotspaceship.ai/loesungen/limesurvey-ppt-exporter PowerPoint Export] Export answers to PowerPoint (.pptx) as bar, pie, grouping, matrix, or dual-array charts, including ranking questions and text word clouds.&lt;br /&gt;
&lt;br /&gt;
== Public survey plugins ==&lt;br /&gt;
~ [https://survey-consulting.com/product/respondent-driven-sampling-rds-limesurvey-plugin/ Respondent Driven Sampling (RDS) Plugin]: Add respondent driven sampling (RDS) to your LimeSurvey setup. Tokens are generated on submit and stored for controlled participant invitations.&lt;br /&gt;
* [http://extensions.sondages.pro/hideemptycolumn-for-limesurvey/ hideEmptyColumn : A plugin to add a solution to hide column of array question type with ExpressionScript of LimeSurvey ]&lt;br /&gt;
* [http://extensions.sondages.pro/moreaccessibility/ moreAccessibility : some option to add accessibility to public survey] 2.6lts compatible onlmy, deprecated in 3.0&lt;br /&gt;
* [https://git.framasoft.org/Shnoulle/addQuestionCodeClass addQuestionCodeClass : add the question code at the question wrapper class]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/radioToStarRating radioToStarRating : set any radio list to star rating system]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/moveSomeAnswers moveSomeAnswers] : If using random_order attribute : allow to always move some answers at end.&lt;br /&gt;
&lt;br /&gt;
== Data editing plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/create-limesurvey-surveys-from-csv/ Copy Survey from CSV plugin]: Enables automated survey duplication based on CSV input – perfect for mass-creating standardized evaluations.&lt;br /&gt;
* [https://manual.limesurvey.org/MassAction_Plugin MassAction] : A plugin for faster survey editing by loading questions details into editable cells. Includes a search and replace feature.&lt;br /&gt;
&lt;br /&gt;
== Email plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/automatically-send-email-invitations/ Automatically send email invitations]: Script for automatically sending LimeSurvey email invitations using a cronjob. Allows setting email batch sizes.&lt;br /&gt;
* [https://survey-consulting.com/product/automatically-send-email-reminders/ Automatically send email reminders]: Script for automatically sending LimeSurvey email reminders using a cronjob. Helps you [https://survey-consulting.com/how-to-prevent-limesurvey-email-invitations-or-reminders-being-treated-as-spam/ solving spam issues] and working around email sending limits.&lt;br /&gt;
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample]&lt;br /&gt;
* [https://github.com/LimeSurvey/LimeSurvey/blob/develop/plugins/mailSenderToFrom/mailSenderToFrom.php mailSenderToFrom]&lt;br /&gt;
* [https://github.com/Xites/LS_mailDKIM mailDKIM]&lt;br /&gt;
* [https://github.com/Xites/LS_mailEmbedImages mailEmbedImages]&lt;br /&gt;
* [https://github.com/RegioneER/LsRerAntiphishing Anti Phishing Templates] this free software plugin, mandatory alters mail notifications templates, by displaying urls inside email messages.&lt;br /&gt;
&lt;br /&gt;
== Other plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/recomputeexpression-for-limesurvey Recompute Expressions:] A Plugin for LimeSurvey to recompute expression in survey with already submitted survey. Allow to update some relevance too.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/showAdvancedSettings showAdvancedSettings:] Show advanced settings in question edit by default.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/replaceRegister  replaceRegisterː] Extra option for Register, starting point for other plugin. &lt;br /&gt;
* [http://extensions.sondages.pro/fixmaxstep-for-question-index/ fixMaxStep : Fix question index for token answer persistence survey:] Example of usage : get the complete index when user come back to the survey.&lt;br /&gt;
* [http://extensions.sondages.pro/sendmailajax-all-email-in-one/ sendMailAjax : Send token email one by one with ajaxː] Allow to send all email in one click without restriction.&lt;br /&gt;
* [http://extensions.sondages.pro/mailing-management/sendmailcron sendMailCron: Automatically send invitations and reminders using cronjobsː] Automatically sends invitations and reminders in custom intervals. Extensive configuration and debugging options&lt;br /&gt;
* [https://github.com/SteveCohen/Piwik-for-Limesurvey Piwik-for-Limesurvey Piwik for LimeSurvey]: Plugs Piwik into LimeSurvey, so you can track your survey admin users and respondents.&lt;br /&gt;
* [https://github.com/SondagesPro/surveysModel Mark surveys as &amp;quot;Survey Model/Template&amp;quot;ː] Allow admins to mark a survey as &amp;quot;Survey Model&amp;quot;, a kind of &amp;quot;master survey&amp;quot; or &amp;quot;survey template&amp;quot; which only users with appropriate rights are allowed to edit. The common user is only allowed to create copies based on such a survey template.&lt;br /&gt;
* [https://github.com/SondagesPro/LS-toolsDomDocument toolsDomDocumentː] a tools for anothers plugin&lt;br /&gt;
* [https://github.com/TonisOrmisson/limesurvey-url-templates UrlTemplateChangerː] Set respondent&#039;s interview template over an URL parameter.&lt;br /&gt;
* [https://github.com/evently-nl/zesthook  ZestHookː] Makes it possible to send a Post request on every response submission. You can set the URL to post to, as well as several other options.&lt;br /&gt;
* [https://github.com/CEric-fr/limesurvey-rgpd Extension RGPD pour LimeSurvey] Each questionnaire owner is able to interact with these conditions of use via a new submenu added in the &amp;quot;questionnaire parameters&amp;quot; entitled: GDPR configuration.&lt;br /&gt;
* [https://github.com/projeto-cade-unb/Lime2Camunda Lime2Camunda] Plugin for integration with LimeSurvey with Camunda, which at the end of completing the survey it starts a process instance in Camunda submitting all questions and answers as process variables.&lt;br /&gt;
* [https://github.com/librecodecoop/lsTelegramNotify lsTelegramNotify]: Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud]: Save all survey responses and their attachments automatically to a folder in your Nextcloud.&lt;br /&gt;
&lt;br /&gt;
== Example and demo plugins ==&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendRemoteControl extendRemoteControl] : Show how to add function to [[RemoteControl_2_API]], show how to create a new admin page too (usage of public function actionIndex() )&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381345</id>
		<title>Available third party plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381345"/>
		<updated>2026-05-19T11:27:53Z</updated>

		<summary type="html">&lt;p&gt;Mazi: /* Email plugins */ Added automatic email sending plugins&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some plugins are listed in the [https://account.limesurvey.org/limestore Limestore]. If you have a plugin you would like to share with the world, feel free to add it to this page.&lt;br /&gt;
&lt;br /&gt;
== Authentication plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/extended-auth-ldap-limesurvey-plugin Free Auth LDAP Plugin]&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-saml-plugin/ SAML SSO Plugin]&lt;br /&gt;
* [https://github.com/technowhizz/LimeSurvey-RegDomainRestricter Registration Email Domain Restrictor] &lt;br /&gt;
* [http://extensions.sondages.pro/authentification-by-wordpress/ Authentification by WordPress user]&lt;br /&gt;
* [https://github.com/univlorraine/limesurvey-cas CAS Authentication plugin for LimeSurvey]&lt;br /&gt;
* [https://github.com/atlet/LimeSurvey-ShibbolethAuth LimeSurvey Shibboleth auth plugin]&lt;br /&gt;
* [https://framagit.org/Animafac/limesurvey/limesurvey-rememberme LimeSurvey RememberMe plugin]&lt;br /&gt;
* [https://github.com/SondagesPro/limesurvey-oauth2 OAuth2 authentication]&lt;br /&gt;
&lt;br /&gt;
== Export and statistics plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/free-limesurvey-reporting-plugin/ Free LimeSurvey Reporting Plugin]: Create live reports for your LimeSurvey data with custom charts and admin notifications. Ideal for automated evaluations and printable summaries.&lt;br /&gt;
* [http://extensions.sondages.pro/exportcompleteanswers/ exportCompleteAnswers : Complete New export system allowing export Answer code and answer text in CSV. Options is manageable by super admin.]&lt;br /&gt;
* [http://extensions.sondages.pro/triple-s-export/ exportTripleS : export in Triple-S XML2 or XML1.3 format survey structure and data.]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics extendAdminStatitistics : rewriting of core statistics, actually put sub question in same table and graph]&lt;br /&gt;
* [https://github.com/reportico-web/limesurvey-reportico Reportico Reporting module for LimeSurvey]: generate charts,tables and statistics from survey data&lt;br /&gt;
* [https://www.robotspaceship.ai/loesungen/limesurvey-ppt-exporter PowerPoint Export] Export answers to PowerPoint (.pptx) as bar, pie, grouping, matrix, or dual-array charts, including ranking questions and text word clouds.&lt;br /&gt;
&lt;br /&gt;
== Public survey plugins ==&lt;br /&gt;
~ [https://survey-consulting.com/product/respondent-driven-sampling-rds-limesurvey-plugin/ Respondent Driven Sampling (RDS) Plugin]: Add respondent driven sampling (RDS) to your LimeSurvey setup. Tokens are generated on submit and stored for controlled participant invitations.&lt;br /&gt;
* [http://extensions.sondages.pro/hideemptycolumn-for-limesurvey/ hideEmptyColumn : A plugin to add a solution to hide column of array question type with ExpressionScript of LimeSurvey ]&lt;br /&gt;
* [http://extensions.sondages.pro/moreaccessibility/ moreAccessibility : some option to add accessibility to public survey] 2.6lts compatible onlmy, deprecated in 3.0&lt;br /&gt;
* [https://git.framasoft.org/Shnoulle/addQuestionCodeClass addQuestionCodeClass : add the question code at the question wrapper class]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/radioToStarRating radioToStarRating : set any radio list to star rating system]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/moveSomeAnswers moveSomeAnswers] : If using random_order attribute : allow to always move some answers at end.&lt;br /&gt;
&lt;br /&gt;
== Data editing plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/create-limesurvey-surveys-from-csv/ Copy Survey from CSV plugin]: Enables automated survey duplication based on CSV input – perfect for mass-creating standardized evaluations.&lt;br /&gt;
* [https://manual.limesurvey.org/MassAction_Plugin MassAction] : A plugin for faster survey editing by loading questions details into editable cells. Includes a search and replace feature.&lt;br /&gt;
&lt;br /&gt;
== Email plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/automatically-send-email-invitations/ Automatically send email invitations]: &lt;br /&gt;
* [https://survey-consulting.com/product/automatically-send-email-reminders/ Automatically send email reminders]: Script for automatically sending LimeSurvey email reminders using a cronjob. Helps you [https://survey-consulting.com/how-to-prevent-limesurvey-email-invitations-or-reminders-being-treated-as-spam/ solving spam issues] and working around email sending limits.&lt;br /&gt;
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample]&lt;br /&gt;
* [https://github.com/LimeSurvey/LimeSurvey/blob/develop/plugins/mailSenderToFrom/mailSenderToFrom.php mailSenderToFrom]&lt;br /&gt;
* [https://github.com/Xites/LS_mailDKIM mailDKIM]&lt;br /&gt;
* [https://github.com/Xites/LS_mailEmbedImages mailEmbedImages]&lt;br /&gt;
* [https://github.com/RegioneER/LsRerAntiphishing Anti Phishing Templates] this free software plugin, mandatory alters mail notifications templates, by displaying urls inside email messages.&lt;br /&gt;
&lt;br /&gt;
== Other plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/recomputeexpression-for-limesurvey Recompute Expressions:] A Plugin for LimeSurvey to recompute expression in survey with already submitted survey. Allow to update some relevance too.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/showAdvancedSettings showAdvancedSettings:] Show advanced settings in question edit by default.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/replaceRegister  replaceRegisterː] Extra option for Register, starting point for other plugin. &lt;br /&gt;
* [http://extensions.sondages.pro/fixmaxstep-for-question-index/ fixMaxStep : Fix question index for token answer persistence survey:] Example of usage : get the complete index when user come back to the survey.&lt;br /&gt;
* [http://extensions.sondages.pro/sendmailajax-all-email-in-one/ sendMailAjax : Send token email one by one with ajaxː] Allow to send all email in one click without restriction.&lt;br /&gt;
* [http://extensions.sondages.pro/mailing-management/sendmailcron sendMailCron: Automatically send invitations and reminders using cronjobsː] Automatically sends invitations and reminders in custom intervals. Extensive configuration and debugging options&lt;br /&gt;
* [https://github.com/SteveCohen/Piwik-for-Limesurvey Piwik-for-Limesurvey Piwik for LimeSurvey]: Plugs Piwik into LimeSurvey, so you can track your survey admin users and respondents.&lt;br /&gt;
* [https://github.com/SondagesPro/surveysModel Mark surveys as &amp;quot;Survey Model/Template&amp;quot;ː] Allow admins to mark a survey as &amp;quot;Survey Model&amp;quot;, a kind of &amp;quot;master survey&amp;quot; or &amp;quot;survey template&amp;quot; which only users with appropriate rights are allowed to edit. The common user is only allowed to create copies based on such a survey template.&lt;br /&gt;
* [https://github.com/SondagesPro/LS-toolsDomDocument toolsDomDocumentː] a tools for anothers plugin&lt;br /&gt;
* [https://github.com/TonisOrmisson/limesurvey-url-templates UrlTemplateChangerː] Set respondent&#039;s interview template over an URL parameter.&lt;br /&gt;
* [https://github.com/evently-nl/zesthook  ZestHookː] Makes it possible to send a Post request on every response submission. You can set the URL to post to, as well as several other options.&lt;br /&gt;
* [https://github.com/CEric-fr/limesurvey-rgpd Extension RGPD pour LimeSurvey] Each questionnaire owner is able to interact with these conditions of use via a new submenu added in the &amp;quot;questionnaire parameters&amp;quot; entitled: GDPR configuration.&lt;br /&gt;
* [https://github.com/projeto-cade-unb/Lime2Camunda Lime2Camunda] Plugin for integration with LimeSurvey with Camunda, which at the end of completing the survey it starts a process instance in Camunda submitting all questions and answers as process variables.&lt;br /&gt;
* [https://github.com/librecodecoop/lsTelegramNotify lsTelegramNotify]: Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud]: Save all survey responses and their attachments automatically to a folder in your Nextcloud.&lt;br /&gt;
&lt;br /&gt;
== Example and demo plugins ==&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendRemoteControl extendRemoteControl] : Show how to add function to [[RemoteControl_2_API]], show how to create a new admin page too (usage of public function actionIndex() )&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381344</id>
		<title>Available third party plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381344"/>
		<updated>2026-05-19T11:24:28Z</updated>

		<summary type="html">&lt;p&gt;Mazi: /* Public survey plugins */ Added link to free RDS plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some plugins are listed in the [https://account.limesurvey.org/limestore Limestore]. If you have a plugin you would like to share with the world, feel free to add it to this page.&lt;br /&gt;
&lt;br /&gt;
== Authentication plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/extended-auth-ldap-limesurvey-plugin Free Auth LDAP Plugin]&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-saml-plugin/ SAML SSO Plugin]&lt;br /&gt;
* [https://github.com/technowhizz/LimeSurvey-RegDomainRestricter Registration Email Domain Restrictor] &lt;br /&gt;
* [http://extensions.sondages.pro/authentification-by-wordpress/ Authentification by WordPress user]&lt;br /&gt;
* [https://github.com/univlorraine/limesurvey-cas CAS Authentication plugin for LimeSurvey]&lt;br /&gt;
* [https://github.com/atlet/LimeSurvey-ShibbolethAuth LimeSurvey Shibboleth auth plugin]&lt;br /&gt;
* [https://framagit.org/Animafac/limesurvey/limesurvey-rememberme LimeSurvey RememberMe plugin]&lt;br /&gt;
* [https://github.com/SondagesPro/limesurvey-oauth2 OAuth2 authentication]&lt;br /&gt;
&lt;br /&gt;
== Export and statistics plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/free-limesurvey-reporting-plugin/ Free LimeSurvey Reporting Plugin]: Create live reports for your LimeSurvey data with custom charts and admin notifications. Ideal for automated evaluations and printable summaries.&lt;br /&gt;
* [http://extensions.sondages.pro/exportcompleteanswers/ exportCompleteAnswers : Complete New export system allowing export Answer code and answer text in CSV. Options is manageable by super admin.]&lt;br /&gt;
* [http://extensions.sondages.pro/triple-s-export/ exportTripleS : export in Triple-S XML2 or XML1.3 format survey structure and data.]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics extendAdminStatitistics : rewriting of core statistics, actually put sub question in same table and graph]&lt;br /&gt;
* [https://github.com/reportico-web/limesurvey-reportico Reportico Reporting module for LimeSurvey]: generate charts,tables and statistics from survey data&lt;br /&gt;
* [https://www.robotspaceship.ai/loesungen/limesurvey-ppt-exporter PowerPoint Export] Export answers to PowerPoint (.pptx) as bar, pie, grouping, matrix, or dual-array charts, including ranking questions and text word clouds.&lt;br /&gt;
&lt;br /&gt;
== Public survey plugins ==&lt;br /&gt;
~ [https://survey-consulting.com/product/respondent-driven-sampling-rds-limesurvey-plugin/ Respondent Driven Sampling (RDS) Plugin]: Add respondent driven sampling (RDS) to your LimeSurvey setup. Tokens are generated on submit and stored for controlled participant invitations.&lt;br /&gt;
* [http://extensions.sondages.pro/hideemptycolumn-for-limesurvey/ hideEmptyColumn : A plugin to add a solution to hide column of array question type with ExpressionScript of LimeSurvey ]&lt;br /&gt;
* [http://extensions.sondages.pro/moreaccessibility/ moreAccessibility : some option to add accessibility to public survey] 2.6lts compatible onlmy, deprecated in 3.0&lt;br /&gt;
* [https://git.framasoft.org/Shnoulle/addQuestionCodeClass addQuestionCodeClass : add the question code at the question wrapper class]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/radioToStarRating radioToStarRating : set any radio list to star rating system]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/moveSomeAnswers moveSomeAnswers] : If using random_order attribute : allow to always move some answers at end.&lt;br /&gt;
&lt;br /&gt;
== Data editing plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/create-limesurvey-surveys-from-csv/ Copy Survey from CSV plugin]: Enables automated survey duplication based on CSV input – perfect for mass-creating standardized evaluations.&lt;br /&gt;
* [https://manual.limesurvey.org/MassAction_Plugin MassAction] : A plugin for faster survey editing by loading questions details into editable cells. Includes a search and replace feature.&lt;br /&gt;
&lt;br /&gt;
== Email plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample]&lt;br /&gt;
* [https://github.com/LimeSurvey/LimeSurvey/blob/develop/plugins/mailSenderToFrom/mailSenderToFrom.php mailSenderToFrom]&lt;br /&gt;
* [https://github.com/Xites/LS_mailDKIM mailDKIM]&lt;br /&gt;
* [https://github.com/Xites/LS_mailEmbedImages mailEmbedImages]&lt;br /&gt;
* [https://github.com/RegioneER/LsRerAntiphishing Anti Phishing Templates] this free software plugin, mandatory alters mail notifications templates, by displaying urls inside email messages.&lt;br /&gt;
&lt;br /&gt;
== Other plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/recomputeexpression-for-limesurvey Recompute Expressions:] A Plugin for LimeSurvey to recompute expression in survey with already submitted survey. Allow to update some relevance too.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/showAdvancedSettings showAdvancedSettings:] Show advanced settings in question edit by default.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/replaceRegister  replaceRegisterː] Extra option for Register, starting point for other plugin. &lt;br /&gt;
* [http://extensions.sondages.pro/fixmaxstep-for-question-index/ fixMaxStep : Fix question index for token answer persistence survey:] Example of usage : get the complete index when user come back to the survey.&lt;br /&gt;
* [http://extensions.sondages.pro/sendmailajax-all-email-in-one/ sendMailAjax : Send token email one by one with ajaxː] Allow to send all email in one click without restriction.&lt;br /&gt;
* [http://extensions.sondages.pro/mailing-management/sendmailcron sendMailCron: Automatically send invitations and reminders using cronjobsː] Automatically sends invitations and reminders in custom intervals. Extensive configuration and debugging options&lt;br /&gt;
* [https://github.com/SteveCohen/Piwik-for-Limesurvey Piwik-for-Limesurvey Piwik for LimeSurvey]: Plugs Piwik into LimeSurvey, so you can track your survey admin users and respondents.&lt;br /&gt;
* [https://github.com/SondagesPro/surveysModel Mark surveys as &amp;quot;Survey Model/Template&amp;quot;ː] Allow admins to mark a survey as &amp;quot;Survey Model&amp;quot;, a kind of &amp;quot;master survey&amp;quot; or &amp;quot;survey template&amp;quot; which only users with appropriate rights are allowed to edit. The common user is only allowed to create copies based on such a survey template.&lt;br /&gt;
* [https://github.com/SondagesPro/LS-toolsDomDocument toolsDomDocumentː] a tools for anothers plugin&lt;br /&gt;
* [https://github.com/TonisOrmisson/limesurvey-url-templates UrlTemplateChangerː] Set respondent&#039;s interview template over an URL parameter.&lt;br /&gt;
* [https://github.com/evently-nl/zesthook  ZestHookː] Makes it possible to send a Post request on every response submission. You can set the URL to post to, as well as several other options.&lt;br /&gt;
* [https://github.com/CEric-fr/limesurvey-rgpd Extension RGPD pour LimeSurvey] Each questionnaire owner is able to interact with these conditions of use via a new submenu added in the &amp;quot;questionnaire parameters&amp;quot; entitled: GDPR configuration.&lt;br /&gt;
* [https://github.com/projeto-cade-unb/Lime2Camunda Lime2Camunda] Plugin for integration with LimeSurvey with Camunda, which at the end of completing the survey it starts a process instance in Camunda submitting all questions and answers as process variables.&lt;br /&gt;
* [https://github.com/librecodecoop/lsTelegramNotify lsTelegramNotify]: Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud]: Save all survey responses and their attachments automatically to a folder in your Nextcloud.&lt;br /&gt;
&lt;br /&gt;
== Example and demo plugins ==&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendRemoteControl extendRemoteControl] : Show how to add function to [[RemoteControl_2_API]], show how to create a new admin page too (usage of public function actionIndex() )&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381343</id>
		<title>Available third party plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381343"/>
		<updated>2026-05-19T11:23:23Z</updated>

		<summary type="html">&lt;p&gt;Mazi: /* Data editing plugins */ Added link to free CSV copy plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some plugins are listed in the [https://account.limesurvey.org/limestore Limestore]. If you have a plugin you would like to share with the world, feel free to add it to this page.&lt;br /&gt;
&lt;br /&gt;
== Authentication plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/extended-auth-ldap-limesurvey-plugin Free Auth LDAP Plugin]&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-saml-plugin/ SAML SSO Plugin]&lt;br /&gt;
* [https://github.com/technowhizz/LimeSurvey-RegDomainRestricter Registration Email Domain Restrictor] &lt;br /&gt;
* [http://extensions.sondages.pro/authentification-by-wordpress/ Authentification by WordPress user]&lt;br /&gt;
* [https://github.com/univlorraine/limesurvey-cas CAS Authentication plugin for LimeSurvey]&lt;br /&gt;
* [https://github.com/atlet/LimeSurvey-ShibbolethAuth LimeSurvey Shibboleth auth plugin]&lt;br /&gt;
* [https://framagit.org/Animafac/limesurvey/limesurvey-rememberme LimeSurvey RememberMe plugin]&lt;br /&gt;
* [https://github.com/SondagesPro/limesurvey-oauth2 OAuth2 authentication]&lt;br /&gt;
&lt;br /&gt;
== Export and statistics plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/free-limesurvey-reporting-plugin/ Free LimeSurvey Reporting Plugin]: Create live reports for your LimeSurvey data with custom charts and admin notifications. Ideal for automated evaluations and printable summaries.&lt;br /&gt;
* [http://extensions.sondages.pro/exportcompleteanswers/ exportCompleteAnswers : Complete New export system allowing export Answer code and answer text in CSV. Options is manageable by super admin.]&lt;br /&gt;
* [http://extensions.sondages.pro/triple-s-export/ exportTripleS : export in Triple-S XML2 or XML1.3 format survey structure and data.]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics extendAdminStatitistics : rewriting of core statistics, actually put sub question in same table and graph]&lt;br /&gt;
* [https://github.com/reportico-web/limesurvey-reportico Reportico Reporting module for LimeSurvey]: generate charts,tables and statistics from survey data&lt;br /&gt;
* [https://www.robotspaceship.ai/loesungen/limesurvey-ppt-exporter PowerPoint Export] Export answers to PowerPoint (.pptx) as bar, pie, grouping, matrix, or dual-array charts, including ranking questions and text word clouds.&lt;br /&gt;
&lt;br /&gt;
== Public survey plugins ==&lt;br /&gt;
* [http://extensions.sondages.pro/hideemptycolumn-for-limesurvey/ hideEmptyColumn : A plugin to add a solution to hide column of array question type with ExpressionScript of LimeSurvey ]&lt;br /&gt;
* [http://extensions.sondages.pro/moreaccessibility/ moreAccessibility : some option to add accessibility to public survey] 2.6lts compatible onlmy, deprecated in 3.0&lt;br /&gt;
* [https://git.framasoft.org/Shnoulle/addQuestionCodeClass addQuestionCodeClass : add the question code at the question wrapper class]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/radioToStarRating radioToStarRating : set any radio list to star rating system]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/moveSomeAnswers moveSomeAnswers] : If using random_order attribute : allow to always move some answers at end.&lt;br /&gt;
&lt;br /&gt;
== Data editing plugins ==&lt;br /&gt;
* [https://survey-consulting.com/product/create-limesurvey-surveys-from-csv/ Copy Survey from CSV plugin]: Enables automated survey duplication based on CSV input – perfect for mass-creating standardized evaluations.&lt;br /&gt;
* [https://manual.limesurvey.org/MassAction_Plugin MassAction] : A plugin for faster survey editing by loading questions details into editable cells. Includes a search and replace feature.&lt;br /&gt;
&lt;br /&gt;
== Email plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample]&lt;br /&gt;
* [https://github.com/LimeSurvey/LimeSurvey/blob/develop/plugins/mailSenderToFrom/mailSenderToFrom.php mailSenderToFrom]&lt;br /&gt;
* [https://github.com/Xites/LS_mailDKIM mailDKIM]&lt;br /&gt;
* [https://github.com/Xites/LS_mailEmbedImages mailEmbedImages]&lt;br /&gt;
* [https://github.com/RegioneER/LsRerAntiphishing Anti Phishing Templates] this free software plugin, mandatory alters mail notifications templates, by displaying urls inside email messages.&lt;br /&gt;
&lt;br /&gt;
== Other plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/recomputeexpression-for-limesurvey Recompute Expressions:] A Plugin for LimeSurvey to recompute expression in survey with already submitted survey. Allow to update some relevance too.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/showAdvancedSettings showAdvancedSettings:] Show advanced settings in question edit by default.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/replaceRegister  replaceRegisterː] Extra option for Register, starting point for other plugin. &lt;br /&gt;
* [http://extensions.sondages.pro/fixmaxstep-for-question-index/ fixMaxStep : Fix question index for token answer persistence survey:] Example of usage : get the complete index when user come back to the survey.&lt;br /&gt;
* [http://extensions.sondages.pro/sendmailajax-all-email-in-one/ sendMailAjax : Send token email one by one with ajaxː] Allow to send all email in one click without restriction.&lt;br /&gt;
* [http://extensions.sondages.pro/mailing-management/sendmailcron sendMailCron: Automatically send invitations and reminders using cronjobsː] Automatically sends invitations and reminders in custom intervals. Extensive configuration and debugging options&lt;br /&gt;
* [https://github.com/SteveCohen/Piwik-for-Limesurvey Piwik-for-Limesurvey Piwik for LimeSurvey]: Plugs Piwik into LimeSurvey, so you can track your survey admin users and respondents.&lt;br /&gt;
* [https://github.com/SondagesPro/surveysModel Mark surveys as &amp;quot;Survey Model/Template&amp;quot;ː] Allow admins to mark a survey as &amp;quot;Survey Model&amp;quot;, a kind of &amp;quot;master survey&amp;quot; or &amp;quot;survey template&amp;quot; which only users with appropriate rights are allowed to edit. The common user is only allowed to create copies based on such a survey template.&lt;br /&gt;
* [https://github.com/SondagesPro/LS-toolsDomDocument toolsDomDocumentː] a tools for anothers plugin&lt;br /&gt;
* [https://github.com/TonisOrmisson/limesurvey-url-templates UrlTemplateChangerː] Set respondent&#039;s interview template over an URL parameter.&lt;br /&gt;
* [https://github.com/evently-nl/zesthook  ZestHookː] Makes it possible to send a Post request on every response submission. You can set the URL to post to, as well as several other options.&lt;br /&gt;
* [https://github.com/CEric-fr/limesurvey-rgpd Extension RGPD pour LimeSurvey] Each questionnaire owner is able to interact with these conditions of use via a new submenu added in the &amp;quot;questionnaire parameters&amp;quot; entitled: GDPR configuration.&lt;br /&gt;
* [https://github.com/projeto-cade-unb/Lime2Camunda Lime2Camunda] Plugin for integration with LimeSurvey with Camunda, which at the end of completing the survey it starts a process instance in Camunda submitting all questions and answers as process variables.&lt;br /&gt;
* [https://github.com/librecodecoop/lsTelegramNotify lsTelegramNotify]: Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud]: Save all survey responses and their attachments automatically to a folder in your Nextcloud.&lt;br /&gt;
&lt;br /&gt;
== Example and demo plugins ==&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendRemoteControl extendRemoteControl] : Show how to add function to [[RemoteControl_2_API]], show how to create a new admin page too (usage of public function actionIndex() )&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381342</id>
		<title>Available third party plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=381342"/>
		<updated>2026-05-19T11:21:40Z</updated>

		<summary type="html">&lt;p&gt;Mazi: /* Export and statistics plugins */ Added link to free reporting plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some plugins are listed in the [https://account.limesurvey.org/limestore Limestore]. If you have a plugin you would like to share with the world, feel free to add it to this page.&lt;br /&gt;
&lt;br /&gt;
== Authentication plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/extended-auth-ldap-limesurvey-plugin Free Auth LDAP Plugin]&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-saml-plugin/ SAML SSO Plugin]&lt;br /&gt;
* [https://github.com/technowhizz/LimeSurvey-RegDomainRestricter Registration Email Domain Restrictor] &lt;br /&gt;
* [http://extensions.sondages.pro/authentification-by-wordpress/ Authentification by WordPress user]&lt;br /&gt;
* [https://github.com/univlorraine/limesurvey-cas CAS Authentication plugin for LimeSurvey]&lt;br /&gt;
* [https://github.com/atlet/LimeSurvey-ShibbolethAuth LimeSurvey Shibboleth auth plugin]&lt;br /&gt;
* [https://framagit.org/Animafac/limesurvey/limesurvey-rememberme LimeSurvey RememberMe plugin]&lt;br /&gt;
* [https://github.com/SondagesPro/limesurvey-oauth2 OAuth2 authentication]&lt;br /&gt;
&lt;br /&gt;
== Export and statistics plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/free-limesurvey-reporting-plugin/ Free LimeSurvey Reporting Plugin]: Create live reports for your LimeSurvey data with custom charts and admin notifications. Ideal for automated evaluations and printable summaries.&lt;br /&gt;
* [http://extensions.sondages.pro/exportcompleteanswers/ exportCompleteAnswers : Complete New export system allowing export Answer code and answer text in CSV. Options is manageable by super admin.]&lt;br /&gt;
* [http://extensions.sondages.pro/triple-s-export/ exportTripleS : export in Triple-S XML2 or XML1.3 format survey structure and data.]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics extendAdminStatitistics : rewriting of core statistics, actually put sub question in same table and graph]&lt;br /&gt;
* [https://github.com/reportico-web/limesurvey-reportico Reportico Reporting module for LimeSurvey]: generate charts,tables and statistics from survey data&lt;br /&gt;
* [https://www.robotspaceship.ai/loesungen/limesurvey-ppt-exporter PowerPoint Export] Export answers to PowerPoint (.pptx) as bar, pie, grouping, matrix, or dual-array charts, including ranking questions and text word clouds.&lt;br /&gt;
&lt;br /&gt;
== Public survey plugins ==&lt;br /&gt;
* [http://extensions.sondages.pro/hideemptycolumn-for-limesurvey/ hideEmptyColumn : A plugin to add a solution to hide column of array question type with ExpressionScript of LimeSurvey ]&lt;br /&gt;
* [http://extensions.sondages.pro/moreaccessibility/ moreAccessibility : some option to add accessibility to public survey] 2.6lts compatible onlmy, deprecated in 3.0&lt;br /&gt;
* [https://git.framasoft.org/Shnoulle/addQuestionCodeClass addQuestionCodeClass : add the question code at the question wrapper class]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/radioToStarRating radioToStarRating : set any radio list to star rating system]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/moveSomeAnswers moveSomeAnswers] : If using random_order attribute : allow to always move some answers at end.&lt;br /&gt;
&lt;br /&gt;
== Data editing plugins ==&lt;br /&gt;
* [https://manual.limesurvey.org/MassAction_Plugin MassAction] : A plugin for faster survey editing by loading questions details into editable cells. Includes a search and replace feature.&lt;br /&gt;
&lt;br /&gt;
== Email plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample]&lt;br /&gt;
* [https://github.com/LimeSurvey/LimeSurvey/blob/develop/plugins/mailSenderToFrom/mailSenderToFrom.php mailSenderToFrom]&lt;br /&gt;
* [https://github.com/Xites/LS_mailDKIM mailDKIM]&lt;br /&gt;
* [https://github.com/Xites/LS_mailEmbedImages mailEmbedImages]&lt;br /&gt;
* [https://github.com/RegioneER/LsRerAntiphishing Anti Phishing Templates] this free software plugin, mandatory alters mail notifications templates, by displaying urls inside email messages.&lt;br /&gt;
&lt;br /&gt;
== Other plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/recomputeexpression-for-limesurvey Recompute Expressions:] A Plugin for LimeSurvey to recompute expression in survey with already submitted survey. Allow to update some relevance too.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/showAdvancedSettings showAdvancedSettings:] Show advanced settings in question edit by default.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/replaceRegister  replaceRegisterː] Extra option for Register, starting point for other plugin. &lt;br /&gt;
* [http://extensions.sondages.pro/fixmaxstep-for-question-index/ fixMaxStep : Fix question index for token answer persistence survey:] Example of usage : get the complete index when user come back to the survey.&lt;br /&gt;
* [http://extensions.sondages.pro/sendmailajax-all-email-in-one/ sendMailAjax : Send token email one by one with ajaxː] Allow to send all email in one click without restriction.&lt;br /&gt;
* [http://extensions.sondages.pro/mailing-management/sendmailcron sendMailCron: Automatically send invitations and reminders using cronjobsː] Automatically sends invitations and reminders in custom intervals. Extensive configuration and debugging options&lt;br /&gt;
* [https://github.com/SteveCohen/Piwik-for-Limesurvey Piwik-for-Limesurvey Piwik for LimeSurvey]: Plugs Piwik into LimeSurvey, so you can track your survey admin users and respondents.&lt;br /&gt;
* [https://github.com/SondagesPro/surveysModel Mark surveys as &amp;quot;Survey Model/Template&amp;quot;ː] Allow admins to mark a survey as &amp;quot;Survey Model&amp;quot;, a kind of &amp;quot;master survey&amp;quot; or &amp;quot;survey template&amp;quot; which only users with appropriate rights are allowed to edit. The common user is only allowed to create copies based on such a survey template.&lt;br /&gt;
* [https://github.com/SondagesPro/LS-toolsDomDocument toolsDomDocumentː] a tools for anothers plugin&lt;br /&gt;
* [https://github.com/TonisOrmisson/limesurvey-url-templates UrlTemplateChangerː] Set respondent&#039;s interview template over an URL parameter.&lt;br /&gt;
* [https://github.com/evently-nl/zesthook  ZestHookː] Makes it possible to send a Post request on every response submission. You can set the URL to post to, as well as several other options.&lt;br /&gt;
* [https://github.com/CEric-fr/limesurvey-rgpd Extension RGPD pour LimeSurvey] Each questionnaire owner is able to interact with these conditions of use via a new submenu added in the &amp;quot;questionnaire parameters&amp;quot; entitled: GDPR configuration.&lt;br /&gt;
* [https://github.com/projeto-cade-unb/Lime2Camunda Lime2Camunda] Plugin for integration with LimeSurvey with Camunda, which at the end of completing the survey it starts a process instance in Camunda submitting all questions and answers as process variables.&lt;br /&gt;
* [https://github.com/librecodecoop/lsTelegramNotify lsTelegramNotify]: Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud]: Save all survey responses and their attachments automatically to a folder in your Nextcloud.&lt;br /&gt;
&lt;br /&gt;
== Example and demo plugins ==&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendRemoteControl extendRemoteControl] : Show how to add function to [[RemoteControl_2_API]], show how to create a new admin page too (usage of public function actionIndex() )&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=380572</id>
		<title>Available third party plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Available_third_party_plugins&amp;diff=380572"/>
		<updated>2025-10-10T10:27:50Z</updated>

		<summary type="html">&lt;p&gt;Mazi: /* Authentication plugins */ Added new &amp;quot;Free Auth LDAP Plugin&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some plugin are listed in the [https://account.limesurvey.org/limestore Limestore]. If you have a plugin you would like to share with the world, feel free to add it to this page.&lt;br /&gt;
&lt;br /&gt;
== Authentication plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://survey-consulting.com/product/extended-auth-ldap-limesurvey-plugin Free Auth LDAP Plugin]&lt;br /&gt;
* [https://survey-consulting.com/product/limesurvey-saml-plugin/ SAML SSO Plugin]&lt;br /&gt;
* [https://github.com/technowhizz/LimeSurvey-RegDomainRestricter Registration Email Domain Restrictor] &lt;br /&gt;
* [http://extensions.sondages.pro/authentification-by-wordpress/ Authentification by WordPress user]&lt;br /&gt;
* [https://github.com/univlorraine/limesurvey-cas CAS Authentication plugin for LimeSurvey]&lt;br /&gt;
* [https://github.com/atlet/LimeSurvey-ShibbolethAuth LimeSurvey Shibboleth auth plugin]&lt;br /&gt;
* [https://framagit.org/Animafac/limesurvey/limesurvey-rememberme LimeSurvey RememberMe plugin]&lt;br /&gt;
&lt;br /&gt;
== Export and statistics plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/exportcompleteanswers/ exportCompleteAnswers : Complete New export system allowing export Answer code and answer text in CSV. Options is manageable by super admin.]&lt;br /&gt;
* [http://extensions.sondages.pro/triple-s-export/ exportTripleS : export in Triple-S XML2 or XML1.3 format survey structure and data.]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendAdminStatitistics extendAdminStatitistics : rewriting of core statistics, actually put sub question in same table and graph]&lt;br /&gt;
* [https://github.com/reportico-web/limesurvey-reportico Reportico Reporting module for LimeSurvey]: generate charts,tables and statistics from survey data&lt;br /&gt;
&lt;br /&gt;
== Public survey plugins ==&lt;br /&gt;
* [http://extensions.sondages.pro/hideemptycolumn-for-limesurvey/ hideEmptyColumn : A plugin to add a solution to hide column of array question type with ExpressionScript of LimeSurvey ]&lt;br /&gt;
* [http://extensions.sondages.pro/moreaccessibility/ moreAccessibility : some option to add accessibility to public survey] 2.6lts compatible onlmy, deprecated in 3.0&lt;br /&gt;
* [https://git.framasoft.org/Shnoulle/addQuestionCodeClass addQuestionCodeClass : add the question code at the question wrapper class]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/radioToStarRating radioToStarRating : set any radio list to star rating system]&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/moveSomeAnswers moveSomeAnswers] : If using random_order attribute : allow to always move some answers at end.&lt;br /&gt;
&lt;br /&gt;
== Data editing plugins ==&lt;br /&gt;
* [https://manual.limesurvey.org/MassAction_Plugin MassAction] : A plugin for faster survey editing by loading questions details into editable cells. Includes a search and replace feature.&lt;br /&gt;
&lt;br /&gt;
== Email plugins ==&lt;br /&gt;
&lt;br /&gt;
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample]&lt;br /&gt;
* [https://github.com/LimeSurvey/LimeSurvey/blob/develop/plugins/mailSenderToFrom/mailSenderToFrom.php mailSenderToFrom]&lt;br /&gt;
* [https://github.com/Xites/LS_mailDKIM mailDKIM]&lt;br /&gt;
* [https://github.com/Xites/LS_mailEmbedImages mailEmbedImages]&lt;br /&gt;
&lt;br /&gt;
== Other plugins ==&lt;br /&gt;
&lt;br /&gt;
* [http://extensions.sondages.pro/recomputeexpression-for-limesurvey Recompute Expressions:] A Plugin for LimeSurvey to recompute expression in survey with already submitted survey. Allow to update some relevance too.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/showAdvancedSettings showAdvancedSettings:] Show advanced settings in question edit by default.&lt;br /&gt;
* [https://git.framasoft.org/SondagePro-LimeSurvey-plugin/replaceRegister  replaceRegisterː] Extra option for Register, starting point for other plugin. &lt;br /&gt;
* [http://extensions.sondages.pro/fixmaxstep-for-question-index/ fixMaxStep : Fix question index for token answer persistence survey:] Example of usage : get the complete index when user come back to the survey.&lt;br /&gt;
* [http://extensions.sondages.pro/sendmailajax-all-email-in-one/ sendMailAjax : Send token email one by one with ajaxː] Allow to send all email in one click without restriction.&lt;br /&gt;
* [http://extensions.sondages.pro/mailing-management/sendmailcron sendMailCron: Automatically send invitations and reminders using cronjobsː] Automatically sends invitations and reminders in custom intervals. Extensive configuration and debugging options&lt;br /&gt;
* [https://github.com/SteveCohen/Piwik-for-Limesurvey Piwik-for-Limesurvey Piwik for LimeSurvey]: Plugs Piwik into LimeSurvey, so you can track your survey admin users and respondents.&lt;br /&gt;
* [https://github.com/SondagesPro/surveysModel Mark surveys as &amp;quot;Survey Model/Template&amp;quot;ː] Allow admins to mark a survey as &amp;quot;Survey Model&amp;quot;, a kind of &amp;quot;master survey&amp;quot; or &amp;quot;survey template&amp;quot; which only users with appropriate rights are allowed to edit. The common user is only allowed to create copies based on such a survey template.&lt;br /&gt;
* [https://github.com/SondagesPro/LS-toolsDomDocument toolsDomDocumentː] a tools for anothers plugin&lt;br /&gt;
* [https://github.com/TonisOrmisson/limesurvey-url-templates UrlTemplateChangerː] Set respondent&#039;s interview template over an URL parameter.&lt;br /&gt;
* [https://github.com/evently-nl/zesthook  ZestHookː] Makes it possible to send a Post request on every response submission. You can set the URL to post to, as well as several other options.&lt;br /&gt;
* [https://github.com/CEric-fr/limesurvey-rgpd Extension RGPD pour LimeSurvey] Each questionnaire owner is able to interact with these conditions of use via a new submenu added in the &amp;quot;questionnaire parameters&amp;quot; entitled: GDPR configuration.&lt;br /&gt;
* [https://github.com/projeto-cade-unb/Lime2Camunda Lime2Camunda] Plugin for integration with LimeSurvey with Camunda, which at the end of completing the survey it starts a process instance in Camunda submitting all questions and answers as process variables.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud] Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/librecodecoop/lsTelegramNotify lsTelegramNotify]: Allows you to send after survey completed event to Telegram as text, PDF or CSV.&lt;br /&gt;
* [https://github.com/LibreCodeCoop/LSNextcloud LSNextcloud]: Save all survey responses and their attachments automatically to a folder in your Nextcloud.&lt;br /&gt;
&lt;br /&gt;
== Example and demo plugins ==&lt;br /&gt;
* [https://framagit.org/SondagePro-LimeSurvey-plugin/extendRemoteControl extendRemoteControl] : Show how to add function to [[RemoteControl_2_API]], show how to create a new admin page too (usage of public function actionIndex() )&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Question_type_-_Array&amp;diff=380514</id>
		<title>Question type - Array</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Question_type_-_Array&amp;diff=380514"/>
		<updated>2025-10-04T07:50:09Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Added more details to basic information section&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;
=Short description= &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;{{#ifeq:{{{transcludesection|short_description}}}|short_description|&amp;lt;div style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;translate&amp;gt;&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
An array allows you to create a set of [[Question_types#Subquestions|subquestions]]. Each of them uses the same set of answer options. For example, you can use this question type when you need feedback on several aspects of a particular product.&lt;br /&gt;
&lt;br /&gt;
For adding an &amp;quot;other&amp;quot; free text option an [https://survey-consulting.com/product/array-with-other-free-text-limesurvey-plugin/ additional plugin] can be used.&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;/translate&amp;gt;&amp;lt;/div&amp;gt;}}&amp;lt;/onlyinclude&amp;gt;&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Video tutorial= &amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
To understand how the array-type questions work, check the following [https://www.youtube.com/watch?v=7134QebOQzY video tutorial].&lt;br /&gt;
&lt;br /&gt;
=General description= &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
In the below example, the &#039;&#039;array question type&#039;&#039; is used in order to rate four sci-fi movies:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:F_AFL.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; [[Media:Question tpye - Array using flexible labels.zip|Question type - Array using flexible labels.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
&amp;lt;hr width=&amp;quot;50%&amp;quot; style=&amp;quot;margin:auto&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
A further option available is the &#039;&#039;&#039;Semantic Differential&#039;&#039;&#039;. You have to choose either &#039;&#039;Array&#039;&#039; or &#039;&#039;Array (5 point choice)&#039;&#039; as question type to part the answer by using a pipe char &amp;quot;|&amp;quot; - which answer should be on the left side and which one on the right side of the array. For example, If you want to have &#039;Good&#039; on the left side of the row and &#039;Evil&#039; on the right side of the row, just write &#039;Good|Evil&#039; into the answer field: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:H_SD.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; [[Media:Question type - Array - Semantic Differential Question Type.zip|Question type - Array - Semantic Differential Question Type.zip]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hint:&#039;&#039;&#039; If you use Windows and you do not know where the Pipe Char is on your keyboard, you can enter it by pressing and holding Alt key, entering 124, and releasing the Alt key.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=General options= &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
{{QS:mandatory}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
{{QS:relevance}}&lt;br /&gt;
&lt;br /&gt;
=Display= &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
{{QS:subquestion_width}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
{{QS:Random_order}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
{{QS:Repeat_headers}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
{{QS:Question_theme}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
{{QS:Hide_tip}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
{{QS:Hidden}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
{{QS:CSS_Class}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
{{QS:use_dropdown}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
{{QS:Printable_survey_relevance_help}}&lt;br /&gt;
&lt;br /&gt;
=Logic= &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
{{QS:min_answers}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
{{QS:max_answers}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
{{QS:array_filter}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
{{QS:array_filter_style}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
{{QS:array_filter_exclude}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
{{QS:Exclusive_option}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
{{QS:Random_group}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
{{QS:em_validation_q}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
{{QS:em_validation_q_tip}}&lt;br /&gt;
&lt;br /&gt;
=Other= &amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
{{QS:Page_break}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
{{QS:scale_export}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Statistics= &amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
{{QS:Public_statistics}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
{{QS:Display_chart}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
{{QS:Chart_type}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
[[Category:Question types]][[Category:Arrays]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=LimeSurvey-kompatible_Internet-Provider&amp;diff=379763</id>
		<title>LimeSurvey-kompatible Internet-Provider</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=LimeSurvey-kompatible_Internet-Provider&amp;diff=379763"/>
		<updated>2025-02-25T10:21:26Z</updated>

		<summary type="html">&lt;p&gt;Mazi: /* Deutschland */ Added entry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;Translation in progress.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These providers have been tested successfully with LimeSurvey. Please add your provider if everything works fine - just don&#039;t add a link.&lt;br /&gt;
&lt;br /&gt;
==Österreich==&lt;br /&gt;
* CISC, LLC.&lt;br /&gt;
* kapper.net&lt;br /&gt;
* World4you&lt;br /&gt;
&lt;br /&gt;
==Deutschland==&lt;br /&gt;
* 1&amp;amp;1&lt;br /&gt;
* 1blue&lt;br /&gt;
* All-incl.com&lt;br /&gt;
* alphahosting&lt;br /&gt;
* Domainfactory&lt;br /&gt;
* EUserv Internet&lt;br /&gt;
* gn2-netwerk&lt;br /&gt;
* HostEurope&lt;br /&gt;
* Hostsharing eG&lt;br /&gt;
* ICDSoft&lt;br /&gt;
* kesslernet&lt;br /&gt;
* NX24 GmbH&lt;br /&gt;
* PCB - Tobias Berndt Hosting&lt;br /&gt;
* [https://survey-consulting.com/hosting Survey Consulting]&lt;br /&gt;
* Sysprovide&lt;br /&gt;
* Webhostone&lt;br /&gt;
* zedat FU Berlin&lt;br /&gt;
&lt;br /&gt;
==Schweiz==&lt;br /&gt;
* Metanet&lt;br /&gt;
&lt;br /&gt;
==Vereinigtes Königreich/England==&lt;br /&gt;
* 1&amp;amp;1&lt;br /&gt;
* 2020Media.com&lt;br /&gt;
* Centicero (using package Website)&lt;br /&gt;
&lt;br /&gt;
==USA==&lt;br /&gt;
* 1&amp;amp;1&lt;br /&gt;
* Dreamhost&lt;br /&gt;
* GoDaddy (Using PHP 5.x and MySQL 5.x)&lt;br /&gt;
* Host Color&lt;br /&gt;
* ICDSoft&lt;br /&gt;
* Web Hosting Buzz&lt;br /&gt;
&lt;br /&gt;
==Hongkong==&lt;br /&gt;
* ICDSoft&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Installation_-_LimeSurvey_CE/de&amp;diff=379728</id>
		<title>Installation - LimeSurvey CE/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Installation_-_LimeSurvey_CE/de&amp;diff=379728"/>
		<updated>2025-02-25T10:05:05Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Fixed invalid link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt; Anmerkung: Diese Installationsanleitung ist für Version 2.0 oder höher. Die Installationsanleitung für 1.92 finden Sie [[Installation Version 1.92 or older/de|hier]]; eine Anleitung zum Update [[Upgrading from a previous version/de|hier]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;General&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Allgemein==&lt;br /&gt;
&lt;br /&gt;
Das LimeSurvey-Projekt bietet zwei Installationsarten an:&lt;br /&gt;
*Auf Ihrem Webserver:&amp;lt;br /&amp;gt;In diesem Fall folgen Sie einfach den Anweisungen hier auf dieser Seite.&lt;br /&gt;
&lt;br /&gt;
*Auf Ihrem lokalen Windows-PC:&amp;lt;br /&amp;gt;In der Regel möchten Sie LimeSurvey nur auf Ihrem lokalen PC installieren, wenn Sie Umfragen lokal erstellen (vor allem aus Geschwindigkeit- oder Test-Gründen) und später die Umfrage in Ihre Live-LimeSurvey-Installation auf einem Webserver integrieren wollen. Dafür haben wir ein spezielles Installationspaket vorbereitet, das einen Webserver, eine Datenbank und die LimeSurvey-Anwendung enthält. Siehe [[Installation of the LimeSurvey XAMPP package/de|Installationsanleitung]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Make_sure_you_can_use_LimeSurvey_on_your_website&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
== Stellen Sie sicher, dass Sie LimeSurvey auf Ihrer Website verwenden können ==&lt;br /&gt;
&lt;br /&gt;
Stellen Sie sicher, dass Ihr Server die folgenden Anforderungen erfüllt.&lt;br /&gt;
&lt;br /&gt;
{{Note|Die Mindestanforderungen werden während der Installation überprüft!}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die Mindestanforderungen für &#039;&#039;&#039;LimeSurvey 6.x&#039;&#039;&#039;:&lt;br /&gt;
* Mindestens 250 MB Speicherplatz.&lt;br /&gt;
* MariaDB 10.3.38 oder höher &#039;&#039;&#039;ODER&#039;&#039;&#039; MySQL 8 oder höher &#039;&#039;&#039;ODER&#039;&#039;&#039; Microsoft SQL Server 2008 oder höher &#039;&#039;&#039;ODER&#039;&#039;&#039; Postgres 12 oder höher.&lt;br /&gt;
* PHP-Versionsanforderungen: &lt;br /&gt;
** LS 6.x von PHP 7.4.x bis 8.3.x&lt;br /&gt;
** LS 5.x von PHP 7.2.5 bis 8.0.x &lt;br /&gt;
** LS 3.x von PHP 5.5.9 bis 7.4.x&lt;br /&gt;
* php.ini `short_open_tag`-Einstellung sollte auf gesetzt sein `ON`&lt;br /&gt;
* Die folgenden PHP-Module/Bibliotheken sollten aktiviert sein:&lt;br /&gt;
** [[Installations-FAQ#Anforderungsseite#Was ist die mbstring (Multibyte String Functions)-Bibliothek|mbstring (Multibyte String Functions)]]-Erweiterung Bibliothek.&lt;br /&gt;
** PDO-Datenbanktreiber für MySQL (pdo_mysql oder pdo_mysqli) oder Postgres (pdo_pgsql) oder MSSQL ([https://php.net/manual/en/ref.pdo-sqlsrv.php pdo_sqlsrv] für Windows und [http://www.php.net/manual/en/ref.pdo-dblib.php pdo_dblib] für Linux).&lt;br /&gt;
** Außerdem gehen wir im Allgemeinen davon aus, dass alle PHP-Standardbibliotheken aktiviert sind.&lt;br /&gt;
*** hash&lt;br /&gt;
*** session&lt;br /&gt;
*** openssl oder mcrypt&lt;br /&gt;
*** fileinfo&lt;br /&gt;
*** SimpleXML&lt;br /&gt;
*** etc …&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt; Anmerkung: Wenn Sie eine Verbindung von Linux zu einer MSSQL-Datenbank auf einem Windows Server mit dem dblib PDO-Treiber herstellen, dann muss das zu Grunde liegende FreeTDS korrekt konfiguriert werden. Auf der [[Troubleshooting]]-Seite finden Sie weitere Informationen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionale PHP-Erweiterungen:&lt;br /&gt;
* &#039;&#039;&#039;GD-Library&#039;&#039;&#039; &#039;&#039;&#039;mit installierter FreeType-Unterstützung&#039;&#039;&#039; wird für Captchas, schöne Diagramme in Statistiken oder zum Hochladen von Bildern über den HTML-Editor benötigt - siehe [https://php.net/manual/image.setup.php PHP GD-Library Extension-Dokumentation]&lt;br /&gt;
* &#039;&#039;&#039;IMAP&#039;&#039;&#039; (ziemlich Standard) wird für das [[Email Bounce Tracking System|Email Bounce Tracking System] benötigt. ] – siehe [https://php.net/manual/imap.setup.php Dokumentation zur PHP-IMAP-Erweiterung]&lt;br /&gt;
* &amp;quot;&#039;LDAP&amp;quot;&#039; muss installiert sein, um Umfrageteilnehmer über LDAP zu importieren – siehe [https:/ /php.net/manual/en/book.ldap.php PHP LDAP-Dokumentation]&lt;br /&gt;
* &#039;&#039;&#039;Zip&#039;&#039;&#039; (ziemlich Standard) wird für das Hochladen von Vorlagen, den Import von .zip-archivierten Ressourcen und den Excel-Export benötigt - siehe [https://php.net/manual/zip.setup.php PHP Zip Extension-Dokumentation]&lt;br /&gt;
* &#039;&#039;&#039;Zlib&#039;&#039;&#039; (ziemlich Standard) wird für das [[ComfortUpdate]] benötigt - siehe [https ://php.net/manual/zlib.setup.php PHP Zlib Extension-Dokumentation]&lt;br /&gt;
&lt;br /&gt;
In der Regel wird Ihnen der Provider Ihres Webspace oder der Administrator bei diesen optionalen Komponenten weiterhelfen können.&lt;br /&gt;
&lt;br /&gt;
Wenn Sie LimeSurvey auf einem Microsoft IIS installieren wollen, könnte der folgende Link hilfreich sein: &amp;quot;[[Installation on XP with IIS]]&amp;quot; (in Englisch).&lt;br /&gt;
&lt;br /&gt;
===Browserkompatibilität===&lt;br /&gt;
&#039;&#039;&#039;Für Umfrageteilnehmer unterstützen wir derzeit Edge und alle neueren vergleichbaren Browser wie Firefox, Chrome, Opera usw. mit aktiviertem JavaScript. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Für den Administrationsteil&#039;&#039;&#039; unterstützen wir derzeit Edge und alle neueren vergleichbaren Browser wie Firefox, Chrome, Opera etc. mit aktiviertem JavaScript.&lt;br /&gt;
&lt;br /&gt;
====Bildschirmgrößen====&lt;br /&gt;
Wir unterstützen jede angemessene Bildschirmgröße für die Teilnahme an Umfragen (360 x 640 Pixel und mehr).&lt;br /&gt;
Die minimal unterstützte Bildschirmauflösung für die Verwaltungsseite von LimeSurvey beträgt 1280 x 1024 Pixel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Hosting_for_LimeSurvey&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
===Hosting für LimeSurvey===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
LimeSurvey sollte mit den meisten Hosting-Unternehmen zusammenarbeiten, die PHP und MySQL anbieten. Wenn Sie eine fertig installierte Version von LimeSurvey wünschen, können Sie [https://www.limesurvey.org/editions-and-prices/limesurvey-pro/editions-and-prices-professional LimeSurvey Cloud] ausprobieren, oder schauen Sie sich unsere [https://www.limesurvey.org/manual/LimeSurvey-compatible_hosting_companies/de Liste der LimeSurvey-kompatiblen Hosting-Unternehmen] an.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Download_the_LimeSurvey_package&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Laden Sie das LimeSurvey-Paket herunter==&lt;br /&gt;
&lt;br /&gt;
[https://community.limesurvey.org/downloads/ Laden Sie] das neueste stabile LimeSurvey-Zip-Paket herunter (es stehen Ihnen auch die Pakete gzip, bz2 und 7zip zur Verfügung) und speichern Sie es auf Ihrer lokalen Festplatte.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Unpack_the_LimeSurvey_package&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Entpacken Sie das LimeSurvey-Paket==&lt;br /&gt;
&lt;br /&gt;
Dekomprimieren Sie die ZIP-Datei mit Ihrer bevorzugten Komprimierungssoftware in ein spezielles Verzeichnis/Ordner. Stellen Sie beim Dekomprimieren der Datei sicher, dass Sie die Verzeichnisstruktur mit den Dateien dekomprimieren (dies ist das Standardverhalten der meisten Komprimierungsprogramme). Der Pfadname für das Installationsverzeichnis sollte keine Sonderzeichen „(“ oder „)“ enthalten, kann aber das Zeichen „Leerzeichen“ enthalten.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Collect_information_about_your_server&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Sammeln Sie Informationen über Ihren Server==&lt;br /&gt;
&lt;br /&gt;
Sie müssen die folgenden Dinge wissen, um LimeSurvey korrekt auf Ihrem Webserver zu installieren:&lt;br /&gt;
*Ihre beabsichtigte Website-URL, auf der sich Ihre Skripte befinden (z. B. „http://my.domain.com/limesurvey“).&lt;br /&gt;
*Der physische Festplattenspeicherort auf Ihrem Server, auf dem sich Ihre Skripte befinden (z. B. „/home/usr/htdocs/limesurvey“).&lt;br /&gt;
*Der IP-/Netzstandort Ihres Datenbankservers (z. B. „localhost“).&lt;br /&gt;
*Wenn Ihr Datenbankserver einen nicht standardmäßigen Port verwendet, finden Sie heraus, um welchen Port es sich handelt.&lt;br /&gt;
*Ihren Benutzernamen und Ihr Passwort für Ihren Datenbankserver.&lt;br /&gt;
*Bei den meisten Anbietern können Sie die Datenbank nicht vom Skript erstellen lassen, sondern müssen dies selbst tun.  Wenn Sie einen solchen Anbieter nutzen, legen Sie bitte selbst eine Datenbank (z.B. &#039;&#039;limesurvey&#039;&#039;) an.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Upload_the_files_to_your_web_server&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Laden Sie die Dateien auf Ihren Webserver hoch==&lt;br /&gt;
&lt;br /&gt;
Stellen Sie mit Ihrem FTP-Programm (z. B. FileZilla) eine Verbindung zu Ihrem Webserver her und erstellen Sie ein Verzeichnis zum Speichern Ihrer Skripte. Laden Sie dann die Dateien unter Verwendung der Verzeichnisstruktur hoch, in der sie sich befinden. Stellen Sie sicher, dass Sie die Dateien „im Binärmodus hochladen“ (überprüfen Sie die Einstellungen Ihres FTP-Programms). Bitte beachten Sie, dass das Hochladen im ASCII-Modus zu ungewöhnlichen Fehlern führen kann (z. B. Fehler „Klasse nicht gefunden“ während der Installation) und Bilder möglicherweise nicht korrekt hochgeladen werden.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Set_directory_permissions&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Verzeichnisberechtigungen festlegen==&lt;br /&gt;
&lt;br /&gt;
Damit das Skript ordnungsgemäß funktioniert, benötigt es bestimmten Zugriff auf einige Verzeichnisse – dies gilt insbesondere für Linux/*nix-Systeme.&lt;br /&gt;
*Das Verzeichnis „/limesurvey/tmp“ (und alle seine Unterverzeichnisse und Dateien) werden für Importe und Uploads verwendet und sollten für Ihren Webserver auf &amp;quot;Lesen &amp;amp; Schreiben“ eingestellt sein.&lt;br /&gt;
*Das &#039;&#039;&#039;&amp;quot;/limesurvey/upload/&amp;quot;&#039;&#039; Verzeichnis (und alle seine Unterverzeichnisse und Dateien) muss auch &#039;&#039;Lesen &amp;amp; Schreiben&#039;&#039; für Ihren Webserver haben, um den Upload von Bildern und Mediendateien zu ermöglichen.&lt;br /&gt;
*Das Verzeichnis „/limesurvey/application/config/“ benötigt außerdem &amp;quot;Lesen und Schreiben&amp;quot;-Berechtigungen für Ihren Webserver.&lt;br /&gt;
*Die anderen Verzeichnisse können auf &#039;&#039;Schreibgeschützt&#039;&#039; gesetzt werden. Möglicherweise möchten Sie unter Linux/Unix die Berechtigungen für jede Datei im Verzeichnis /limesurvey/admin auf „Schreibgeschützt“ setzen.&lt;br /&gt;
&lt;br /&gt;
{{Alert|Wenn Sie Linux verwenden, hängt das Festlegen von Berechtigungen von Ihrer Webserverkonfiguration ab. Wenn Sie beispielsweise Apache HTTPD unter CentOS verwenden, geben Sie &#039;&#039;&#039;chmod -R 755 ein&amp;lt;directory&amp;gt; ; chown -R Apache&amp;lt;directory&amp;gt; &#039;&#039;&#039;. Dadurch erhält jeder Lesezugriff und Ihr Webserver erhält die Berechtigung zum Schreiben. Weitere Informationen zu Linux-Berechtigungen finden Sie unter [https://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions folgendem Link].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Create_a_database_user&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Erstellen Sie einen Datenbankbenutzer==&lt;br /&gt;
&lt;br /&gt;
LimeSurvey erstellt eine Datenbank und die darin enthaltenen Tabellen. Dazu benötigt es den Benutzernamen und das Passwort eines Datenbankbenutzers. Wir empfehlen generell, einen Datenbankbenutzer mit den folgenden Berechtigungen anzulegen:&lt;br /&gt;
&lt;br /&gt;
- MySQL: AUSWÄHLEN, ERSTELLEN, EINFÜGEN, AKTUALISIEREN, LÖSCHEN, ALTER, DROP, INDEX&lt;br /&gt;
&lt;br /&gt;
- PostgreSQL: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, TRIGGER&lt;br /&gt;
&lt;br /&gt;
- Microsoft SQL Server: „Unbekannt – wenn Sie diese Informationen finden können, vervollständigen Sie sie bitte.“&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Run_the_installation_script&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Führen Sie das Installationsskript aus==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gehen Sie zu &amp;quot;example.org/limesurvey/admin&amp;quot;&#039;&#039;&#039;. Wenn Sie alles richtig konfiguriert haben, sollte das LimeSurvey-Installationsprogramm starten – folgen Sie einfach den Anweisungen. Sie werden gefragt, ob Sie die Datenbank und/oder die Tabellen innerhalb der Datenbank erstellen möchten. LimeSurvey erstellt dann die benötigten Tabellen in der Datenbank.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Connect_to_the_administration_script_for_the_first_time&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Zum ersten Mal eine Verbindung zum Administrationsskript herstellen==&lt;br /&gt;
&lt;br /&gt;
Sie sind fertig, wenn die Installation abgeschlossen ist! Öffnen Sie Ihren Browser und geben Sie die URL zur LimeSurvey-Administration ein. Angenommen, Sie haben „limesurvey“ als Verzeichnisnamen zum Speichern der Dateien verwendet, dann lautet das etwa „http://www.example.com/limesurvey/admin“.&lt;br /&gt;
&lt;br /&gt;
Sie sollten einen Anmeldebildschirm erhalten. Die Standard-Anmeldeinformationen (sofern sie während der Installation nicht geändert wurden) sind:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;html&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Benutzer: admin&lt;br /&gt;
Passwort: Passwort&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nach der Anmeldung werden Sie aufgefordert, das Standardpasswort zu ändern. Viel Spaß!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Further_configuration&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Weitere Konfiguration==&lt;br /&gt;
&lt;br /&gt;
===Caching===&lt;br /&gt;
&lt;br /&gt;
LimeSurvey verwendet standardmäßig den Yii-Dateicache, kann jedoch für die Verwendung anderer Cache-Engines konfiguriert werden. Mögliche weitere Caches sind:&lt;br /&gt;
&lt;br /&gt;
* Memcached&lt;br /&gt;
* Redis&lt;br /&gt;
* WinCache&lt;br /&gt;
* XCache&lt;br /&gt;
&lt;br /&gt;
Eine vollständige Beschreibung finden Sie in der [https://www.yiiframework.com/doc/api/1.1/CCache Yii-Dokumentation].&lt;br /&gt;
&lt;br /&gt;
Seit LimeSurvey 4.0.0 haben Sie auch die Möglichkeit, Berechnungen im ExpressionScript zwischenzuspeichern. Dies kann je nach Komplexität der Umfrage zu einer erheblichen Beschleunigung führen. Um den Emcache zu aktivieren, fügen Sie Folgendes in Ihre config.php-Datei (Komponenten-Array) ein:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;emcache&#039; =&amp;gt; array(&#039;class&#039; =&amp;gt; &#039;CFileCache&#039;),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wie beim Haupt-Yii-Cache können auch andere Cache-Systeme verwendet werden.&lt;br /&gt;
&lt;br /&gt;
{{Hinweis| Der Emcache ist nicht mit randomisierten Umfragen kompatibel und wird in solchen Fällen automatisch deaktiviert.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;What_if_I_have_problems...&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==Was ist, wenn ich Probleme habe...==&lt;br /&gt;
&lt;br /&gt;
Wie bei allen Computerprogrammen funktionieren die Dinge meistens genau so, wie es in den Anweisungen steht, aber manchmal funktioniert es einfach nicht. Es gibt zu viele mögliche Gründe dafür, dass die Dinge nicht nach Plan laufen, als dass ich sie hier beschreiben könnte. Wenn Sie Probleme haben, lesen Sie zunächst die [[Installations-FAQ]]. Wenn Sie Ihre Antwort dort nicht finden, posten Sie bitte Ihr Problem und etwaige Fehlermeldungen in den [https://www.limesurvey.org/forum LimeSurvey-Foren] und öffnen Sie ein [https://www.limesurvey.org/contact-us Supportticket] (nur für Kunden, die LimeSurvey Cloud verwenden) oder treten Sie unserem [https://discord.gg/DEjguXn Discord-Kanal] bei.&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Installation_-_LimeSurvey_CE/16/de&amp;diff=379661</id>
		<title>Translations:Installation - LimeSurvey CE/16/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Installation_-_LimeSurvey_CE/16/de&amp;diff=379661"/>
		<updated>2025-01-23T11:50:33Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Fixed invalid link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;LimeSurvey sollte mit den meisten Hosting-Unternehmen zusammenarbeiten, die PHP und MySQL anbieten. Wenn Sie eine fertig installierte Version von LimeSurvey wünschen, können Sie [https://www.limesurvey.org/editions-and-prices/limesurvey-pro/editions-and-prices-professional LimeSurvey Cloud] ausprobieren, oder schauen Sie sich unsere [https://www.limesurvey.org/manual/LimeSurvey-compatible_hosting_companies/de Liste der LimeSurvey-kompatiblen Hosting-Unternehmen] an.&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Installation_-_LimeSurvey_CE&amp;diff=379660</id>
		<title>Installation - LimeSurvey CE</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Installation_-_LimeSurvey_CE&amp;diff=379660"/>
		<updated>2025-01-23T11:48:40Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Fixed typo, added link&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;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt; Note: These installation instructions are for version 2.0 or later. Older instructions for 1.92 can be found [[Installation Version 1.92 or older|here]] and update instructions can be found [[Upgrading from a previous version|here]]. &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==General== &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
The LimeSurvey project provides two ways to install LimeSurvey:&lt;br /&gt;
*On your webserver:&amp;lt;br /&amp;gt;In this case, just follow the instructions on this page starting with step 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
*On your local Windows PC:&amp;lt;br /&amp;gt;You usually only want to install LimeSurvey on your local PC if you want to create surveys locally (mainly for speed or development/test reasons) and upload them later to your live LimeSurvey installation on a web server. For this purpose, we have prepared a special LimeSurvey package which includes the web server, the database, the LimeSurvey application, and [[Installation of the LimeSurvey XAMPP package|instructions how to install it]].&lt;br /&gt;
&lt;br /&gt;
==Make sure you can use LimeSurvey on your website== &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
Make sure your server meets the following additional requirements.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
{{Note|The minimum set of requirements will also be checked during the installation process!}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
The minimum set of requirements for &#039;&#039;&#039;LimeSurvey 6.x&#039;&#039;&#039;:&lt;br /&gt;
* Minimum 250 MB disk space.&lt;br /&gt;
* MariaDB 10.3.38 or later &#039;&#039;&#039;OR&#039;&#039;&#039; MySQL 8 or later &#039;&#039;&#039;OR&#039;&#039;&#039; Microsoft SQL Server 2016 or later &#039;&#039;&#039;OR&#039;&#039;&#039; Postgres 12 or later.&lt;br /&gt;
* PHP version requirements: &lt;br /&gt;
** LS 6.x from PHP 7.4.x to 8.3.x&lt;br /&gt;
** LS 5.x from PHP 7.2.5 to 8.0.x &lt;br /&gt;
** LS 3.x from PHP 5.5.9 to 7.4.x&lt;br /&gt;
* php.ini `short_open_tag` setting should be set to `ON`&lt;br /&gt;
* The following PHP modules/libraries should be enabled:&lt;br /&gt;
** [[Installation FAQ#Requirements page#What is the mbstring (Multibyte String Functions) library|mbstring (Multibyte String Functions)]] extension library.&lt;br /&gt;
** PDO database driver for MySQL (pdo_mysql or pdo_mysqli) or Postgres (pdo_pgsql) or MSSQL ([https://php.net/manual/en/ref.pdo-sqlsrv.php pdo_sqlsrv] for Windows and [http://www.php.net/manual/en/ref.pdo-dblib.php pdo_dblib] for Linux).&lt;br /&gt;
** Also, we assume in general that all PHP default libraries are enabled &lt;br /&gt;
*** hash&lt;br /&gt;
*** session&lt;br /&gt;
*** openssl or mcrypt&lt;br /&gt;
*** fileinfo&lt;br /&gt;
*** SimpleXML&lt;br /&gt;
*** etc …&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; Note: If you are connecting from Linux to a MSSQL database on a Windows server using the dblib PDO driver, then the underlying FreeTDS needs to be set up correctly. Check out the [[Troubleshooting]] page for more information.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
Optional PHP Extensions:&lt;br /&gt;
* &#039;&#039;&#039;GD-Library&#039;&#039;&#039; &#039;&#039;&#039;with FreeType support&#039;&#039;&#039; installed is needed for captchas, nice charts in statistics or to upload images via the HTML editor - see [https://php.net/manual/image.setup.php PHP GD-Library Extension documentation]&lt;br /&gt;
* &#039;&#039;&#039;IMAP&#039;&#039;&#039; (pretty standard) is needed for the [[Email bounce tracking system|email bounce tracking system]] - see [https://php.net/manual/imap.setup.php PHP IMAP Extension documentation]&lt;br /&gt;
* &#039;&#039;&#039;LDAP&#039;&#039;&#039; installed is needed to import survey participants using LDAP - see [https://php.net/manual/en/book.ldap.php PHP LDAP Documentation]&lt;br /&gt;
* &#039;&#039;&#039;Zip&#039;&#039;&#039; (pretty standard) is needed for template upload, import of .zip archived resources, and excel export - see [https://php.net/manual/zip.setup.php PHP Zip Extension documentation]&lt;br /&gt;
* &#039;&#039;&#039;Zlib&#039;&#039;&#039; (pretty standard) is needed for the [[ComfortUpdate]] - see [https://php.net/manual/zlib.setup.php PHP Zlib Extension documentation]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
In most cases, your web server provider or system administrator will be able to help you out with these optional components.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
If you want to run Microsoft&#039;s IIS server, taking a look at [[Installation on XP with IIS]] might also help.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
===Browser compatibility===&lt;br /&gt;
&#039;&#039;&#039;For the survey-taking side&#039;&#039;&#039;, we currently support Edge and all newer comparable browsers like FF, Chrome, Opera etc. with activated JavaScript. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For the administration part&#039;&#039;&#039;, we currently support Edge and all newer comparable browsers like FF, Chrome, Opera etc. with activated JavaScript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
====Screen sizes====&lt;br /&gt;
We support any reasonable screen size for survey taking (360px x 640px and up).&lt;br /&gt;
The minimum supported screen resolution for the LimeSurvey administration page is 1280px x 1024px.&lt;br /&gt;
&lt;br /&gt;
===Hosting for LimeSurvey=== &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
LimeSurvey should work with most hosting companies that provide PHP and MySQL. If you want a ready-installed version of LimeSurvey, you could try [https://www.limesurvey.org/editions-and-prices/limesurvey-pro/editions-and-prices-professional LimeSurvey Cloud] or check [https://www.limesurvey.org/manual/LimeSurvey-compatible_hosting_companies/en other hosting providers].&lt;br /&gt;
&lt;br /&gt;
==Download the LimeSurvey package== &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
[https://community.limesurvey.org/downloads/ Download] the latest stable LimeSurvey zip package (there are also gzip, bz2 and 7zip packages available for your convenience) and save it to your local disk.&lt;br /&gt;
&lt;br /&gt;
==Unpack the LimeSurvey package== &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
Uncompress the zip file into a dedicated directory/folder using your preferred compression software. When you uncompress the file make sure that you uncompress the directory structure with the files (this is default behavior for most compression programs). The path name for the installation directory should not include &#039;(&#039; or &#039;)&#039; special characters, but it may include the &#039;&#039;&#039;space&#039;&#039;&#039; character.&lt;br /&gt;
&lt;br /&gt;
==Collect information about your server== &amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
You will need to know the following things to install LimeSurvey on your web server correctly:&lt;br /&gt;
*Your intended website URL where your scripts will reside (e.g. &#039;&#039;http://my.domain.com/limesurvey&#039;&#039;).&lt;br /&gt;
*The physical disk location on your server where your scripts will reside (e.g. &#039;&#039;/home/usr/htdocs/limesurvey&#039;&#039;).&lt;br /&gt;
*The IP/net location of your database server (i.e. &#039;&#039;localhost&#039;&#039;).&lt;br /&gt;
*If your database server uses a non-standard port, find out which port it is.&lt;br /&gt;
*Your user name and password for your database server.&lt;br /&gt;
*With most providers you can&#039;t let the script create the database, but have to do it yourself.  If you are using such a provider, please create a database (for example &#039;&#039;limesurvey&#039;&#039;) yourself.&lt;br /&gt;
&lt;br /&gt;
==Upload the files to your web server== &amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Using your FTP program (e.g. FileZilla), connect to your web server and create a directory to store your scripts. Then upload the files using the directory structure they are in. Make sure you &#039;&#039;&#039;upload the files in binary mode&#039;&#039;&#039; (check the settings of your FTP program). Please note that uploading in ASCII mode can lead to uncommon errors (e.g. &#039;class not found&#039; error during installation), also images may not be uploaded correctly.&lt;br /&gt;
&lt;br /&gt;
==Set directory permissions== &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
For the script to work properly it needs certain access to some directories - this applies especially to Linux/*nix systems.&lt;br /&gt;
*The &#039;&#039;&#039;&amp;quot;/limesurvey/tmp&amp;quot;&#039;&#039;&#039; directory (and all its subdirectories and files) are used for imports &amp;amp; uploads and should be set to &#039;&#039;Read &amp;amp; Write&#039;&#039; for your webserver.&lt;br /&gt;
*The &#039;&#039;&#039;&amp;quot;/limesurvey/upload/&amp;quot;&#039;&#039;&#039; directory (and all its subdirectories and files) must also have &#039;&#039;Read &amp;amp; Write&#039;&#039; for your webserver in order to enable picture and media files upload.&lt;br /&gt;
*The &#039;&#039;&#039;&amp;quot;/limesurvey/application/config/&amp;quot;&#039;&#039;&#039; directory also needs &#039;&#039;Read &amp;amp; Write&#039;&#039; permissions for your webserver.&lt;br /&gt;
*The other directories can be set to &#039;&#039;Read Only&#039;&#039;. You may wish in Linux/Unix to set the permissions on each file within the /limesurvey/admin directory to &#039;&#039;Read Only&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
{{Alert|If you are using Linux, then setting permissions depends on your webserver configuration. For example, if you use Apache HTTPD on CentOS, type &#039;&#039;&#039;chmod -R 755 &amp;lt;directory&amp;gt; ; chown -R apache &amp;lt;directory&amp;gt;&#039;&#039;&#039;. This will give everyone access to read, and your webserver will have the permission to write. Check the [https://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions following link] for more information on Linux permissions.}}&lt;br /&gt;
&lt;br /&gt;
==Create a database user== &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
LimeSurvey will create a database and the tables inside it. To be able to do this, it will need the user name and password of a database user. We generally recommend creating a database user with the following permissions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
- MySQL: SELECT, CREATE, INSERT, UPDATE, DELETE, ALTER, DROP, INDEX&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
- PostgreSQL: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, TRIGGER&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
- Microsoft SQL Server: &#039;&#039;Unknown - if you can find out this information, please complete it&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Run the installation script== &amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Go to &amp;quot;example.org/limesurvey/admin&amp;quot;&#039;&#039;&#039;. If you configured everything correctly, the LimeSurvey installer should be starting - just follow the instructions. You will be asked whether you wish to create the database and/or create the tables inside the database. LimeSurvey will then create the needed tables in the database.&lt;br /&gt;
&lt;br /&gt;
==Connect to the administration script for the first time== &amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
You are done when the installation finishes! Open your browser and enter the URL to the LimeSurvey administration. Assuming you used &#039;limesurvey&#039; as the directory name to store the files in, this will be something like &amp;quot;http://www.example.com/limesurvey/admin&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
You should get a login screen. The default login credentials (if they have not been changed during the installation) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;html&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
User: admin&lt;br /&gt;
Password: password&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
You will be prompted to change the default password after you logged in. Have fun!&lt;br /&gt;
&lt;br /&gt;
==Further configuration== &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Caching=== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
LimeSurvey uses the Yii file cache by default, but it can be configured to use other cache engines. Possible other caches are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
* Memcached&lt;br /&gt;
* Redis&lt;br /&gt;
* WinCache&lt;br /&gt;
* XCache&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
Please see the [https://www.yiiframework.com/doc/api/1.1/CCache Yii documentation] for full description.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
Since LimeSurvey 4.0.0 you also have the possibility to cache calculations in the ExpressionScript. This can provide a significant speed-up depending on survey complexity. To enable the emcache, add this in your config.php file (components array):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&#039;emcache&#039; =&amp;gt; array(&#039;class&#039; =&amp;gt; &#039;CFileCache&#039;),&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
As with the main Yii cache, other cache systems can be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
{{Note| The emcache is not compatible with randomized surveys, and will be automatically turned off in such cases.}}&lt;br /&gt;
&lt;br /&gt;
==What if I have problems...== &amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
Like all computer programs, most of the time things will work just like the instructions say, but sometimes they just won&#039;t. There are too many possible reasons for things not going according to plan to describe here. If you have trouble, first check out the [[Installation FAQ]]. If you don&#039;t find your answer there, please post your problem and any error messages in the [https://www.limesurvey.org/forum LimeSurvey forums], open a [https://www.limesurvey.org/contact-us support ticket] (only for customers using LimeSurvey Cloud), or join our [https://discord.gg/DEjguXn Discord channel].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=TwoFactorAdminLogin&amp;diff=377540</id>
		<title>TwoFactorAdminLogin</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=TwoFactorAdminLogin&amp;diff=377540"/>
		<updated>2024-06-18T08:34:23Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Removed details about how to download plugin&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;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;2-Factor-Authentication&#039;&#039;&#039; (2FA) is a way to add additional security to your account. It is called &amp;quot;two-factor-authentication&amp;quot; because two verification methods are used to access your account. The first &amp;quot;factor&amp;quot; is your usual password that is standard for any account. The second &amp;quot;factor&amp;quot; is a verification code retrieved from a 2FA application either from your computer or mobile device. For more details about 2FA and its importance, please visit the following [https://en.wikipedia.org/wiki/Multi-factor_authentication article].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
If enabled, a 6 digits code (default value) has to be introduced when you log in to your LimeSurvey instance:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2FA_login.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
To learn more about this functionality, please continue reading below.&lt;br /&gt;
&lt;br /&gt;
=How to install the 2FA plugin= &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since version 6.x the plugin is a core plugin. So just visit the [[Plugin manager|Plugin Manager]] page and enable it from there (see below for more details).&lt;br /&gt;
&lt;br /&gt;
=Activate the 2FA plugin= &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
To activate your 2FA plugin, access your LimeSurvey instance, and activate it from your [[Plugin manager|Plugin Manager]]: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_activate.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
To check the default settings, please click on &amp;quot;Configure&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Plugin settings== &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
The configuration page contains the following settings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2FA plugin configuration.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Issuer:&#039;&#039;&#039; The text typed in this box will be displayed in the app as issuer name.&lt;br /&gt;
*&#039;&#039;&#039;Digits:&#039;&#039;&#039; The number of digits the resulting codes will be. Please leave it at 6 for Google Authenticator.&lt;br /&gt;
*&#039;&#039;&#039;TimePeriod:&#039;&#039;&#039; The number of seconds a code will be valid. If you use Google Authenticator, please leave it to 30.&lt;br /&gt;
*&#039;&#039;&#039;Discrepancy:&#039;&#039;&#039; The amount of discrepancy is allowed for the client after the TimePeriod expires (seconds)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Algorithm:&#039;&#039;&#039; The algorithm used to generate a hash:&lt;br /&gt;
**&#039;&#039;SHA1 (Default)&#039;&#039;&lt;br /&gt;
**&#039;&#039;SHA256&#039;&#039;&lt;br /&gt;
**&#039;&#039;MD5&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Force 2FA:&#039;&#039;&#039; If you enable it, all instance users have to create a 2FA token after they log in again into the LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
Don&#039;t forget to click on &amp;quot;Save&amp;quot; after updating your 2FA configuration.&lt;br /&gt;
&lt;br /&gt;
=2-Factor-Settings= &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
Once you activated the plugin, a new menu item will be displayed on the top bar:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_location.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
The dropdown menu includes the following two options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
*[[TwoFactorAdminLogin#2FA-Setting|2FA-Setting]]: Users can enable and manage their 2FA settings.&lt;br /&gt;
*[[TwoFactorAdminLogin#2FA-Administration|2FA-Administration]]: With the right permission, you can visualize whether the other instance users use 2FA or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2FA-Setting== &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
If you haven&#039;t created any 2FA-token yet, the following page will be displayed:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_register.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
If you decide to create a 2FA-token, click on &amp;quot;Register 2FA now&amp;quot;. You will be prompted by the following message box:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_user_settings.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
To enable 2FA:&lt;br /&gt;
#Select the 2FA authentication method. By default, five different 2FA types are provided: Google Authenticator (default), Authy, YubiKey, Authenticator Plus, Duo, and HDE OTP.&lt;br /&gt;
#Scan the QR-code with your mobile phone. For a list of application recommendations, check this [https://en.wikipedia.org/wiki/Help:Two-factor_authentication#Enabling_2FA_on_smartphones_and_tablet_computers article].&lt;br /&gt;
#Enter the confirmation key displayed in your 2FA application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
{{Note|From a technical perspective, you can use any 2FA application that supports TOTP (Time-based One-Time Password algorithm). For more information on what TOTP is, please check this [https://en.wikipedia.org/wiki/Time-based_One-time_Password_algorithm article].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
To confirm the creation of your 2FA-token, click on &amp;quot;Create 2FA binding&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&amp;lt;hr width=&amp;quot;50%&amp;quot; style=&amp;quot;margin:auto&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
Once done, the following two options will be displayed in your personal 2FA settings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_unset.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Unset 2FA:&#039;&#039;&#039; Confirm your action to delete the 2FA-token associated to your account.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
{{Note|Please note that you will need to re-authenticate again if &amp;quot;Force 2FA&amp;quot; is enabled from the plugin settings.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Reset 2FA:&#039;&#039;&#039; If this option is selected, you will be asked to scan the new QR-code and introduce the new confirmation Key. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2FA-Administration== &amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
With the necessary permissions, you can have access to the 2FA user management panel from where you can check how many users activated 2FA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_user_management.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Action:&#039;&#039;&#039; A red trash button is displayed in this column next to the users that have enabled 2FA. If someone asks to get the 2FA-token reset because he/she cannot log in anymore into your instance, you can delete the 2FA-token associated with his/her account from here.  &lt;br /&gt;
*&#039;&#039;&#039;Username:&#039;&#039;&#039; All the instance users are listed under this column.&lt;br /&gt;
*&#039;&#039;&#039;Full name:&#039;&#039;&#039;The full name typed in here by your users is displayed in this field.&lt;br /&gt;
*&#039;&#039;&#039;Email:&#039;&#039;&#039; The email address corresponding to your users.&lt;br /&gt;
*&#039;&#039;&#039;2FA-Method:&#039;&#039;&#039; The 2FA-method chosen by each user.&lt;br /&gt;
*&#039;&#039;&#039;2FA enabled:&#039;&#039;&#039; If &amp;quot;1&amp;quot;, it means that 2FA is enabled for the respective user.&lt;br /&gt;
&lt;br /&gt;
=FAQs= &amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==I am a super administrator and locked myself out. How can I delete my 2FA-token?== &amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
You will need access to your database and truncate the 2FA-related column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How can I enforce 2FA to all my users?== &amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
Enable &amp;quot;Force 2FA&amp;quot; from the plugin configuration menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==From where can I download the plugin?== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
Please access [https://www.limesurvey.org/limestore LimeStore] and [https://www.limesurvey.org/limestore?view=extensiondetails&amp;amp;id=49 download the plugin from download it from here]. To be able to download it, you need to hold a Premium package&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==I use LimeSurvey Cloud. Do I have to purchase the plugin?== &amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
No. The plugin is already part of the core LimeSurvey plugins - you can enable it by accessing the plugin menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=StatFunctions&amp;diff=374835</id>
		<title>StatFunctions</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=StatFunctions&amp;diff=374835"/>
		<updated>2024-02-26T09:59:05Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Added note about scanning files to use the plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FeatureStarting|4.1.0}} &lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Functions for the expression manager to count some statistics data :&lt;br /&gt;
&lt;br /&gt;
* statCount(QuestionCode.sgqa[, submitted = 1][, self = true]) : count the number of already submitted answered questions by QuestionCode. You can count the number of submitted (= completed) surveys with statCount(&#039;sid&#039;) for example.&lt;br /&gt;
* statCountIf(QuestionCode.sgqa, value[, submitted = 1][, self = true]) : count the number of responses where answer to question QuestionCode equals value. The comparison uses [https://www.yiiframework.com/doc/api/1.1/CDbCriteria#compare-detail Yii compare], you can use &amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;=, &amp;lt;&amp;gt; operator at start of your value.&lt;br /&gt;
&lt;br /&gt;
You can find an example of the usage of these 2 functions in: [https://github.com/LimeSurvey/LimeSurvey/blob/master/tests/data/surveys/survey_archive_statCountFunctionsTest.lsa survey_archive_statCountFunctionsTest] inside the test directory.&lt;br /&gt;
&lt;br /&gt;
[[File:StatFunctionsSample.png]]&lt;br /&gt;
&lt;br /&gt;
This plugin uses the [[ExpressionManagerStart]] plugin and it creates two functions. These 2 functions don&#039;t use javascript, so &#039;&#039;&#039;the check is done only when the respondent moves ahead in the survey&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Expression script don&#039;t have true and false as reserved word, then this strings are checked as variables name. You can use 1, 0 or the result of an expression for the second parameter. remind than &amp;quot;false&amp;quot; is evaluated a true in boolean.&lt;br /&gt;
&lt;br /&gt;
{{Alert|Before using these functions the plugin must be activated in [[Plugin_manager#General|Plugin Manager]]. Scan the files there and then install and activate the plugin.}}&lt;br /&gt;
&lt;br /&gt;
=Example=&lt;br /&gt;
&lt;br /&gt;
* count number of submitted response : {statCount(&amp;quot;id&amp;quot;)}&lt;br /&gt;
* count number of responses (submitted or not) : {statCount(&amp;quot;id&amp;quot;, 0)}&lt;br /&gt;
* number of responses where respondent stopped at page 1 : {statCountIf(&amp;quot;lastpage&amp;quot;, 1, 0)}&lt;br /&gt;
* number of submitted responses with startlanguage &amp;quot;en&amp;quot; : {statCountIf(&amp;quot;startlanguage&amp;quot;, &amp;quot;en&amp;quot;, 1)}&lt;br /&gt;
* number not completed responses to this survey : {sum(statCount(&amp;quot;id&amp;quot;, 0),statCount(&amp;quot;id&amp;quot;)*-1)}&lt;br /&gt;
* number of responses submitted in 2022 : {statCountIf(&amp;quot;submitted&amp;quot;, &amp;quot;&amp;gt;=2022-01-01&amp;quot;)}&lt;br /&gt;
* number of submitted responses with Y at a YesNo question title {statCountIf(YesNo.sgqa, &amp;quot;Y&amp;quot;)}&lt;br /&gt;
* number of responses (submitted or not) with Answer A1  at a Q01 question title {statCountIf(Q01.sgqa, &amp;quot;A1&amp;quot;, 0)}&lt;br /&gt;
* Validate unicity on a short text question (not submitted) {statCountIf(self.sgqa, self.NAOK, 0, 1)} (only when move next page)&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]][[Category:Core Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=374834</id>
		<title>Expression Manager</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=374834"/>
		<updated>2024-02-26T09:57:51Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Adjusted link syntax&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 80 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 when you have to re-order questions.  EM uses a 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 shown, 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 and 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 multiply 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 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;, participant data, and response data.&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 subquestion-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;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;
#*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 -- available is assesments are enabled for the survey, otherwise always zero&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 (boolean (can be different in PHP and JS))&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, subquestion-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;
=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 [[ExpressionScript sample surveys|sample surveys]].&lt;br /&gt;
*Explore the [[ExpressionScript How-tos|use cases and HowTos]] and [[ExpressionScript 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 determine 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;&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;
&amp;lt;div id=&amp;quot;EMsyntax&amp;quot;&amp;gt;Expression Manager supports the following syntax:&amp;lt;/div&amp;gt;&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;
=== Operators === &amp;lt;!--T:211--&amp;gt;&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;
==== Warning with plus operator (+) ==== &amp;lt;!--T:228--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
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, &#039;&#039;&#039;we recommend using the join() function for concatenation and sum() function for addition&#039;&#039;&#039;, 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;
==== Warning with mismatch between number and string and alphabetic comparison ==== &amp;lt;!--T:229--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:230--&amp;gt;&lt;br /&gt;
When you want to compare value with relative or equality comparisons, pay attention to type mismatch. Value entered by user or answer code selected can be used as number if it&#039;s clearly a number.&lt;br /&gt;
If you surround one of the values with &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;it will force the comparison as text (alphabetic compare). If you want to compare numerically, never surround the number with quotation marks, &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:231--&amp;gt;&lt;br /&gt;
For example &amp;lt;code&amp;gt;Q0.NAOK &amp;gt; &amp;quot;50&amp;quot;&amp;lt;/code&amp;gt; is true if Q0.NAOK is a numeric question with 9 as value. This is because the operator &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; will assume it&#039;s alphabetical compare and not numerical.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:232--&amp;gt;&lt;br /&gt;
To be sure to compare integer value, you can use &amp;lt;code&amp;gt;[[Expression_Manager#Implemented_Functions|intval]](Q0.NAOK) &amp;gt; 50&amp;lt;/code&amp;gt;, just remember if Q0.NAOK is not a number (empty or a string), then intval(Q0.NAOK) == 0. To compare string value (&amp;quot;A&amp;quot; &amp;lt; &amp;quot;B&amp;quot;) use [[Expression_Manager#Implemented_Functions|strcmp]] directly : &amp;lt;code&amp;gt;strcmp(Q0.NAOK,&amp;quot;B&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;strcmp(Q0.NAOK,&amp;quot;A5&amp;quot;)&amp;lt;/code&amp;gt;.&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 should 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;
===Using Assignment Operator=== &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;
* You need complex quota : using one hidden single choice for quota and set it using assignment&lt;br /&gt;
* etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:212--&amp;gt;&lt;br /&gt;
You can use all expression manager system for this purpose. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:227--&amp;gt;&lt;br /&gt;
{{Alert|Assignment is done only in PHP. This doesn&#039;t update any values on the same page, but only when the user navigates with next, previous, save ….}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:226--&amp;gt;&lt;br /&gt;
{{Alert|If you don&#039;t use an [[Question_type_-_Equation|equation question]] type for this purpose: the assignment is done only after the logic of the current page is done. The recommended method is to always use an [[Question_type_-_Equation|equation question]].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:213--&amp;gt;&lt;br /&gt;
Some example:&lt;br /&gt;
* Set answer to a short text question in lowercase : &amp;lt;code&amp;gt;{QCODE=strtolower(QCODE.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set a default answer to an array question type at start of a survey : &amp;lt;code&amp;gt;{Q1_SQ1=((is_empty(Q1_SQ1.NAOK),&amp;quot;A99&amp;quot;,Q1_SQ1.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set a default answer to an array texts question type at start of a survey : &amp;lt;code&amp;gt;{Q1_SQY1_SQX1 = ((is_empty(Q1_SQY1_SQX1.NAOK),&amp;quot;Inserted answer&amp;quot;, Q1_SQY1_SQX1.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set an answer with condition : &amp;lt;code&amp;gt;{QCODE=if(YesNo=&amp;quot;Y&amp;quot;,&amp;quot;A1&amp;quot;,&amp;quot;&amp;quot;)}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== XSS security == &amp;lt;!--T:214--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:215--&amp;gt;&lt;br /&gt;
With XSS enable, some expression manager system can not be used : &lt;br /&gt;
* starting a HTML tag in expression but ending in another expression&lt;br /&gt;
* use a complex expression in URL. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:216--&amp;gt;&lt;br /&gt;
Example and workaround&lt;br /&gt;
* &amp;lt;code&amp;gt;{if( 1 ,&amp;quot;&amp;amp;lt;strong&amp;amp;gt;&amp;quot;,&amp;quot;&amp;quot;)}information{if( 1 ,&amp;quot;&amp;amp;lt;/strong&amp;amp;gt;&amp;quot;,&amp;quot;&amp;quot;)}&amp;lt;/code&amp;gt; is broken with XSS security, here you can use &amp;lt;code&amp;gt;{if(1,&amp;quot;&amp;lt;strong&amp;amp;gt;information&amp;amp;lt;/strong&amp;amp;gt;&amp;quot;,&amp;quot;information&amp;quot;)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;/script.php?value={if(QCODE == &amp;quot;Y&amp;quot;,&amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot;)}&amp;quot;&amp;amp;gt;next&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;, here you can use an equation question because using a complete question code is OK : &amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;/script.php?value={EQUATION.NAOK}&amp;quot;&amp;amp;gt;next&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;&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) (Only for NOT anonymous survey).&lt;br /&gt;
*[[Adding a question#Information_from_previous_answers|INSERTANS:SGQA]] - the display value of an answer (e.g. &amp;quot;Yes&amp;quot;). For Expression Manager it&#039;s the same that using {QCODE.shown}.&lt;br /&gt;
*All [[The_template_editor#Keywords|{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:210--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&#039;simplebox&#039;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; It is only safe to refer to variables that occur in preceding pages or questions.&lt;br /&gt;
&amp;lt;/div&amp;gt;&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;
&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;
=== HTML editor issue=== &amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:217--&amp;gt;&lt;br /&gt;
{{Alert|This issue is fixed after 2.05 build 140803}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
If you use HTML editor, some characters 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;
&amp;lt;!--T:209--&amp;gt;&lt;br /&gt;
If you use HTML editor you need to use :&lt;br /&gt;
* and for &amp;amp;&lt;br /&gt;
* lt for &amp;lt;&lt;br /&gt;
* le for &amp;lt;=&lt;br /&gt;
* gt for &amp;gt;&lt;br /&gt;
* ge for &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 &#039;&#039;&#039;comment&#039;&#039;&#039; and &#039;&#039;&#039;other&#039;&#039;&#039;, 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, other|| || ||{Q22_E}, {Q22_other}||{Q22_E.shown}, {Q22_other.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 subquestions 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 subquestions matching pattern X are selected. Note that search is done on complete code identifier, then sq_X match and include subquestions nX, X, Xn (e.g. if you use sq_1, subquestions a1, 1a, 1, 11 or 001 was included). Put attention at dual scale question type where subquestions code are QCODE_SQCODE_1 and QCODE_SQCODE_1 and to ranking question type where subquestions code are QCODE_1,QCODE_2 ....&lt;br /&gt;
*nosq_X - where X is a row or column identifier. Only subquestions not matching pattern X are selected. Note that search is done on complete code identifier, then nosq_X match and does not include subquestions nX, X, Xn&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 subquestion 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 subquestions (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;
==Usage of NAOK== &amp;lt;!--T:218--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:219--&amp;gt;&lt;br /&gt;
NAOK --&amp;gt; &amp;quot;Not Applicable&amp;quot; (NA) is alright (OK)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:224--&amp;gt;&lt;br /&gt;
Using NAOK, means that all or some of the variables are irrelevant (e.g. &amp;quot;Not Applicable&amp;quot; (NA) is alright (OK)). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:225--&amp;gt;&lt;br /&gt;
When you put some variable from question in any equation : if this question (or subquestion) is hidden by condition : this disable all equation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:220--&amp;gt;&lt;br /&gt;
For example : count(Q1_SQ1,Q1_SQ2,Q1_SQ3,Q1_SQ4) give always an empty string if one subquestion of Q1 is filtered.&lt;br /&gt;
To count the number of checked subquestion in such question can be count(Q1_SQ1.NAOK,Q1_SQ2.NAOK,Q1_SQ3.NAOK,Q1_SQ4.NAOK). If the sub question is hidden :Expression manager return an empty string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:221--&amp;gt;&lt;br /&gt;
Without NAOK : if one question or one subquestion is hidden : Expression Manager return always an empty string, same to return false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:222--&amp;gt;&lt;br /&gt;
The .shown always use the NAOK system (empty string if hidden) but if you need the code of the answer : it&#039;s always a good idea to add .NAOK after the question code. Except if you need it and know what you do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:223--&amp;gt;&lt;br /&gt;
Another example and information is provided at [[#Overriding_Cascading_Conditions|Overriding Cascading Conditions]]&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 to 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{{UpdatedIn|3.0.2}}||Excel-style if(test,result_if_true&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;,result_if_false = &amp;amp;quot;&amp;amp;quot;&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;)||if(test,result_if_true&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;,result_if_false = &amp;amp;quot;&amp;amp;quot;&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;)&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;
|listifop{{NewIn|3.16.1}}||Return a &#039;glue&#039;-separated list of the specified question property (retProp) from questions in the list which pass the criteria (cmpProp op value)||string listifop(cmpProp, op, value, retProp, glue, sgqa1, sgqa2, ... sgqaN)&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 unicode string (starting by 0, return false if not found)|||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 an unicode string (starting by 0, return false if not found)||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&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.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 an unicode 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)|| [[ExpressionAnswerOptions|Core plugin ExpressionAnswerOptions ]] ||&lt;br /&gt;
|-&lt;br /&gt;
|getAnsOption(X,Y)|| [[ExpressionAnswerOptions|Core plugin ExpressionAnswerOptions ]] ||&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;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt; element.  Every time a value changes, it recomputes the expression that should appear in that &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&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;
|bold red text||style=&#039;color:#ff0000; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||An error||Some explanation on error||Can be an unknow variable or an error in function, .... Survey can be totally broken, this don&#039;t show to public user.&lt;br /&gt;
|-&lt;br /&gt;
|blue text||style=&#039;color:#0000ff; background-color:#eee8aa&#039;|Sample||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:#808080; background-color:#eee8aa&#039;|Sample||string||none||single and double-quoted strings are shown in grey text&lt;br /&gt;
|-&lt;br /&gt;
|cyan text||style=&#039;color:#4169e1; background-color:#eee8aa&#039;|Sample||variable set on the same 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 the same page to the current question is shown in cyan text, showning it can be updated in javascript.  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;
|green text||style=&#039;color:#008000; background-color:#eee8aa&#039;|Sample||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:#9370db; background-color:#eee8aa&#039;|Sample||variable set on a later page &amp;lt;sup&amp;gt;in general : empty at survey start, but can be filled with index or move previous&amp;lt;/sup&amp;gt;||&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 next page is shown in bold pink 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 tan text||style=&#039;color:#a0522d; background-color:#eee8aa&#039;|Sample||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:#ff4500; 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;
=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;
==[[ExpressionScript How-tos|Use Cases and HowTos]]== &amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[ExpressionScript examples|Step-by-Step examples]]== &amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[StatFunctions|Expression Manager statistic functions]]==&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;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=374833</id>
		<title>Expression Manager</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=374833"/>
		<updated>2024-02-26T09:55:43Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Link fix&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 80 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 when you have to re-order questions.  EM uses a 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 shown, 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 and 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 multiply 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 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;, participant data, and response data.&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 subquestion-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;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;
#*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 -- available is assesments are enabled for the survey, otherwise always zero&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 (boolean (can be different in PHP and JS))&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, subquestion-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;
=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 [[ExpressionScript sample surveys|sample surveys]].&lt;br /&gt;
*Explore the [[ExpressionScript How-tos|use cases and HowTos]] and [[ExpressionScript 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 determine 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;&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;
&amp;lt;div id=&amp;quot;EMsyntax&amp;quot;&amp;gt;Expression Manager supports the following syntax:&amp;lt;/div&amp;gt;&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;
=== Operators === &amp;lt;!--T:211--&amp;gt;&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;
==== Warning with plus operator (+) ==== &amp;lt;!--T:228--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
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, &#039;&#039;&#039;we recommend using the join() function for concatenation and sum() function for addition&#039;&#039;&#039;, 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;
==== Warning with mismatch between number and string and alphabetic comparison ==== &amp;lt;!--T:229--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:230--&amp;gt;&lt;br /&gt;
When you want to compare value with relative or equality comparisons, pay attention to type mismatch. Value entered by user or answer code selected can be used as number if it&#039;s clearly a number.&lt;br /&gt;
If you surround one of the values with &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;it will force the comparison as text (alphabetic compare). If you want to compare numerically, never surround the number with quotation marks, &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:231--&amp;gt;&lt;br /&gt;
For example &amp;lt;code&amp;gt;Q0.NAOK &amp;gt; &amp;quot;50&amp;quot;&amp;lt;/code&amp;gt; is true if Q0.NAOK is a numeric question with 9 as value. This is because the operator &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; will assume it&#039;s alphabetical compare and not numerical.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:232--&amp;gt;&lt;br /&gt;
To be sure to compare integer value, you can use &amp;lt;code&amp;gt;[[Expression_Manager#Implemented_Functions|intval]](Q0.NAOK) &amp;gt; 50&amp;lt;/code&amp;gt;, just remember if Q0.NAOK is not a number (empty or a string), then intval(Q0.NAOK) == 0. To compare string value (&amp;quot;A&amp;quot; &amp;lt; &amp;quot;B&amp;quot;) use [[Expression_Manager#Implemented_Functions|strcmp]] directly : &amp;lt;code&amp;gt;strcmp(Q0.NAOK,&amp;quot;B&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;strcmp(Q0.NAOK,&amp;quot;A5&amp;quot;)&amp;lt;/code&amp;gt;.&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 should 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;
===Using Assignment Operator=== &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;
* You need complex quota : using one hidden single choice for quota and set it using assignment&lt;br /&gt;
* etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:212--&amp;gt;&lt;br /&gt;
You can use all expression manager system for this purpose. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:227--&amp;gt;&lt;br /&gt;
{{Alert|Assignment is done only in PHP. This doesn&#039;t update any values on the same page, but only when the user navigates with next, previous, save ….}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:226--&amp;gt;&lt;br /&gt;
{{Alert|If you don&#039;t use an [[Question_type_-_Equation|equation question]] type for this purpose: the assignment is done only after the logic of the current page is done. The recommended method is to always use an [[Question_type_-_Equation|equation question]].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:213--&amp;gt;&lt;br /&gt;
Some example:&lt;br /&gt;
* Set answer to a short text question in lowercase : &amp;lt;code&amp;gt;{QCODE=strtolower(QCODE.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set a default answer to an array question type at start of a survey : &amp;lt;code&amp;gt;{Q1_SQ1=((is_empty(Q1_SQ1.NAOK),&amp;quot;A99&amp;quot;,Q1_SQ1.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set a default answer to an array texts question type at start of a survey : &amp;lt;code&amp;gt;{Q1_SQY1_SQX1 = ((is_empty(Q1_SQY1_SQX1.NAOK),&amp;quot;Inserted answer&amp;quot;, Q1_SQY1_SQX1.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set an answer with condition : &amp;lt;code&amp;gt;{QCODE=if(YesNo=&amp;quot;Y&amp;quot;,&amp;quot;A1&amp;quot;,&amp;quot;&amp;quot;)}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== XSS security == &amp;lt;!--T:214--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:215--&amp;gt;&lt;br /&gt;
With XSS enable, some expression manager system can not be used : &lt;br /&gt;
* starting a HTML tag in expression but ending in another expression&lt;br /&gt;
* use a complex expression in URL. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:216--&amp;gt;&lt;br /&gt;
Example and workaround&lt;br /&gt;
* &amp;lt;code&amp;gt;{if( 1 ,&amp;quot;&amp;amp;lt;strong&amp;amp;gt;&amp;quot;,&amp;quot;&amp;quot;)}information{if( 1 ,&amp;quot;&amp;amp;lt;/strong&amp;amp;gt;&amp;quot;,&amp;quot;&amp;quot;)}&amp;lt;/code&amp;gt; is broken with XSS security, here you can use &amp;lt;code&amp;gt;{if(1,&amp;quot;&amp;lt;strong&amp;amp;gt;information&amp;amp;lt;/strong&amp;amp;gt;&amp;quot;,&amp;quot;information&amp;quot;)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;/script.php?value={if(QCODE == &amp;quot;Y&amp;quot;,&amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot;)}&amp;quot;&amp;amp;gt;next&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;, here you can use an equation question because using a complete question code is OK : &amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;/script.php?value={EQUATION.NAOK}&amp;quot;&amp;amp;gt;next&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;&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) (Only for NOT anonymous survey).&lt;br /&gt;
*[[Adding a question#Information_from_previous_answers|INSERTANS:SGQA]] - the display value of an answer (e.g. &amp;quot;Yes&amp;quot;). For Expression Manager it&#039;s the same that using {QCODE.shown}.&lt;br /&gt;
*All [[The_template_editor#Keywords|{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:210--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&#039;simplebox&#039;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; It is only safe to refer to variables that occur in preceding pages or questions.&lt;br /&gt;
&amp;lt;/div&amp;gt;&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;
&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;
=== HTML editor issue=== &amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:217--&amp;gt;&lt;br /&gt;
{{Alert|This issue is fixed after 2.05 build 140803}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
If you use HTML editor, some characters 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;
&amp;lt;!--T:209--&amp;gt;&lt;br /&gt;
If you use HTML editor you need to use :&lt;br /&gt;
* and for &amp;amp;&lt;br /&gt;
* lt for &amp;lt;&lt;br /&gt;
* le for &amp;lt;=&lt;br /&gt;
* gt for &amp;gt;&lt;br /&gt;
* ge for &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 &#039;&#039;&#039;comment&#039;&#039;&#039; and &#039;&#039;&#039;other&#039;&#039;&#039;, 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, other|| || ||{Q22_E}, {Q22_other}||{Q22_E.shown}, {Q22_other.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 subquestions 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 subquestions matching pattern X are selected. Note that search is done on complete code identifier, then sq_X match and include subquestions nX, X, Xn (e.g. if you use sq_1, subquestions a1, 1a, 1, 11 or 001 was included). Put attention at dual scale question type where subquestions code are QCODE_SQCODE_1 and QCODE_SQCODE_1 and to ranking question type where subquestions code are QCODE_1,QCODE_2 ....&lt;br /&gt;
*nosq_X - where X is a row or column identifier. Only subquestions not matching pattern X are selected. Note that search is done on complete code identifier, then nosq_X match and does not include subquestions nX, X, Xn&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 subquestion 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 subquestions (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;
==Usage of NAOK== &amp;lt;!--T:218--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:219--&amp;gt;&lt;br /&gt;
NAOK --&amp;gt; &amp;quot;Not Applicable&amp;quot; (NA) is alright (OK)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:224--&amp;gt;&lt;br /&gt;
Using NAOK, means that all or some of the variables are irrelevant (e.g. &amp;quot;Not Applicable&amp;quot; (NA) is alright (OK)). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:225--&amp;gt;&lt;br /&gt;
When you put some variable from question in any equation : if this question (or subquestion) is hidden by condition : this disable all equation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:220--&amp;gt;&lt;br /&gt;
For example : count(Q1_SQ1,Q1_SQ2,Q1_SQ3,Q1_SQ4) give always an empty string if one subquestion of Q1 is filtered.&lt;br /&gt;
To count the number of checked subquestion in such question can be count(Q1_SQ1.NAOK,Q1_SQ2.NAOK,Q1_SQ3.NAOK,Q1_SQ4.NAOK). If the sub question is hidden :Expression manager return an empty string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:221--&amp;gt;&lt;br /&gt;
Without NAOK : if one question or one subquestion is hidden : Expression Manager return always an empty string, same to return false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:222--&amp;gt;&lt;br /&gt;
The .shown always use the NAOK system (empty string if hidden) but if you need the code of the answer : it&#039;s always a good idea to add .NAOK after the question code. Except if you need it and know what you do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:223--&amp;gt;&lt;br /&gt;
Another example and information is provided at [[#Overriding_Cascading_Conditions|Overriding Cascading Conditions]]&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 to 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{{UpdatedIn|3.0.2}}||Excel-style if(test,result_if_true&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;,result_if_false = &amp;amp;quot;&amp;amp;quot;&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;)||if(test,result_if_true&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;,result_if_false = &amp;amp;quot;&amp;amp;quot;&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;)&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;
|listifop{{NewIn|3.16.1}}||Return a &#039;glue&#039;-separated list of the specified question property (retProp) from questions in the list which pass the criteria (cmpProp op value)||string listifop(cmpProp, op, value, retProp, glue, sgqa1, sgqa2, ... sgqaN)&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 unicode string (starting by 0, return false if not found)|||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 an unicode string (starting by 0, return false if not found)||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&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.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 an unicode 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)|| [[ExpressionAnswerOptions|Core plugin ExpressionAnswerOptions ]] ||&lt;br /&gt;
|-&lt;br /&gt;
|getAnsOption(X,Y)|| [[ExpressionAnswerOptions|Core plugin ExpressionAnswerOptions ]] ||&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;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt; element.  Every time a value changes, it recomputes the expression that should appear in that &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&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;
|bold red text||style=&#039;color:#ff0000; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||An error||Some explanation on error||Can be an unknow variable or an error in function, .... Survey can be totally broken, this don&#039;t show to public user.&lt;br /&gt;
|-&lt;br /&gt;
|blue text||style=&#039;color:#0000ff; background-color:#eee8aa&#039;|Sample||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:#808080; background-color:#eee8aa&#039;|Sample||string||none||single and double-quoted strings are shown in grey text&lt;br /&gt;
|-&lt;br /&gt;
|cyan text||style=&#039;color:#4169e1; background-color:#eee8aa&#039;|Sample||variable set on the same 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 the same page to the current question is shown in cyan text, showning it can be updated in javascript.  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;
|green text||style=&#039;color:#008000; background-color:#eee8aa&#039;|Sample||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:#9370db; background-color:#eee8aa&#039;|Sample||variable set on a later page &amp;lt;sup&amp;gt;in general : empty at survey start, but can be filled with index or move previous&amp;lt;/sup&amp;gt;||&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 next page is shown in bold pink 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 tan text||style=&#039;color:#a0522d; background-color:#eee8aa&#039;|Sample||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:#ff4500; 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;
=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;
==[[ExpressionScript How-tos|Use Cases and HowTos]]== &amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[ExpressionScript examples|Step-by-Step examples]]== &amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager statistic functions|StatFunctions]]==&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;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=374832</id>
		<title>Expression Manager</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=374832"/>
		<updated>2024-02-26T09:54:45Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Fixed link&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 80 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 when you have to re-order questions.  EM uses a 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 shown, 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 and 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 multiply 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 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;, participant data, and response data.&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 subquestion-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;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;
#*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 -- available is assesments are enabled for the survey, otherwise always zero&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 (boolean (can be different in PHP and JS))&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, subquestion-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;
=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 [[ExpressionScript sample surveys|sample surveys]].&lt;br /&gt;
*Explore the [[ExpressionScript How-tos|use cases and HowTos]] and [[ExpressionScript 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 determine 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;&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;
&amp;lt;div id=&amp;quot;EMsyntax&amp;quot;&amp;gt;Expression Manager supports the following syntax:&amp;lt;/div&amp;gt;&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;
=== Operators === &amp;lt;!--T:211--&amp;gt;&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;
==== Warning with plus operator (+) ==== &amp;lt;!--T:228--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
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, &#039;&#039;&#039;we recommend using the join() function for concatenation and sum() function for addition&#039;&#039;&#039;, 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;
==== Warning with mismatch between number and string and alphabetic comparison ==== &amp;lt;!--T:229--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:230--&amp;gt;&lt;br /&gt;
When you want to compare value with relative or equality comparisons, pay attention to type mismatch. Value entered by user or answer code selected can be used as number if it&#039;s clearly a number.&lt;br /&gt;
If you surround one of the values with &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;it will force the comparison as text (alphabetic compare). If you want to compare numerically, never surround the number with quotation marks, &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:231--&amp;gt;&lt;br /&gt;
For example &amp;lt;code&amp;gt;Q0.NAOK &amp;gt; &amp;quot;50&amp;quot;&amp;lt;/code&amp;gt; is true if Q0.NAOK is a numeric question with 9 as value. This is because the operator &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; will assume it&#039;s alphabetical compare and not numerical.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:232--&amp;gt;&lt;br /&gt;
To be sure to compare integer value, you can use &amp;lt;code&amp;gt;[[Expression_Manager#Implemented_Functions|intval]](Q0.NAOK) &amp;gt; 50&amp;lt;/code&amp;gt;, just remember if Q0.NAOK is not a number (empty or a string), then intval(Q0.NAOK) == 0. To compare string value (&amp;quot;A&amp;quot; &amp;lt; &amp;quot;B&amp;quot;) use [[Expression_Manager#Implemented_Functions|strcmp]] directly : &amp;lt;code&amp;gt;strcmp(Q0.NAOK,&amp;quot;B&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;strcmp(Q0.NAOK,&amp;quot;A5&amp;quot;)&amp;lt;/code&amp;gt;.&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 should 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;
===Using Assignment Operator=== &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;
* You need complex quota : using one hidden single choice for quota and set it using assignment&lt;br /&gt;
* etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:212--&amp;gt;&lt;br /&gt;
You can use all expression manager system for this purpose. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:227--&amp;gt;&lt;br /&gt;
{{Alert|Assignment is done only in PHP. This doesn&#039;t update any values on the same page, but only when the user navigates with next, previous, save ….}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:226--&amp;gt;&lt;br /&gt;
{{Alert|If you don&#039;t use an [[Question_type_-_Equation|equation question]] type for this purpose: the assignment is done only after the logic of the current page is done. The recommended method is to always use an [[Question_type_-_Equation|equation question]].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:213--&amp;gt;&lt;br /&gt;
Some example:&lt;br /&gt;
* Set answer to a short text question in lowercase : &amp;lt;code&amp;gt;{QCODE=strtolower(QCODE.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set a default answer to an array question type at start of a survey : &amp;lt;code&amp;gt;{Q1_SQ1=((is_empty(Q1_SQ1.NAOK),&amp;quot;A99&amp;quot;,Q1_SQ1.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set a default answer to an array texts question type at start of a survey : &amp;lt;code&amp;gt;{Q1_SQY1_SQX1 = ((is_empty(Q1_SQY1_SQX1.NAOK),&amp;quot;Inserted answer&amp;quot;, Q1_SQY1_SQX1.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set an answer with condition : &amp;lt;code&amp;gt;{QCODE=if(YesNo=&amp;quot;Y&amp;quot;,&amp;quot;A1&amp;quot;,&amp;quot;&amp;quot;)}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== XSS security == &amp;lt;!--T:214--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:215--&amp;gt;&lt;br /&gt;
With XSS enable, some expression manager system can not be used : &lt;br /&gt;
* starting a HTML tag in expression but ending in another expression&lt;br /&gt;
* use a complex expression in URL. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:216--&amp;gt;&lt;br /&gt;
Example and workaround&lt;br /&gt;
* &amp;lt;code&amp;gt;{if( 1 ,&amp;quot;&amp;amp;lt;strong&amp;amp;gt;&amp;quot;,&amp;quot;&amp;quot;)}information{if( 1 ,&amp;quot;&amp;amp;lt;/strong&amp;amp;gt;&amp;quot;,&amp;quot;&amp;quot;)}&amp;lt;/code&amp;gt; is broken with XSS security, here you can use &amp;lt;code&amp;gt;{if(1,&amp;quot;&amp;lt;strong&amp;amp;gt;information&amp;amp;lt;/strong&amp;amp;gt;&amp;quot;,&amp;quot;information&amp;quot;)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;/script.php?value={if(QCODE == &amp;quot;Y&amp;quot;,&amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot;)}&amp;quot;&amp;amp;gt;next&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;, here you can use an equation question because using a complete question code is OK : &amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;/script.php?value={EQUATION.NAOK}&amp;quot;&amp;amp;gt;next&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;&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) (Only for NOT anonymous survey).&lt;br /&gt;
*[[Adding a question#Information_from_previous_answers|INSERTANS:SGQA]] - the display value of an answer (e.g. &amp;quot;Yes&amp;quot;). For Expression Manager it&#039;s the same that using {QCODE.shown}.&lt;br /&gt;
*All [[The_template_editor#Keywords|{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:210--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&#039;simplebox&#039;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; It is only safe to refer to variables that occur in preceding pages or questions.&lt;br /&gt;
&amp;lt;/div&amp;gt;&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;
&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;
=== HTML editor issue=== &amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:217--&amp;gt;&lt;br /&gt;
{{Alert|This issue is fixed after 2.05 build 140803}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
If you use HTML editor, some characters 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;
&amp;lt;!--T:209--&amp;gt;&lt;br /&gt;
If you use HTML editor you need to use :&lt;br /&gt;
* and for &amp;amp;&lt;br /&gt;
* lt for &amp;lt;&lt;br /&gt;
* le for &amp;lt;=&lt;br /&gt;
* gt for &amp;gt;&lt;br /&gt;
* ge for &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 &#039;&#039;&#039;comment&#039;&#039;&#039; and &#039;&#039;&#039;other&#039;&#039;&#039;, 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, other|| || ||{Q22_E}, {Q22_other}||{Q22_E.shown}, {Q22_other.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 subquestions 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 subquestions matching pattern X are selected. Note that search is done on complete code identifier, then sq_X match and include subquestions nX, X, Xn (e.g. if you use sq_1, subquestions a1, 1a, 1, 11 or 001 was included). Put attention at dual scale question type where subquestions code are QCODE_SQCODE_1 and QCODE_SQCODE_1 and to ranking question type where subquestions code are QCODE_1,QCODE_2 ....&lt;br /&gt;
*nosq_X - where X is a row or column identifier. Only subquestions not matching pattern X are selected. Note that search is done on complete code identifier, then nosq_X match and does not include subquestions nX, X, Xn&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 subquestion 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 subquestions (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;
==Usage of NAOK== &amp;lt;!--T:218--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:219--&amp;gt;&lt;br /&gt;
NAOK --&amp;gt; &amp;quot;Not Applicable&amp;quot; (NA) is alright (OK)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:224--&amp;gt;&lt;br /&gt;
Using NAOK, means that all or some of the variables are irrelevant (e.g. &amp;quot;Not Applicable&amp;quot; (NA) is alright (OK)). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:225--&amp;gt;&lt;br /&gt;
When you put some variable from question in any equation : if this question (or subquestion) is hidden by condition : this disable all equation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:220--&amp;gt;&lt;br /&gt;
For example : count(Q1_SQ1,Q1_SQ2,Q1_SQ3,Q1_SQ4) give always an empty string if one subquestion of Q1 is filtered.&lt;br /&gt;
To count the number of checked subquestion in such question can be count(Q1_SQ1.NAOK,Q1_SQ2.NAOK,Q1_SQ3.NAOK,Q1_SQ4.NAOK). If the sub question is hidden :Expression manager return an empty string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:221--&amp;gt;&lt;br /&gt;
Without NAOK : if one question or one subquestion is hidden : Expression Manager return always an empty string, same to return false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:222--&amp;gt;&lt;br /&gt;
The .shown always use the NAOK system (empty string if hidden) but if you need the code of the answer : it&#039;s always a good idea to add .NAOK after the question code. Except if you need it and know what you do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:223--&amp;gt;&lt;br /&gt;
Another example and information is provided at [[#Overriding_Cascading_Conditions|Overriding Cascading Conditions]]&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 to 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{{UpdatedIn|3.0.2}}||Excel-style if(test,result_if_true&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;,result_if_false = &amp;amp;quot;&amp;amp;quot;&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;)||if(test,result_if_true&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;,result_if_false = &amp;amp;quot;&amp;amp;quot;&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;)&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;
|listifop{{NewIn|3.16.1}}||Return a &#039;glue&#039;-separated list of the specified question property (retProp) from questions in the list which pass the criteria (cmpProp op value)||string listifop(cmpProp, op, value, retProp, glue, sgqa1, sgqa2, ... sgqaN)&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 unicode string (starting by 0, return false if not found)|||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 an unicode string (starting by 0, return false if not found)||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&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.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 an unicode 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)|| [[ExpressionAnswerOptions|Core plugin ExpressionAnswerOptions ]] ||&lt;br /&gt;
|-&lt;br /&gt;
|getAnsOption(X,Y)|| [[ExpressionAnswerOptions|Core plugin ExpressionAnswerOptions ]] ||&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;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt; element.  Every time a value changes, it recomputes the expression that should appear in that &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&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;
|bold red text||style=&#039;color:#ff0000; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||An error||Some explanation on error||Can be an unknow variable or an error in function, .... Survey can be totally broken, this don&#039;t show to public user.&lt;br /&gt;
|-&lt;br /&gt;
|blue text||style=&#039;color:#0000ff; background-color:#eee8aa&#039;|Sample||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:#808080; background-color:#eee8aa&#039;|Sample||string||none||single and double-quoted strings are shown in grey text&lt;br /&gt;
|-&lt;br /&gt;
|cyan text||style=&#039;color:#4169e1; background-color:#eee8aa&#039;|Sample||variable set on the same 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 the same page to the current question is shown in cyan text, showning it can be updated in javascript.  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;
|green text||style=&#039;color:#008000; background-color:#eee8aa&#039;|Sample||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:#9370db; background-color:#eee8aa&#039;|Sample||variable set on a later page &amp;lt;sup&amp;gt;in general : empty at survey start, but can be filled with index or move previous&amp;lt;/sup&amp;gt;||&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 next page is shown in bold pink 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 tan text||style=&#039;color:#a0522d; background-color:#eee8aa&#039;|Sample||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:#ff4500; 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;
=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;
==[[ExpressionScript How-tos|Use Cases and HowTos]]== &amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[ExpressionScript examples|Step-by-Step examples]]== &amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager statistic functions|https://manual.limesurvey.org/StatFunctions]]==&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;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=374831</id>
		<title>Expression Manager</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Expression_Manager&amp;diff=374831"/>
		<updated>2024-02-26T09:53:46Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Added link to stat functions&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 80 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 when you have to re-order questions.  EM uses a 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 shown, 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 and 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 multiply 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 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;, participant data, and response data.&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 subquestion-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;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;
#*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 -- available is assesments are enabled for the survey, otherwise always zero&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 (boolean (can be different in PHP and JS))&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, subquestion-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;
=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 [[ExpressionScript sample surveys|sample surveys]].&lt;br /&gt;
*Explore the [[ExpressionScript How-tos|use cases and HowTos]] and [[ExpressionScript 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 determine 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;&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;
&amp;lt;div id=&amp;quot;EMsyntax&amp;quot;&amp;gt;Expression Manager supports the following syntax:&amp;lt;/div&amp;gt;&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;
=== Operators === &amp;lt;!--T:211--&amp;gt;&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;
==== Warning with plus operator (+) ==== &amp;lt;!--T:228--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
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, &#039;&#039;&#039;we recommend using the join() function for concatenation and sum() function for addition&#039;&#039;&#039;, 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;
==== Warning with mismatch between number and string and alphabetic comparison ==== &amp;lt;!--T:229--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:230--&amp;gt;&lt;br /&gt;
When you want to compare value with relative or equality comparisons, pay attention to type mismatch. Value entered by user or answer code selected can be used as number if it&#039;s clearly a number.&lt;br /&gt;
If you surround one of the values with &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;it will force the comparison as text (alphabetic compare). If you want to compare numerically, never surround the number with quotation marks, &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:231--&amp;gt;&lt;br /&gt;
For example &amp;lt;code&amp;gt;Q0.NAOK &amp;gt; &amp;quot;50&amp;quot;&amp;lt;/code&amp;gt; is true if Q0.NAOK is a numeric question with 9 as value. This is because the operator &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; will assume it&#039;s alphabetical compare and not numerical.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:232--&amp;gt;&lt;br /&gt;
To be sure to compare integer value, you can use &amp;lt;code&amp;gt;[[Expression_Manager#Implemented_Functions|intval]](Q0.NAOK) &amp;gt; 50&amp;lt;/code&amp;gt;, just remember if Q0.NAOK is not a number (empty or a string), then intval(Q0.NAOK) == 0. To compare string value (&amp;quot;A&amp;quot; &amp;lt; &amp;quot;B&amp;quot;) use [[Expression_Manager#Implemented_Functions|strcmp]] directly : &amp;lt;code&amp;gt;strcmp(Q0.NAOK,&amp;quot;B&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;strcmp(Q0.NAOK,&amp;quot;A5&amp;quot;)&amp;lt;/code&amp;gt;.&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 should 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;
===Using Assignment Operator=== &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;
* You need complex quota : using one hidden single choice for quota and set it using assignment&lt;br /&gt;
* etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:212--&amp;gt;&lt;br /&gt;
You can use all expression manager system for this purpose. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:227--&amp;gt;&lt;br /&gt;
{{Alert|Assignment is done only in PHP. This doesn&#039;t update any values on the same page, but only when the user navigates with next, previous, save ….}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:226--&amp;gt;&lt;br /&gt;
{{Alert|If you don&#039;t use an [[Question_type_-_Equation|equation question]] type for this purpose: the assignment is done only after the logic of the current page is done. The recommended method is to always use an [[Question_type_-_Equation|equation question]].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:213--&amp;gt;&lt;br /&gt;
Some example:&lt;br /&gt;
* Set answer to a short text question in lowercase : &amp;lt;code&amp;gt;{QCODE=strtolower(QCODE.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set a default answer to an array question type at start of a survey : &amp;lt;code&amp;gt;{Q1_SQ1=((is_empty(Q1_SQ1.NAOK),&amp;quot;A99&amp;quot;,Q1_SQ1.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set a default answer to an array texts question type at start of a survey : &amp;lt;code&amp;gt;{Q1_SQY1_SQX1 = ((is_empty(Q1_SQY1_SQX1.NAOK),&amp;quot;Inserted answer&amp;quot;, Q1_SQY1_SQX1.NAOK)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Set an answer with condition : &amp;lt;code&amp;gt;{QCODE=if(YesNo=&amp;quot;Y&amp;quot;,&amp;quot;A1&amp;quot;,&amp;quot;&amp;quot;)}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== XSS security == &amp;lt;!--T:214--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:215--&amp;gt;&lt;br /&gt;
With XSS enable, some expression manager system can not be used : &lt;br /&gt;
* starting a HTML tag in expression but ending in another expression&lt;br /&gt;
* use a complex expression in URL. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:216--&amp;gt;&lt;br /&gt;
Example and workaround&lt;br /&gt;
* &amp;lt;code&amp;gt;{if( 1 ,&amp;quot;&amp;amp;lt;strong&amp;amp;gt;&amp;quot;,&amp;quot;&amp;quot;)}information{if( 1 ,&amp;quot;&amp;amp;lt;/strong&amp;amp;gt;&amp;quot;,&amp;quot;&amp;quot;)}&amp;lt;/code&amp;gt; is broken with XSS security, here you can use &amp;lt;code&amp;gt;{if(1,&amp;quot;&amp;lt;strong&amp;amp;gt;information&amp;amp;lt;/strong&amp;amp;gt;&amp;quot;,&amp;quot;information&amp;quot;)}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;/script.php?value={if(QCODE == &amp;quot;Y&amp;quot;,&amp;quot;yes&amp;quot;,&amp;quot;no&amp;quot;)}&amp;quot;&amp;amp;gt;next&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;, here you can use an equation question because using a complete question code is OK : &amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;/script.php?value={EQUATION.NAOK}&amp;quot;&amp;amp;gt;next&amp;amp;lt;/a&amp;amp;gt;&amp;lt;/code&amp;gt;&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) (Only for NOT anonymous survey).&lt;br /&gt;
*[[Adding a question#Information_from_previous_answers|INSERTANS:SGQA]] - the display value of an answer (e.g. &amp;quot;Yes&amp;quot;). For Expression Manager it&#039;s the same that using {QCODE.shown}.&lt;br /&gt;
*All [[The_template_editor#Keywords|{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:210--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&#039;simplebox&#039;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; It is only safe to refer to variables that occur in preceding pages or questions.&lt;br /&gt;
&amp;lt;/div&amp;gt;&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;
&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;
=== HTML editor issue=== &amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:217--&amp;gt;&lt;br /&gt;
{{Alert|This issue is fixed after 2.05 build 140803}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
If you use HTML editor, some characters 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;
&amp;lt;!--T:209--&amp;gt;&lt;br /&gt;
If you use HTML editor you need to use :&lt;br /&gt;
* and for &amp;amp;&lt;br /&gt;
* lt for &amp;lt;&lt;br /&gt;
* le for &amp;lt;=&lt;br /&gt;
* gt for &amp;gt;&lt;br /&gt;
* ge for &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 &#039;&#039;&#039;comment&#039;&#039;&#039; and &#039;&#039;&#039;other&#039;&#039;&#039;, 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, other|| || ||{Q22_E}, {Q22_other}||{Q22_E.shown}, {Q22_other.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 subquestions 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 subquestions matching pattern X are selected. Note that search is done on complete code identifier, then sq_X match and include subquestions nX, X, Xn (e.g. if you use sq_1, subquestions a1, 1a, 1, 11 or 001 was included). Put attention at dual scale question type where subquestions code are QCODE_SQCODE_1 and QCODE_SQCODE_1 and to ranking question type where subquestions code are QCODE_1,QCODE_2 ....&lt;br /&gt;
*nosq_X - where X is a row or column identifier. Only subquestions not matching pattern X are selected. Note that search is done on complete code identifier, then nosq_X match and does not include subquestions nX, X, Xn&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 subquestion 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 subquestions (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;
==Usage of NAOK== &amp;lt;!--T:218--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:219--&amp;gt;&lt;br /&gt;
NAOK --&amp;gt; &amp;quot;Not Applicable&amp;quot; (NA) is alright (OK)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:224--&amp;gt;&lt;br /&gt;
Using NAOK, means that all or some of the variables are irrelevant (e.g. &amp;quot;Not Applicable&amp;quot; (NA) is alright (OK)). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:225--&amp;gt;&lt;br /&gt;
When you put some variable from question in any equation : if this question (or subquestion) is hidden by condition : this disable all equation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:220--&amp;gt;&lt;br /&gt;
For example : count(Q1_SQ1,Q1_SQ2,Q1_SQ3,Q1_SQ4) give always an empty string if one subquestion of Q1 is filtered.&lt;br /&gt;
To count the number of checked subquestion in such question can be count(Q1_SQ1.NAOK,Q1_SQ2.NAOK,Q1_SQ3.NAOK,Q1_SQ4.NAOK). If the sub question is hidden :Expression manager return an empty string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:221--&amp;gt;&lt;br /&gt;
Without NAOK : if one question or one subquestion is hidden : Expression Manager return always an empty string, same to return false.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:222--&amp;gt;&lt;br /&gt;
The .shown always use the NAOK system (empty string if hidden) but if you need the code of the answer : it&#039;s always a good idea to add .NAOK after the question code. Except if you need it and know what you do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:223--&amp;gt;&lt;br /&gt;
Another example and information is provided at [[#Overriding_Cascading_Conditions|Overriding Cascading Conditions]]&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 to 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{{UpdatedIn|3.0.2}}||Excel-style if(test,result_if_true&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;,result_if_false = &amp;amp;quot;&amp;amp;quot;&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;)||if(test,result_if_true&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;,result_if_false = &amp;amp;quot;&amp;amp;quot;&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;)&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;
|listifop{{NewIn|3.16.1}}||Return a &#039;glue&#039;-separated list of the specified question property (retProp) from questions in the list which pass the criteria (cmpProp op value)||string listifop(cmpProp, op, value, retProp, glue, sgqa1, sgqa2, ... sgqaN)&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 unicode string (starting by 0, return false if not found)|||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 an unicode string (starting by 0, return false if not found)||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&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.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 an unicode 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)|| [[ExpressionAnswerOptions|Core plugin ExpressionAnswerOptions ]] ||&lt;br /&gt;
|-&lt;br /&gt;
|getAnsOption(X,Y)|| [[ExpressionAnswerOptions|Core plugin ExpressionAnswerOptions ]] ||&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;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt; element.  Every time a value changes, it recomputes the expression that should appear in that &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&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;
|bold red text||style=&#039;color:#ff0000; background-color:#eee8aa&#039;|&#039;&#039;&#039;Sample&#039;&#039;&#039;||An error||Some explanation on error||Can be an unknow variable or an error in function, .... Survey can be totally broken, this don&#039;t show to public user.&lt;br /&gt;
|-&lt;br /&gt;
|blue text||style=&#039;color:#0000ff; background-color:#eee8aa&#039;|Sample||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:#808080; background-color:#eee8aa&#039;|Sample||string||none||single and double-quoted strings are shown in grey text&lt;br /&gt;
|-&lt;br /&gt;
|cyan text||style=&#039;color:#4169e1; background-color:#eee8aa&#039;|Sample||variable set on the same 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 the same page to the current question is shown in cyan text, showning it can be updated in javascript.  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;
|green text||style=&#039;color:#008000; background-color:#eee8aa&#039;|Sample||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:#9370db; background-color:#eee8aa&#039;|Sample||variable set on a later page &amp;lt;sup&amp;gt;in general : empty at survey start, but can be filled with index or move previous&amp;lt;/sup&amp;gt;||&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 next page is shown in bold pink 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 tan text||style=&#039;color:#a0522d; background-color:#eee8aa&#039;|Sample||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:#ff4500; 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;
=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;
==[[ExpressionScript How-tos|Use Cases and HowTos]]== &amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[ExpressionScript examples|Step-by-Step examples]]== &amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[Expression Manager statistic functions|https://manual.limesurvey.org/StatFunctions]]&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;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=How_to_design_a_good_survey_(guide)&amp;diff=200181</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=200181"/>
		<updated>2023-08-08T06:57:45Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Fix link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;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;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A Simple Guide to Making a Good Survey&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;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;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
On this page, you will find a simple guide to putting together a survey which will not only be painless for your audience to complete; but will also give you meaningful answers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
The blog [https://www.survey-consulting.com/survey-design-tips-tricks &amp;quot;Survey design tips &amp;amp; tricks&amp;quot;] also provides other very useful information.&lt;br /&gt;
&lt;br /&gt;
==Before Making a Survey== &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;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;!--T:8--&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;What is it that you really want to find out with your research?&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
Once you have answered that question, ask the following:&lt;br /&gt;
*&#039;&#039;&#039;Will a survey help me obtain the information that I need for my research?&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;Who are the right people to ask to complete the survey?&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;How can I ensure that I reach the right people?&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;What is the best way to help those completing the survey fully understand the questions (so that the information obtained is accurate / useful)?&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;Which, if any, statistical methods (for data analysis) do I want/need to use on the data once it has been gathered?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
These are just a few of the questions that you need clear answers to when deciding if LimeSurvey is the right tool for you. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
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;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
To some extent you can, of course, vary from this.  You can use LimeSurvey to collect answers to some types of phone interviews. You can also use LimeSurvey to collect qualitative data, e.g., by using text questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
But at some point, you might come to the conclusion that other research methods are more suitable.&lt;br /&gt;
&lt;br /&gt;
==Structuring a Questionnaire== &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
To decide in which order to ask questions and how to group them, there are some aspects to consider.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
If possible, start with questions that are easy to answer and which all participants are comfortable answering. Often these will be screening questions, i.e., questions you need to ask to find out whether you are asking the right people (use [[Setting conditions|conditions]] and/or [[Survey quotas|quotas]] to deal with these screening questions).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
Putting these types of questions at the beginning might help to avoid participants leaving your survey before completing it, as people might be less likely to terminate once they have already put some work into answering these lead-in/screening questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Examples&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&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;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
(single choice)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
You can use conditions to make the next question appear about cherries if participant chose &#039;&#039;cherries&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
Why do you prefer 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;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
(multi choice (or single choice, depends if you need exact data) question)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;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 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;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
(single choice)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Do you know any recipes with cherries?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
[textfield]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
Above is an example of easy to answer lead-in questions followed by the main question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
The objective was to gather recipes with cherries, apples and bananas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
On the other hand, if you need to ask hard to answer questions, you might think about using different pages for each question or question group and putting these hard to answer questions at the very end. This way, if participants decide not to complete the survey, at least their previous responses are saved.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Something else to consider pertaining to structure - avoid biases introduced by the questionnaire itself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
For example, in market research there are concepts which require unaided and aided questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
An example of an unaided question would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&amp;quot;Which brands of chocolate are you familiar with?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
(followed by an empty text box) &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
The following is an example of an aided question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt; &amp;quot;Which of the following brands of chocolate are you familiar with?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
(followed by a list of brands (multiple choice))&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
As mentioned previously, if you choose to include both types of questions (aided and unaided) in the same questionnaire, you should make sure to put them on different pages and put the unaided questions before the aided questions.  Putting an aided question before an unaided question might unintentionally influence the response of participants, which would invalidate your results.&lt;br /&gt;
&lt;br /&gt;
==Individual Questions== &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
Questions should be non-suggestive. &amp;quot;What is your opinion about LimeSurvey?&amp;quot; is an acceptable (non-suggestive) question while &amp;quot;Don&#039;t you agree that LimeSurvey is a really great tool?&amp;quot; is a suggestive question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
Other examples and suggestions for phrasing questions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
People may say &#039;&#039;&#039;&amp;quot;yes&amp;quot;&#039;&#039;&#039; to donating money if asked questions in the following 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;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
They will probably say &#039;&#039;&#039;&amp;quot;no&amp;quot;&#039;&#039;&#039; when asked 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;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
To help solicit the proper responses, order your questions:&lt;br /&gt;
*from the least sensitive to the most sensitive&lt;br /&gt;
*from general to more specific&lt;br /&gt;
*from questions about facts to questions about opinions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
Also, a survey question can be:&lt;br /&gt;
*&#039;&#039;&#039;Open-ended&#039;&#039;&#039; (the person answers in their own words), or&lt;br /&gt;
*&#039;&#039;&#039;Closed-ended&#039;&#039;&#039; (the person chooses from a limited number of options)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
Closed-ended questions are much easier to analyze, but may not allow respondents to give the answer they really want.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Example: &amp;quot;&#039;&#039;What is your favorite color?&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;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;
&amp;lt;!--T:49--&amp;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 respondents may not be able to pick their exact favorite color.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
Carefully consider each question and decide if they should be open-ended or closed-ended.  If you need deeper insight into responses, use open-ended questions.  If this is not the case, close-ended questions can be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
Example (open-ended): &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;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
Make it &#039;&#039;&#039;open-ended&#039;&#039;&#039;: the answers may not be easy to put in a table or graph, but you may gain deep insight into people&#039;s feelings and ideas about cleaning up the river or the environment and use direct quotes in your reporting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
Example (closed-ended): &amp;quot;&#039;&#039;How often do you visit the river?&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;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;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
You will be able to present this data in a neat bar graph.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
When working with multiple-choice or single-choice questions, make sure to choose the appropriate question type and formulate both questions and answers appropriately.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&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;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
The above is a typical multiple-choice question, as you can like several items on the list.  On the other hand, &amp;quot;Which one of the following fruits do you most prefer?&amp;quot; is a single choice question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
Both fruit examples have been formulated to make clear that your concern is with only the fruit listed. If you were to ask, &amp;quot;Which is your 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. Generally, answer options in most cases need to be complete, mutually exclusive and definite.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
If you have multiple- or single-choice questions with a lot of options to choose from, you need to be aware that this might introduce another bias, as participants are likely to focus their attention on the very first options and not those in the middle. LimeSurvey offers a great option to randomize the order of questions and, to some extent, eliminate this problem.&lt;br /&gt;
&lt;br /&gt;
==What Makes a Good Survey?== &amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
There are 3 features of a survey that will help to elicit the proper responses needed for more accurate assessment(s):&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 to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
Adding to that, always keep the user experience in mind. Reading, scrolling and clicking are tiring activities.  So,:&lt;br /&gt;
# Avoid unnecessary questions.&lt;br /&gt;
# Use conditions to avoid asking questions not relevant for a specific participant.&lt;br /&gt;
# Keep questions and answers short and easy to read - 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 comprehensibly.  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 scale types, scale scopes and different scale 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 to use an even number of rating options to make decision making easier for the respondents (see below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;Example for answer scales about how &#039;&#039;good&#039;&#039; something is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
1. Very good&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
2. Good&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
3. Quite good&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
4. Not that good&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
5. Bad&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
6. Very bad&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
Example for answer scales about how &#039;&#039;bad&#039;&#039; something is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
1. Good&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
2. Fair&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
3. Bad&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;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;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
How can you go about that? The best method is to separate all the areas and decide what information you need.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
For example, imagine you held an event that was open to the public and needed to get some general feedback about the event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
The following survey is an example of one that might be inadequate for eliciting useful responses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;Did you enjoy the Event?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
How good was the Wi-Fi?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
1 2 3 4 5 6 7 8 9 10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
Did you have problems getting to the event?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
Was the map provided helpful?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
How did you feel about the mixture of speakers?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
( ) Very sad ( ) Sad( ) Neutral ( ) Happy ( ) Very Happy&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
Matrix questions would be a better choice for the above scenario.&lt;br /&gt;
&lt;br /&gt;
==Matrix Questions.== &amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
As a general rule, scales should only be used for questions pertaining to age, time (maybe), or quantities. Matrix questions have to be worded properly in order to obtain the most useful feedback.  Keep in mind that a matrix of compulsory questions can be a bit of a deterrent for your audience because, when not structured properly, they do not allow for any extra information to be gathered.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;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;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
So what&#039;s wrong with the survey above?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
Let&#039;s look at each question one by one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Question 1&#039;&#039;&#039; doesn&#039;t really achieve anything.  Imagine receiving 100 &amp;quot;no&amp;quot; responses.  The response alone does not provide any useful information as to why the participant did not enjoy the event.  You would be left wondering about the reason for the &amp;quot;no&amp;quot; responses and also left wondering what to do with the responses.  We&#039;ll look at a possible improvement to this in a moment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Question 2&#039;&#039;&#039; is worse than the first. Referring back to the 3 features of a good survey, we see that questions need to be clear and precise. I&#039;m not an expert in Wi-Fi, but I&#039;m fairly certain that there are better ways of measuring this. What&#039;s more, it doesn&#039;t allow for a meaningful answer to a question like, &amp;quot;What will you do with the knowledge that 33% of people rated your Wi-Fi as being good vs only 23%?&amp;quot;  The 3 features of a good survey also states that the predefined answers need to be appropriate for the question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
It&#039;s fairly obvious that using a scale for this question won&#039;t help you improve on the quality of your Wi-Fi. There is a definite need for this question to have space for people to add additional information. How could someone report a specific problem without being able to elaborate?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
In this case it would be almost impossible to have enough information to properly address the issues that the participant(s) had with the Wi-Fi.  Surveys are all about obtaining useful information that you can work with or learn from.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Questions 3 &amp;amp; 4&#039;&#039;&#039; would have the same results as the first two questions.  They only allow for a &amp;quot;yes&amp;quot; or &amp;quot;no&amp;quot; response, and neither provides an opportunity to add details. We provide suggestions after this section on how to improve on these types of questions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Question 5&#039;&#039;&#039;, the final question, is another ineffective one. Asking for the level of satisfaction about something is not very useful, as every person has different interests, and so everyone will likely have different opinions about each speaker. It&#039;s another example of where a &amp;quot;scale&amp;quot; question is being used and shouldn&#039;t be.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
Have a look at the improved survey below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;Did you make use of the in-house Wi-Fi?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
Did you experience any problems with the Wi-Fi?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
( ) No problems at all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
( ) A couple of small issues, nothing major&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
( ) One or two severe issues&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
( ) The Wi-Fi was almost totally unusable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
If you experienced problems, could you briefly describe them? (Text field)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:115--&amp;gt;&lt;br /&gt;
Did you have any problems getting to the event?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:116--&amp;gt;&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
How did you come to our event?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:119--&amp;gt;&lt;br /&gt;
( ) Train&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:120--&amp;gt;&lt;br /&gt;
( ) Car&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
( ) Bus&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
( ) Light Rail (IE Tube, Tram)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
( ) Walk&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
Did you use the map from our website?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
( ) No&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
If you looked at the map, was it detailed enough?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:128--&amp;gt;&lt;br /&gt;
( ) Yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:129--&amp;gt;&lt;br /&gt;
( ) It gave me a rough idea.  I used another map for more detail though.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:130--&amp;gt;&lt;br /&gt;
( ) Not detailed at all&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:131--&amp;gt;&lt;br /&gt;
If you didn&#039;t use the map, why not?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:132--&amp;gt;&lt;br /&gt;
( ) Not enough detail&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:133--&amp;gt;&lt;br /&gt;
( ) I used a satnav/Google maps instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:134--&amp;gt;&lt;br /&gt;
( ) I didn&#039;t even know it existed!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:135--&amp;gt;&lt;br /&gt;
Generally speaking, were the speakers interesting? Did you enjoy the presentations?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:136--&amp;gt;&lt;br /&gt;
( ) Nearly all were interesting and thoroughly enjoyable&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:137--&amp;gt;&lt;br /&gt;
( ) Mainly enjoyable, but a handful of less interesting talks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
( ) A 50 - 50 split&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
( ) More dull than interesting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:140--&amp;gt;&lt;br /&gt;
( ) Didn&#039;t find any interesting&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
Please elaborate on your answer to the question above. Feel free to reference any&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:142--&amp;gt;&lt;br /&gt;
particular people/talks. (Text field)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:143--&amp;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;
&amp;lt;!--T:144--&amp;gt;&lt;br /&gt;
the talks, list them below (Text field)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:145--&amp;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;
&amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
This survey may be a little longer, but it is a lot easier to answer and interpret the responses. 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 that in response to the first survey question you received 30 people saying they had problems making it to the event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
This would have been as much information as you could extract from the results, but with the new set of answers it would be possible to deduce which forms of transport presented people with problems. What&#039;s more, you could go on to see whether they were using the map provided or another form of navigation, and use this to target improvements in the future.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039; Keep in mind, that after 50 questions, the user is most likely to stop reading&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
Other important additions are the text field questions.  These allow your participants to give specific feedback which you can draw from. It&#039;s a good idea to not make these compulsory, as they may put people off answering.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:150--&amp;gt;&lt;br /&gt;
To conclude, when writing a survey, you should aim to create one that asks specific questions to obtain more useful information for analysis.  Also, remember that it is helpful to gather a little extra background information, as it can be used to better analyze the responses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
It is also important to phrase your questions properly.  If people need to answer the questions, and they don&#039;t understand them they will close the window and move on. If possible, have someone else proofread your survey before making it publicly available to ensure that the questions are clear.&lt;br /&gt;
&lt;br /&gt;
==Survey Bias== &amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:153--&amp;gt;&lt;br /&gt;
In conducting market research, an important key in obtaining unbiased responses is to avoid asking survey participants questions that may influence the responses they provide.  Avoiding survey bias helps eliminate responses that may invalidate or skew the data collected. &lt;br /&gt;
It is quite easy and common for a company or individual without the proper market research training/knowledge to err in this way.  This applies to many things, such as the way a question is phrased, to the types of responses that are available to choose from, 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;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
The following is an example of a biased question:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;How much did you enjoy the event?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
( )Very much&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
( )Just a little&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
( )Not very much&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
( )Not at all&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
At first glance, it appears that there is no problem with the structure of this question.  After all, the respondent has choices ranging from &amp;quot;very much&amp;quot; to &amp;quot;not at all.&amp;quot;  However, the problem is in the way the question is phrased.  By asking the participant &amp;quot;How much&amp;quot; he or she enjoyed the event, the person conducting the survey 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;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
The following example would be a better way to ask the question in a way that does not influence the participant&#039;s response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;How would you rate your overall enjoyment of the event on a scale of 1 - 5: 1 = &amp;quot;Not at all&amp;quot; and 5 = &amp;quot;Completely enjoyed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
1 2 3 4 5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
( ) ( ) ( ) ( ) ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
Rephrasing the question allows the respondent to answer using a scale that makes it easy for him or her to specify the enjoyment level, and makes it easy for the person conducting the survey to tabulate and compare the results with other respondents. Of course, more questions should be added to gather specifics on what the participants enjoyed or didn&#039;t enjoy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
This is just one example of how minor changes in wording can improve your survey.  &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Survey_participants&amp;diff=175751</id>
		<title>Survey participants</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Survey_participants&amp;diff=175751"/>
		<updated>2023-02-08T19:52:03Z</updated>

		<summary type="html">&lt;p&gt;Mazi: URL fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;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;
=Introduction= &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
The Survey Participants  functionality allows you to invite a group of people to participate in your survey, keep track of who has completed the survey, and ensure that each person can only participate once. The survey participants table feature allows you to do the following:&lt;br /&gt;
*Import a list of names and email addresses for participants from a [[Survey_participants#Import participants from a CSV file|CSV]] file or a [[Survey_participants#Import participants from an LDAP query|LDAP query]];&lt;br /&gt;
*Generate a unique token code for each participant (invitation code);&lt;br /&gt;
*Send an email invitation to each person on your list (by group or individually);&lt;br /&gt;
*Send a reminder email to each person on your list who has not yet responded (by group or individually);&lt;br /&gt;
*Track who has responded from your survey participants list;&lt;br /&gt;
*Restrict access for people who have not received a token, and those with a token who have already responded;&lt;br /&gt;
*Edit/change any details in your list;&lt;br /&gt;
*Create email templates for invitations &amp;amp; reminders.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
Once the survey is switched to &#039;&#039;Closed-access&#039;&#039; mode &#039;&#039;&#039;only the people that provide a unique token code (that has not been already used) can access the survey&#039;&#039;&#039;. (You need to create a survey participants table first for the respective survey).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
If you enable the [[Participant settings|Allow public registration]] option from the &#039;&#039;&#039;Survey participants table&#039;&#039;&#039; panel, the survey participants will be able to register for your survey by receiving an automatically generated token code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:130--&amp;gt;&lt;br /&gt;
{{Note|Some tokens-related settings are stored in the [[Participant settings|participant settings]] panel.}}&lt;br /&gt;
&lt;br /&gt;
=How to create a survey participants table= &amp;lt;!--T:133--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:134--&amp;gt;&lt;br /&gt;
to &#039;&#039;initialize&#039;&#039; a survey participants table: &#039;&#039;&#039;Settings&#039;&#039;&#039; &amp;gt; &#039;&#039;&#039;Survey menu&#039;&#039;&#039; &amp;gt; &#039;&#039;&#039;Survey participants&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:247--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey_participants_settings_tab.png]]&amp;lt;/center&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:248--&amp;gt;&lt;br /&gt;
The following message will be displayed:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:135--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Switch-to-closed-access-mode-2.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:136--&amp;gt;&lt;br /&gt;
If you &#039;&#039;initialize a participant table&#039;&#039;, the survey will be accessible only to those participants who provide a token code in the registration process (either manually or by URL).  This way, the survey will be switched to closed-access mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:137--&amp;gt;&lt;br /&gt;
Once initialized, a window will be displayed confirming the creation of the survey participants table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reactivate a survey participants table== &amp;lt;!--T:138--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
When you delete a survey participants table, a backup is created. It can later be reactivated if you wish to use that specific survey participants table in another survey.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:140--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Restore old token tables.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=The survey participants table management tools= &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
A &#039;&#039;survey participant summary&#039;&#039; will be displayed if the survey participants table was previously created. This is the default screen:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:142--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey participant summary.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:143--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Total records:&#039;&#039;&#039; The number of survey participants from the survey participants table;&lt;br /&gt;
*&#039;&#039;&#039;Total with no unique token:&#039;&#039;&#039; Displays the number of users without an assigned token code;&lt;br /&gt;
*&#039;&#039;&#039;Total invitations sent:&#039;&#039;&#039; Shows the number of invitations that have been sent to your survey participants from the &#039;&#039;&#039;Survey participants&#039;&#039;&#039; table by using the Invitations option from the [[Survey participants#Invitations &amp;amp; reminders|Invitations &amp;amp; reminders]] menu; &lt;br /&gt;
*&#039;&#039;&#039;Total opted out:&#039;&#039;&#039; Displays the total number of survey participants that have decided [[Email_templates#Participant opt-out|to opt out]] from the survey;&lt;br /&gt;
*&#039;&#039;&#039;Total screened out:&#039;&#039;&#039;  Used to screen and exclude potential participants who do not match certain criteria.&lt;br /&gt;
*&#039;&#039;&#039;Total surveys completed:&#039;&#039;&#039; Shows the number of the surveys that have been completed by those users who have been allocated a token code. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:144--&amp;gt;&lt;br /&gt;
Above the &#039;&#039;&#039;Survey participant summary&#039;&#039;&#039; table, you will find the &#039;&#039;&#039;survey participants table management tools&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:token-menu2.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
*[[Survey participants#Display participants|Display participants]]: Displays a survey participants table with all the current participants. From the browse screen you can edit or delete individual entries from the table as well as perform a number of other useful functions (see the [[Survey participants#Display participants|Display participants wiki]] section below for more details);&lt;br /&gt;
*[[Survey participants#Create...|Create...]]: Allows the survey administrator to add respondents into the survey participants table either via the &#039;&#039;&#039;Add participant&#039;&#039;&#039; option or via the &#039;&#039;&#039;Import participants&#039;&#039;&#039; function;&lt;br /&gt;
*[[Survey participants#Manage attributes|Manage attributes]]: Allows the survey administrator to add additional fields to the survey participants table to store custom participant data;&lt;br /&gt;
*[[Survey participants#Export|Export]]: To export the token tables and use them in other surveys, use this function. The file will be saved in the .CSV format;&lt;br /&gt;
*[[Survey participants#Invitations &amp;amp; reminders|Survey participants]]: Allows you to invite or remind your participants from the survey participants table to fill out your online survey;&lt;br /&gt;
*[[Survey participants#Generate tokens|Generate tokens]]: Allows the survey administrator to quickly allocate a random unique token code to each user from the survey participants table that does not have one;&lt;br /&gt;
*[[Survey participants#View in CPDB|View in CPDB]]: Provides quick access to your LimeSurvey installation [[Central Participant Database|central participant database]] (CPDB). From there you can allocate CPDB users as survey participants to any survey.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Display participants== &amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Shows the entries list from the survey participants table and allows the user to:&lt;br /&gt;
*[[Survey participants#Sort the survey participants|sort the survey participants]];&lt;br /&gt;
*[[Survey participants#Filter the survey participants|filter the survey participants]];&lt;br /&gt;
*[[Survey participants#Perform certain actions to an individual entry|perform certain actions to an individual entry]];&lt;br /&gt;
*[[Survey participants#Perform a specific action to more than one entry|perform certain actions to more than one entry]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:token-actions.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sort survey participants=== &amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
The second row of the table includes various criteria that can help the survey administrator sort the entries. If you click on any of the columns/criteria from the table, the screen will be refreshed, showing the survey participants ordered in accordance to the criterion you just clicked on. Click twice on it to get the results displayed in a descending order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Display participants - sort.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Filter survey participants=== &amp;lt;!--T:150--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
To filter survey participants, choose the column that you want to filter.  Then type in the values/strings that you want to filter on in the empty box below the desired column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Display participants - filter.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:153--&amp;gt;&lt;br /&gt;
For example, type &amp;quot;OK&amp;quot; in the email status field to return only those participants that have a valid email address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hint:&#039;&#039;&#039; You can also use operators when filtering the survey participants (e.g.,: &amp;gt;, &amp;lt;, &amp;gt;=, &amp;lt;=, = ). &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:249--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=To filter &amp;quot;invitation sent&amp;quot;, &amp;quot;reminder sent&amp;quot;, and &amp;quot;survey completed&amp;quot; columns, use &amp;quot;=N&amp;quot; or &amp;quot;&amp;lt;&amp;gt;N&amp;quot;, meaning &amp;quot;equal No&amp;quot; and &amp;quot;not equal No&amp;quot;, respectively.}}&lt;br /&gt;
&lt;br /&gt;
===Perform a specific action to an individual entry=== &amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
The &#039;&#039;&#039;Action&#039;&#039;&#039; column is where you can find all the actions that are available for each individual entry from the survey participants table. The possible actions that can be performed are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Display participants - participant action.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;View response details:&#039;&#039;&#039; If the survey is a &amp;quot;tracked&amp;quot; (i.e., not anonymous) survey, another button will appear, allowing you to view the response from this individual entry;&lt;br /&gt;
*&#039;&#039;&#039;Launch the survey with this token:&#039;&#039;&#039; Used to execute a survey by using the generated token code; &lt;br /&gt;
*&#039;&#039;&#039;Send email invitation:&#039;&#039;&#039; Use this option to send an email invitation to the respective participant to complete the survey;&lt;br /&gt;
*&#039;&#039;&#039;Edit the survey participant:&#039;&#039;&#039; Click to change survey participant data;&lt;br /&gt;
*&#039;&#039;&#039;Delete survey participant:&#039;&#039;&#039; Click to delete that particular entry;&lt;br /&gt;
*&#039;&#039;&#039;View this person in the central participant database&#039;&#039;&#039;: An icon will be displayed if the respective entry can also be found in the central participant database.&lt;br /&gt;
&lt;br /&gt;
===Perform a specific action to more than one entry=== &amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
On the bottom-left part of the table, you will find the &#039;&#039;&#039;Selected participant(s)...&#039;&#039;&#039; button that allows you to perform certain actions at a macro level:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Display participants - participants actions.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Send email invitations:&#039;&#039;&#039; Send email invitations to the selected survey participants;&lt;br /&gt;
*&#039;&#039;&#039;Send email reminder:&#039;&#039;&#039; Send email reminders to the selected survey participants;&lt;br /&gt;
*&#039;&#039;&#039;Add participants to central database:&#039;&#039;&#039; To use some of the token entries in another survey, add the selected participants to the [[Central Participant Database|central participant database]]. From there, you have the option to add the participants to any survey you wish. For more details, continue reading the [[Central_Participant_Database#Share_this_participant|Share this participant]] wiki page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
{{Box|Before executing any of the functions mentioned above, do not forget to select the survey participants upon which the action will be performed.}}&lt;br /&gt;
&lt;br /&gt;
==Create...== &amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
To have more participants listed in the survey participants table, you can add new ones or import them from a CSV file or LDAP query. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey participants - Create....png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Add participant=== &amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
A typical token entry contains the following fields:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:token_editing2.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;ID:&#039;&#039;&#039; An integer that is automatically assigned to each survey participant;&lt;br /&gt;
*&#039;&#039;&#039;Completed?&#039;&#039;&#039;: Disabled by default. If enabled, it would contain the date when the survey was completed. No invitations or reminders are sent to the respective users if this is enabled. It is automatically enabled if the respective survey participant completed the survey using his or her assigned token code; &lt;br /&gt;
*&#039;&#039;&#039;First name:&#039;&#039;&#039; The first name of the survey participant;&lt;br /&gt;
*&#039;&#039;&#039;Last name:&#039;&#039;&#039; The last name of the survey participant;&lt;br /&gt;
*&#039;&#039;&#039;Token:&#039;&#039;&#039; This is the invitation code. It can be manually or automatically generated (via the &#039;&#039;&#039;Generate tokens&#039;&#039;&#039; button);&lt;br /&gt;
*&#039;&#039;&#039;Language:&#039;&#039;&#039; Here you can select the default language of the survey for the respective participant;&lt;br /&gt;
*&#039;&#039;&#039;Email:&#039;&#039;&#039; The email address of the participant;&lt;br /&gt;
*&#039;&#039;&#039;Email status:&#039;&#039;&#039; This field helps you track invalid email addresses. For instance, if the survey administrator received email error notifications from this email, then they can set this field to anything other than &amp;quot;OK&amp;quot; (for instance &amp;quot;user unknown&amp;quot; or &amp;quot;mailbox quota exceeded&amp;quot;). Marking this field with an email status other than &amp;quot;OK&amp;quot; will help skip this entry when sending invitation or reminder emails. Note that this is completely manual, unless you decide to implement a script which updates this field automatically;&lt;br /&gt;
*&#039;&#039;&#039;Invitation sent?:&#039;&#039;&#039; If enabled, contains the date when the invitation email was sent;&lt;br /&gt;
*&#039;&#039;&#039;Reminder sent?:&#039;&#039;&#039; If enabled, contains the date when the reminder email was sent;&lt;br /&gt;
*&#039;&#039;&#039;Uses left:&#039;&#039;&#039; Counts the number of times the token can be used. &#039;&#039;Note:&#039;&#039; When increasing this value (default = 1) for a user who has already filled out the survey (which sets uses left to 0), you also have to switch the &#039;&#039;&#039;Completed&#039;&#039;&#039; field from &amp;quot;Yes&amp;quot; to &amp;quot;No&amp;quot;;&lt;br /&gt;
*&#039;&#039;&#039;Valid from:&#039;&#039;&#039; &amp;amp; &#039;&#039;&#039;Until:&#039;&#039;&#039;You can set a date/time range for when this token can be used. You can leave these empty if you don&#039;t want to limit the participation time frame for certain users. If the user is answering the survey and the participation time ends, then the user is locked out immediately and won&#039;t be able to finish the survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
Note that the &#039;&#039;&#039;Add survey participant&#039;&#039;&#039; panel has two tabs: the &#039;&#039;&#039;General tab&#039;&#039;&#039; and the &#039;&#039;&#039;Additional attributes&#039;&#039;&#039; tab. The additional attributes tab offers you access to your custom attributes - read the following [[Survey participants#Manage attributes|wiki section]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Create dummy participants=== &amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
A dummy participant can be used when you do not want to send tokens by email to survey participants, but give them token codes by other means. For example, students doing class evaluations could be given a paper with an invitation code to be entered at the beginning of the online survey.  This way, the likelihood of receiving more responses and feedback increases.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
Click &#039;&#039;&#039;&#039;&#039;Create dummy participants&#039;&#039;&#039;&#039;&#039; and the following page will be displayed:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:172--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey participants - create a dummy participant.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:173--&amp;gt;&lt;br /&gt;
The &#039;&#039;Number of participants&#039;&#039; field allows you to enter the number of dummy participants you want to add to your survey participants table. The explanation of the other fields can be found in the [[Survey participants#Add participant|Add participant]] wiki subsection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:174--&amp;gt;&lt;br /&gt;
After completing the fields, press &#039;&#039;&#039;Save&#039;&#039;&#039; located in the upper-right part of the screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:175--&amp;gt;&lt;br /&gt;
To check whether they were added or not, check the Survey participants table:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:176--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Dummy variables - simple example.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Import participants from a CSV file=== &amp;lt;!--T:177--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
The import function allows you to import information from a [[Survey participants#Import participants from a CSV file|CSV file]] or [[Survey participants#Import participants from a LDAP query|LDAP query]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:survey participants - import csv.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Choose the CSV file to upload:&#039;&#039;&#039; Pick the CSV file you wish to import. To eliminate any possible errors, we recommend that you import a standard CSV (comma delimited) file with optional double quotes around values (default for OpenOffice and Excel). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:180--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The first line must contain the field names&#039;&#039;&#039;. It &amp;lt;u&amp;gt;must&amp;lt;/u&amp;gt; also contain the following fields: &#039;&#039;firstname, lastname, email&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
They have to contain at least one character. Simply adding double quotes and no characters between them will not work! &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:182--&amp;gt;&lt;br /&gt;
The other fields are optional: &#039;&#039;emailstatus, token, language, validfrom, validuntil, attribute_1, attribute_2, attribute_3, usesleft, ... .&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
{{Hint|Text=To obtain a full list of token field names, [[Survey participants#Export|export an existing survey participants table]].}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
{{Hint|Text=The date format for the &amp;quot;validfrom&amp;quot; and &amp;quot;validuntil&amp;quot; fields in the CSV token inport file is &amp;quot;YYYY-MM-DD HH:MM&amp;quot;.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:183--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Character set of the file:&#039;&#039;&#039; Select the option that fits the characters used in the CSV file;&lt;br /&gt;
*&#039;&#039;&#039;Separator used:&#039;&#039;&#039; You can let LimeSurvey automatically discover the used separator in your CSV or select either the &#039;&#039;comma&#039;&#039; separator or the &#039;&#039;semicolon&#039;&#039; one;&lt;br /&gt;
*&#039;&#039;&#039;Filter blank email addresses:&#039;&#039;&#039; If enabled, the survey participants without an email address will not be imported into your survey participants table;&lt;br /&gt;
*&#039;&#039;&#039;Allow invalid email addresses:&#039;&#039;&#039; If disabled, this function will look into the email addresses fields and check whether the addresses have the structure of an email or not (e.g.: a@a.net); &lt;br /&gt;
*&#039;&#039;&#039;Display attribute warnings:&#039;&#039;&#039; If enabled, after the importing process warnings will be displayed in case there is something wrong with the fields. For example. you might get an attribute warning if nothing is provided in any of the mandatory fields or if an email is incorrectly introduced in the CSV file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Filter duplicate records:&#039;&#039;&#039; If enabled, you can set which fields are used to identify duplicates. By default First name, Last name &amp;amp; Email-address are preselected. If a duplicate is found while importing, the related line is omitted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Duplicates are determined by:&#039;&#039;&#039; Select the fields that you want to filter on for duplicates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:128--&amp;gt;&lt;br /&gt;
You can also import customized attributes when importing a CSV file. You will have to define what attributes will be added. You can do it like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--T:251--&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;email,attribute_1 &amp;lt;Casenr&amp;gt;, token, attribute_2 &amp;lt;Title&amp;gt;, attribute_3 &amp;lt;destination&amp;gt;, lastname,firstname,attribute_4 &amp;lt;Sender&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:185--&amp;gt;&lt;br /&gt;
Once you are done choosing the desired importing settings, do not forget to click on the &#039;&#039;&#039;Upload&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Troubleshooting the import of survey participants==== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
A common error when users try to import tokens is an invalid CSV file. This is often caused by Microsoft Excel. Many users have a list of email addresses saved as an XLS document. A file can be saved as CSV in Excel.  However, depending on the locale of the OS, Microsoft Excel may use semi-colons (;) as comma separator, while a standard CSV file uses commas (,) as separators. If you do not know which one you use, open the file with a standard text editor and verify which separator was used. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
Recommended free raw text editors are: [http://www.pspad.com/ PSPad], [http://www.flos-freeware.ch/notepad2.html NotePad2] or [http://notepad-plus-plus.org/ Notepad++] for Windows, and [http://www.barebones.com/products/textwrangler/ TextWrangler] for Macintosh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:186--&amp;gt;&lt;br /&gt;
{{Box|LimeSurvey should also detect semicolons as separators. However, in case the import process is not properly working, replace the semicolons with commas. Double quotes should also be added around values.}}&lt;br /&gt;
&lt;br /&gt;
===Import participants from a LDAP query=== &amp;lt;!--T:187--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=This option is recommended only to those users with advanced knowledge in LDAP queries.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:189--&amp;gt;&lt;br /&gt;
This import function allows you to import information from a LDAP query (tested on openLdap, but should work in any LDAP compliant directory including ActiveDirectory). The following options are available on the &#039;&#039;Import survey participants from LDAP&#039;&#039; page:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:190--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Import survey participants from LDAP.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
* Queries are manually defined by the system administrator in the config-ldap.php file.&lt;br /&gt;
* Duplicates are identified by First Name, Last Name &amp;amp; Email-Address. If a duplicate is found while importing, the related line is omitted (unless you have unchecked the &#039;&#039;Filter Duplicates&#039;&#039; checkbox).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:191--&amp;gt;&lt;br /&gt;
{{Note|For more details about the LDAP settings in LimeSurvey, read the [[LDAP settings|following wiki page]].}}&lt;br /&gt;
&lt;br /&gt;
==Manage attributes== &amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:193--&amp;gt;&lt;br /&gt;
This option allows you to add/edit the additional fields of your survey participants table. The extra fields are used to store custom survey participants data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:194--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey participants - Add attributes.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:195--&amp;gt;&lt;br /&gt;
Type in the number of new attribute fields you want to add to your survey participants table. Click the &#039;&#039;&#039;Add fields&#039;&#039;&#039; button. The following page will be displayed:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:196--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:token_manage.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:197--&amp;gt;&lt;br /&gt;
The attribute fields table contains the following fields:&lt;br /&gt;
*&#039;&#039;&#039;Attribute field:&#039;&#039;&#039; The value typed here can be used when you want to perform different operations with the respective custom attribute field such as applying [[Setting conditions|conditions]] based on attribute fields or when exporting results for non-anonymous surveys.&lt;br /&gt;
*&#039;&#039;&#039;Field description:&#039;&#039;&#039; Used to replace the &#039;&#039;&#039;attribute field&#039;&#039;&#039; name. By giving a custom name to each attribute field, they will look nicer in the administration panel, when you browse tokens, when creating conditions based on attribute fields or when you export results for non-anonymous surveys.&lt;br /&gt;
*&#039;&#039;&#039;Mandatory?:&#039;&#039;&#039; If enabled, the respective attribute field must be filled in by the survey administrator. Otherwise, the respondent cannot be registered into the survey participants table.&lt;br /&gt;
*&#039;&#039;&#039;Show during registration?:&#039;&#039;&#039; If the survey participants have to register before completing a survey, certain details will be requested from them. If disabled, the respective attribute field won&#039;t appear on the survey registration page. &lt;br /&gt;
*&#039;&#039;&#039;Field caption:&#039;&#039;&#039; Use this fields to add more details about the role/usage of the respective attribute field.&lt;br /&gt;
*&#039;&#039;&#039;CPDB mapping:&#039;&#039;&#039; Maps the attribute in order to connect it to its corresponding attribute from the central participant database.&lt;br /&gt;
*&#039;&#039;&#039;Example data:&#039;&#039;&#039; Contains string examples from different fields. For example, if you want to ask for the gender of the survey participant, then you will see in the &#039;&#039;&#039;Example data&#039;&#039;&#039; field examples such as male, female, no answer etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:198--&amp;gt;&lt;br /&gt;
Once you have finished filling in the boxes, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the bottom-left part of the screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] Detailed instructions on how to add additional attribute fields and use conditions based on these values can be found on this blog post: &amp;quot;[http://www.limesurvey-consulting.com/limesurvey-conditions-based-on-token-attributes/ Conditions based on token attributes]&amp;quot;.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:199--&amp;gt;&lt;br /&gt;
To add more fields, go to the bottom of the page, and type in the &#039;&#039;&#039;Number of attribute fields to add&#039;&#039;&#039; box the desired number and click the &#039;&#039;&#039;Add fields&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:200--&amp;gt;&lt;br /&gt;
If you want to delete a custom attribute, go to the bottom of the page and select from the drop-down list situated under the &#039;&#039;&#039;Delete this attribute&#039;&#039;&#039; field the attribute you want to delete. Once selected, click &#039;&#039;&#039;Delete attribute&#039;&#039;&#039; and confirm the deletion.&lt;br /&gt;
&lt;br /&gt;
==Export== &amp;lt;!--T:201--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:202--&amp;gt;&lt;br /&gt;
To export a survey participants table, click the &amp;quot;Export&amp;quot; button located on the token management tools toolbar. Before exporting the survey participants list, select the desired export options.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:203--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey participants - export.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:204--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Survey status:&#039;&#039;&#039;&lt;br /&gt;
**&#039;&#039;All tokens:&#039;&#039; Exports all survey participants from the survey participants table;&lt;br /&gt;
**&#039;&#039;Completed:&#039;&#039; Exports only those survey participants that have completed the survey;&lt;br /&gt;
**&#039;&#039;Not completed:&#039;&#039; Exports survey participants that have not yet completed the survey;&lt;br /&gt;
**&#039;&#039;Not started:&#039;&#039; Exports the survey participants that have not yet started the survey;&lt;br /&gt;
**&#039;&#039;Started but not yet completed:&#039;&#039; Exports survey participants that have already started the survey, but have not completed it.&lt;br /&gt;
*&#039;&#039;&#039;Invitation status:&#039;&#039;&#039; Exports participants according to the invitation status: &#039;&#039;all&#039;&#039;, &#039;&#039;invited&#039;&#039;, and &#039;&#039;not invited&#039;&#039;;&lt;br /&gt;
*&#039;&#039;&#039;Reminder status:&#039;&#039;&#039; Exports participants according to the reminder status: &#039;&#039;all&#039;&#039;, &#039;&#039;Reminder(s) sent&#039;&#039;, &#039;&#039;No reminder(s) sent&#039;&#039;;&lt;br /&gt;
*&#039;&#039;&#039;Filter by language:&#039;&#039;&#039; When you create a survey, you can add additional languages besides the base language. Those additional languages can be used to export survey participants according to the language they are assigned to; &lt;br /&gt;
*&#039;&#039;&#039;Filter by email address:&#039;&#039;&#039; Exports entries which contain the string in the respective email address. For example, you can use it if some of your survey participants use the work email addresses from &amp;quot;Company A&amp;quot;. Type &#039;&#039;@companya.com&#039;&#039; and export only the users that have received a work email address from the respective company;&lt;br /&gt;
*&#039;&#039;&#039;Delete exported participants:&#039;&#039;&#039; If enabled, the exported users will be deleted from your survey participants table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
Once you have selected the exporting options, click the &#039;&#039;&#039;Download CSV file&#039;&#039;&#039; button located in the upper right part of the screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&lt;br /&gt;
When you export your survey participants, the fields are exported in the following order:&lt;br /&gt;
&amp;lt;code&amp;gt;tid,firstname,lastname,email,emailstatus,token,language code,attribute_1,attribute_2,...&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Invitations &amp;amp; reminders== &amp;lt;!--T:206--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:207--&amp;gt;&lt;br /&gt;
&#039;&#039;Invitations &amp;amp; Reminders&#039;&#039; allows you to manage the LimeSurvey invitations system. You can send invitations or reminders to participants displayed in your [[Survey participants#Display participants|survey participants table]]. An [[Email bounce tracking system|email bounce tracking system]] can be used to help you track and mark the emails that were not delivered to the recipients (survey participants).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Send email invitation=== &amp;lt;!--T:208--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:209--&amp;gt;&lt;br /&gt;
From the survey participants table you can send email invitations in bulk to all participants who have not been sent one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:token-invite.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
You can skip survey participants who have an email status that is not &amp;quot;OK&amp;quot; by enabling the &#039;&#039;&#039;Bypass token with failing email addresses&#039;&#039;&#039; option.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:210--&amp;gt;&lt;br /&gt;
To overcome the [[Survey_participants#Add_participant|validity settings]] of all of your entries, enable the &#039;&#039;&#039;Bypass date control before sending email&#039;&#039;&#039; function. This way, the LimeSurvey email function will not take into account the date/time range when a token would be allowed to be used. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Resending invitations==== &amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
Use this functionality to send invitations again to certain survey participants. When you use the &#039;&#039;&#039;send invitations&#039;&#039;&#039; function, only an email address that &#039;&#039;has not previously received an invitation&#039;&#039; will get one. This means that if you add new email addresses to the survey participants list after the first invitations are sent, only these new addresses will receive an invitation the second time you send invitations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
This means that you can also edit an email address in a particular table entry that you received a bounced email from and then send it only to this edited address. Do this by turning off the &#039;&#039;&#039;Invitation sent&#039;&#039;&#039; field and then click &#039;&#039;&#039;send invitations&#039;&#039;&#039; again.&lt;br /&gt;
&lt;br /&gt;
===Send email reminder=== &amp;lt;!--T:211--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:212--&amp;gt;&lt;br /&gt;
Sends bulk email reminders to all participants from the survey participants table who have not yet responded, but have been sent their first invitation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:token-remind.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
When sending reminders you can:&lt;br /&gt;
* &#039;&#039;&#039;Bypass tokens with failing email addresses:&#039;&#039;&#039; those entries with a failing email address will be skipped - they will not receive an email;&lt;br /&gt;
* &#039;&#039;&#039;Min days between reminders:&#039;&#039;&#039; skip tokens if a reminder has been &amp;quot;recently&amp;quot; sent;&lt;br /&gt;
* &#039;&#039;&#039;Max reminders:&#039;&#039;&#039; skip tokens if a given number of reminders have already been sent;&lt;br /&gt;
* &#039;&#039;&#039;Bypass date control before sending email:&#039;&#039;&#039; skip those entries that are not within the time-frame that they can be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; A reminder will be sent only to those participants where the &amp;quot;Completed&amp;quot; field is turned off (this means the respondent has either not taken or completed the survey).&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Sending emails by batch==== &amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
When sending a large number of emails at the same time, LimeSurvey will only send the first batch of N emails (this threshold is set by the administrator from the [[Global settings#Email settings|email settings]], located in the global settings of your LimeSurvey installation).&lt;br /&gt;
&lt;br /&gt;
=== Confirmation email=== &amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
If you are using tokens and a participant fills out the survey, a confirmation email is sent to their email address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
If you do not want this message sent, deactivate this functionality from [[Participant settings|the general settings of your survey]].&lt;br /&gt;
&lt;br /&gt;
==Start bounce processing== &amp;lt;!--T:213--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:214--&amp;gt;&lt;br /&gt;
When sending an email, the LimeSurvey email bounce tracking system automatically adds a survey-id and token-id to the mail header. These &amp;quot;custom headers&amp;quot; are added to each invitation email that is sent through your LimeSurvey installation to survey participants. When the email is bounced back, the original header along with the &amp;quot;&#039;&#039;Delivery notification&#039;&#039;&amp;quot; header is received. The system then checks for new emails and parses the emails that have these custom headers and marks the wrong email address in the survey participants table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Bounce settings=== &amp;lt;!--T:215--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:216--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Bounce settings&#039;&#039;&#039; options:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:217--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:surveyBounseSettings.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:218--&amp;gt;&lt;br /&gt;
For a short description of each field, check [[Global settings#Bounce settings|the following wiki section]]. To use the LimeSurvey installation &#039;&#039;Global settings&#039;&#039;, go to &#039;&#039;&#039;Used bounce settings&#039;&#039;&#039; and select the &#039;&#039;&#039;Use global settings&#039;&#039;&#039; option. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:219--&amp;gt;&lt;br /&gt;
{{Note|For more in-depth explanations, check our wiki on [[Email bounce tracking system|email bounce tracking system]].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
Click the [[Email_bounce_tracking_system#Setting_up_the_system|following link]] for more information on how to correctly configure this feature.&lt;br /&gt;
&lt;br /&gt;
==Edit email templates== &amp;lt;!--T:220--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:221--&amp;gt;&lt;br /&gt;
To find out more about what placeholders you can use or how you can edit the LimeSurvey email templates, read our wiki section on [[Email templates|email templates]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Generate tokens== &amp;lt;!--T:222--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:223--&amp;gt;&lt;br /&gt;
With the help of this function, unique tokens can be created for all the individual entries from the survey participants table that have not yet received a token code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:224--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey participants - Generate tokens.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==View in CPDB== &amp;lt;!--T:225--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:226--&amp;gt;&lt;br /&gt;
The last option on the tokens management toolbar is the &#039;&#039;&#039;View in CPDB&#039;&#039;&#039; option. This allows the survey administrator to see the participants that exist in both the central participant database and the survey participants list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:227--&amp;gt;&lt;br /&gt;
In the following example, we have the following survey participants list:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:228--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey participants list - view in cpdb.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:229--&amp;gt;&lt;br /&gt;
The users with ID 1 and 2 have been shared from the central participant database. To check this, go to the survey participants table management toolbar and click &#039;&#039;&#039;View in CPDB&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:230--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:View in CPDB - filters.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:231--&amp;gt;&lt;br /&gt;
As you can see, the &#039;&#039;&#039;View in CPDB&#039;&#039;&#039; function basically applies a filter to determine which users from the CPDB are present in the respective survey.&lt;br /&gt;
&lt;br /&gt;
=Delete table= &amp;lt;!--T:232--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:233--&amp;gt;&lt;br /&gt;
To delete your survey participants table, click the &#039;&#039;&#039;Display participants&#039;&#039;&#039; button and look for the &#039;&#039;&#039;Delete participants table&#039;&#039;&#039; button located in the upper-right part of the screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:234--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Delete survey participants table.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:235--&amp;gt;&lt;br /&gt;
A window will pop up, asking for the final confirmation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:236--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Confirmation - delete survey participants table.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:237--&amp;gt;&lt;br /&gt;
Please note that this will not delete the table from your LimeSurvey installation. A backup will be created. In order to access it, you need system administrator rights. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:238--&amp;gt;&lt;br /&gt;
If you do wish to completely remove it, use the [[Check data integrity|check data integrity]] option that is located in the &#039;&#039;&#039;Configuration&#039;&#039;&#039; dialog.&lt;br /&gt;
&lt;br /&gt;
=Additional hints &amp;amp; tips= &amp;lt;!--T:131--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:239--&amp;gt;&lt;br /&gt;
Feel free to add any hints and tips to the list below. The ones listed were posted by members of our community:&lt;br /&gt;
*[[Survey participants#Allowing public registration|Allowing public registration]]&lt;br /&gt;
*[[Survey participants#Captchas in public registration|Captchas in public registration]]&lt;br /&gt;
*[[Survey participants#Can a survey using tokens ensure anonymous responses?|Can a survey using tokens ensure anonymous responses?]]&lt;br /&gt;
*[[Survey participants#A tip for generating a large number of fake e-mail addresses|A tip for generating a large number of fake e-mail addresses]]&lt;br /&gt;
*[[Survey participants#Spam problems|Spam problems]]&lt;br /&gt;
*[[Survey participants#Pseudonymised participation|Pseudonymised participation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Allowing public registration== &amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
You can also open your survey to the public by utilizing the type of respondent control available when using tokens. To do this, initialize your survey participants table and choose to [[Participant settings|allow public registration]] in the main survey setup.  People who visit your survey&#039;s URL without a token will be given the opportunity to register.  (This setting can be later changed from the [[Participant settings|participant settings]] section that is located in the settings menu of the survey). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:240--&amp;gt;&lt;br /&gt;
If a participant provides an email address that is not already in the current database, an entry in the survey participants table will be created and they will be emailed an invitation containing their unique token code. All tokens provided to &amp;quot;registering&amp;quot; visitors will begin with the letter &amp;quot;&#039;&#039;&#039;R&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==CAPTCHAs in public registration== &amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
To protect your survey from robot registrations, a CAPTCHA feature can be activated for all the registration, save, and load forms. For more details, read our wiki on [[Participant settings|participant settings]].&lt;br /&gt;
&lt;br /&gt;
==Can a survey using tokens ensure anonymous responses?== &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Yes&#039;&#039;&#039;, tokens can be used both for anonymous and non-anonymous surveys. This is determined when creating a survey. If a survey is not anonymous (or &#039;tracked&#039;) then the token list can be used to find the responses that an individual has made to the survey. If the survey is anonymous, then no link (technically: foreign key relationship) is available between the respondents from the survey participants table and their corresponding answers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:241--&amp;gt;&lt;br /&gt;
To enable or disable anonymized responses, check the [[Participant settings|participant settings]] wiki section.&lt;br /&gt;
&lt;br /&gt;
==A Tip for generating a large number of fake e-mail addresses== &amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
Sometimes you may need a large number of fake e-mail addresses and tokens. You can use functions in a spreadsheet (e.g. OpenOffice Calc) to generate them. Let&#039;s assume you want thousands of addresses in a form: 1@test.com, 2@test.com, 3@test.com, and so on. Type &amp;quot;1&amp;quot; in A1. Insert function =A1+1 in A2, then copy A2 down as many times as you need so that you obtain a list of consecutive numbers. In B1 use the concatenation function to join A1 and &amp;quot;@test.com&amp;quot;, which is &#039;&#039;=CONCATENATE(A1;&amp;quot;@test.com&amp;quot;)&#039;&#039;. Then copy B1 down so that each A cell has a correspondent (you can also generate similarly fake names). Finally, save the file as CSV in order to import it to LimeSurvey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
With the launch of LimeSurvey 1.91, you can use the &amp;quot;Generate dummy token&amp;quot; functionality. However, the dummy entries do not contain any email address.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Spam problems== &amp;lt;!--T:242--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
Users often complain about not receiving invitations or reminder emails because their email spam filters identified the message from LimeSurvey as spam.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
The fact that an email is treated as spam depends mostly on the spam filter being used and its settings. A spam filter usually checks the sender address, and the email subject and content. Changing its settings could solve the way in which the users&#039; email providers treat the messages from LimeSurvey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
Some possible issues and solutions are listed in the following [https://www.survey-consulting.com/how-to-prevent-limesurvey-email-invitations-or-reminders-being-treated-as-spam/ Limesurvey Consulting blog post].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
LimeSurvey automatically tries to determine the URL for the invitation link by looking at the URL that you logged into the LimeSurvey administration with. However, with some server (mis)configurations this might not work properly and you will have to set this manually.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
You can edit &amp;quot;application/config/config.php&amp;quot; to change the default base URL value. Add a &#039;&#039;hostInfo&#039;&#039; property, as shown below, to the existing &#039;components&#039; array.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;    &#039;components&#039; =&amp;gt; array(&lt;br /&gt;
       ...&lt;br /&gt;
       &#039;config&#039; =&amp;gt; array(&lt;br /&gt;
           .......&lt;br /&gt;
           &#039;publicurl&#039; =&amp;gt; &#039;http://www.example.com&#039;,&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:243--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]]For more details on how to edit the configuration file of your LimeSurvey installation, read our wiki on [[Optional settings|LimeSurvey optional settings]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
Regarding the source of the problem, LimeSurvey tried to determine the domain from the server PHP variable: $_SERVER&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&#039;HTTP_HOST&#039;] or $_SERVER&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&#039;SERVER_NAME&#039;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
Some web server software do not properly seem to provide this information or are misconfigured.&lt;br /&gt;
&lt;br /&gt;
==Pseudonymised participation== &amp;lt;!--T:244--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:245--&amp;gt;&lt;br /&gt;
With the dummy tokens, you may create a form of pseudonymised participation by exporting the created dummy tokens and then combining them with your participant list externally. That way, LimeSurvey can be used as a survey platform without putting personal information of your participants into the system. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:246--&amp;gt;&lt;br /&gt;
The only downside is that you will have to distribute the participation tokens yourself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Survey_quotas&amp;diff=175450</id>
		<title>Survey quotas</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Survey_quotas&amp;diff=175450"/>
		<updated>2022-12-15T12:18:11Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Better set expiry date then deactivate&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;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
A quota is used to set a limit on responses from defined groups of people on an active survey. Some common attributes used in defining quotas are gender, age, race, province/state, etc.  To access the survey quotas panel, from the &#039;&#039;&#039;Settings&#039;&#039;&#039; &#039;&#039;Survey menu&#039;&#039;, select the survey &#039;&#039;&#039;Quotas&#039;&#039;&#039; tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey menu - Survey quotas.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text= You can only verify that Quotas have been set correctly when the survey is activated. So, if you set a quota with a limit of &amp;quot;0&amp;quot; and the survey is not activated, you will not be able to check whether it is working or not.}}&lt;br /&gt;
&lt;br /&gt;
=How do quotas work?= &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
To understand how the LimeSurvey quota system works, think of a survey that contains a &amp;quot;Yes or No&amp;quot; question and an Array question, each of them belonging to two different question groups. You set a quota on this survey that contains a restriction of 20 users who have answered &amp;quot;Yes&amp;quot; to this question. The quota will be checked every time someone answers &amp;quot;Yes&amp;quot; to that question. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Depending on [[General_settings#General_settings_panel|the format of your survey]] (how the questions are displayed to your participants), the &#039;&#039;&#039;check&#039;&#039;&#039; happens either when you submit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;the whole survey answers at once:&#039;&#039;&#039; If the format of the survey is &#039;&#039;all in one&#039;&#039;, the questions (regardless of the question group they belong to) will be displayed on the same page. Therefore, the user has to click the submit button in order to trigger the quota limit check;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;the answers to a question group:&#039;&#039;&#039; If the format of the survey is group by group, then the quota is activated when the survey participant has responded to all the questions that belong to the question group where the answer that contains the quota system check is located.  Therefore, the quota may be triggered before the end of the survey if, for example, the question group is located in the beginning of the survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;the answer to a question:&#039;&#039;&#039; If the format of the survey is question by question, each question will be displayed separately, each of them being allocated a page. In this case, if you select the answer that the quota is applied to, the quota system will be automatically triggered once you click the &#039;&#039;Next/Submit&#039;&#039; button. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
{{Note|To change the format of a survey, access the [[General settings|general settings of your survey]].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
If &amp;quot;&#039;&#039;No&#039;&#039;&amp;quot; is chosen, the quota system is not triggered. Therefore, the survey will not restrict anyone from responding to the rest of the questions, unless otherwise specified. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
To set a limit on the number of &amp;quot;&#039;&#039;No&#039;&#039;&amp;quot; responses, you need to add an additional quota, restricting the number of participants who choose &amp;quot;&#039;&#039;No&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like your participants to answer certain survey questions according to a previous answer, use the LimeSurvey [[ExpressionScript - Presentation|ExpressionScript]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using more answers and quotas== &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;: You want to conduct a survey where you want to limit it to 25 male and 30 female participants. In this case, you will have to apply two quota limits: one on males and one on females. This will give you a maximum of 25 males who can complete the survey, and a maximum of 30 females who can complete the survey..&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
Let&#039;s suppose now that you want 50 answers from males and 50 answers from females. Please note that each answer that triggers the quota must be introduced in its own quota box. Adding the two answers in the same box will result in collecting 50 answers, regardless of the respondents&#039; gender distribution (e.g., the distribution can be 40 males and 10 females, or 20 males and 30 females, and so on). Continue reading this wiki page and see the [[Survey quotas#Examples|examples]] subsection get a grasp on the usage of the quota system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Activating the quota system while the survey responses table is not empty== &amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
Note that a quota system does not necessarily have to be added before you activate your survey. If you decide to activate the quota system at a later date, it will start to check the survey responses table and look for those entries that are marked as &#039;&#039;complete&#039;&#039;. Then, it checks to determine if the quota condition has been met or not. If it has been met, the next survey responses/entries received will be marked as &#039;&#039;incomplete&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
For example, if you have previously gathered 1000 responses from women and you introduced after a couple of weeks the quota limit of 800 for women, the next responses that you receive from women will be marked &#039;&#039;incomplete&#039;&#039;. The other 200 answers will appear in the survey responses table as &#039;&#039;complete&#039;&#039; because the quota was applied after the answers were collected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey_quotas_-_survey_responses_2.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
The quota system does not store any answers and it does not record the number of the submitted survey answers! Think of it as a filter that is applied on the survey responses table. Basically, it looks into the &#039;&#039;&#039;completed&#039;&#039;&#039; column and those question columns that contain the answers to which one or more quotas are applied to.&lt;br /&gt;
&lt;br /&gt;
=Supported question types= &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
The quota system can be applied only to the following types of questions at the moment:&lt;br /&gt;
*Gender&lt;br /&gt;
*Multiple Choice&lt;br /&gt;
*Array - 5 Point Choice&lt;br /&gt;
*Array - 10 Point Choice&lt;br /&gt;
*Language Switch&lt;br /&gt;
*Yes/No&lt;br /&gt;
*List (Radio)&lt;br /&gt;
*List (Dropdown)&lt;br /&gt;
*List with comments&lt;br /&gt;
*Equation&lt;br /&gt;
&lt;br /&gt;
=Survey quotas panel= &amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
Once you click the &#039;&#039;&#039;Survey quotas&#039;&#039;&#039; tab from the survey menu, the following page will be displayed:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[FIle:Survey quotas - panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
To see the full set of options of this panel, add one survey quota. Then, the survey quota page will look like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey quotas - image 2.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
The following options are available:&lt;br /&gt;
*&#039;&#039;&#039;[[Survey quotas#Quick CSV report|Add new quota]]:&#039;&#039;&#039; Located on the bottom right part of the survey quotas table, it allows users to add new quotas. Once quotas are displayed on the table, you can start implementing them to certain questions/subquestions answers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;[[Survey quotas#Add an answer|Add an answer]]:&#039;&#039;&#039; Before adding an answer, you need to add a quota where the answer(s) will be stored in. The quota limit will be applied &amp;lt;u&amp;gt;only&amp;lt;/u&amp;gt; to those answers displayed in the quota box.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Edit quota:&#039;&#039;&#039; Click the green pencil located under the &#039;&#039;&#039;Action&#039;&#039;&#039; column of the survey quotas table to edit the fields of a quota&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Delete quota:&#039;&#039;&#039; Click the red trash button located under the &#039;&#039;&#039;Action&#039;&#039;&#039; column of the survey quotas table to delete the respective quota entry;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;[[Survey quotas#Quota validation|Quota validation]]:&#039;&#039;&#039; Click the last button located under the &#039;&#039;&#039;Action&#039;&#039;&#039; column of the survey quotas table to quickly check the quota message displayed to the respondents, the URL (and/or a short description of it) where they will be redirected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;[[Survey quotas#Quick CSV report|Quick CSV report]]:&#039;&#039;&#039; Exports a summary of the quotas under the form of a comma-delimited CSV table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Selected quota(s)...:&#039;&#039;&#039; Works like an aggregator. Select multiple quotas and use this button to apply one of the actions described below to the selected group of quotas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey quotas - Selected quota(s).png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
**&#039;&#039;Activate:&#039;&#039; Use this button to activate a quota. The active ones have the quota name, action, and URL written in white font on a green background. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Active quota.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
**&#039;&#039;Deactivate:&#039;&#039; Use this button to deactivate a quota. The deactivated ones have the quota name, action, and URL written in black font on a grey background.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Deactivated quota.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
**&#039;&#039;Change texts:&#039;&#039; Use this button to quickly change the quota message, URL, and URL description of a group of a quotas. You may use this function to redirect respondents to a certain link once different quota conditions were met. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey quotas - change texts.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
**&#039;&#039;Delete:&#039;&#039; If you want to delete a group of quotas by a few clicks, tick the ones you want to delete, click the selected quota(s) button, and select the &#039;&#039;&#039;Delete&#039;&#039;&#039; option.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Add new quota== &amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For a fully working quota you must first &amp;quot;add a quota&amp;quot;, and then &amp;quot;add answers&amp;quot; to that quota.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Once you click the &#039;&#039;&#039;Add new quota&#039;&#039;&#039; button, the following page will be displayed:  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Add_new_quota_panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
{{Note|The fields marked with a star are required fields.}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
The following options are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Quota Name:&#039;&#039;&#039; The name of the quota that will be displayed on the survey quotas table. It should describe the quota it will represent.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Quota Limit:&#039;&#039;&#039; The maximum number of completed surveys that will be stored in the responses table and marked as &#039;&#039;complete&#039;&#039;. See above the wiki section on [[Survey_quotas#How do quotas work|how do quotas work]] to better understand the mechanism employed by LimeSurvey. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Quota Action:&#039;&#039;&#039; If the quota is triggered, then one of two actions will happen: &lt;br /&gt;
**&#039;&#039;Terminate survey:&#039;&#039; This action immediately terminates and closes the survey.&lt;br /&gt;
**&#039;&#039;Allow user to modify his last answers before terminate survey:&#039;&#039;  Useful action when you want your participants to choose different options. In this way, you can force some of them choose another solution or option. For example, when incentives are offered, you can use a quota on each option so that not everyone chooses the same incentive. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Autoload URL:&#039;&#039;&#039; This tells LimeSurvey to automatically redirect the participant to the URL when the quota action occurs. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Quota Message:&#039;&#039;&#039; Write the text you want to be displayed to participants if the quota action is triggered. The message will be displayed if the &#039;&#039;&#039;Autoload URL&#039;&#039;&#039; is disabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;URL:&#039;&#039;&#039; The URL displayed to survey participants after the quota action is triggered. The users can also be automatically redirected to this URL if &amp;quot;Autoload URL&amp;quot; is enabled. You can use [[URL fields]] in this section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;URL Description:&#039;&#039;&#039; A short URL description can be added in order to show to the other survey administrators the purpose of the URL for example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Add an answer=== &amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
Once the quota has been created, you can start adding answers. To add answers, access the Survey quotas panel. Look into the survey quotas table and select the &#039;&#039;&#039;Add answer&#039;&#039;&#039; option from the quota box that you want to add the respective answer to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey quotas table - add answer.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
A new page will be displayed asking you to select the question the quota will be applied to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Add answer - part 1.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
{{Box|Please remember that only certain types of questions accept quotas. [[Survey quotas#Supported question types|Click here]] to revisit the supported question types list.}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
Click &#039;&#039;&#039;Next&#039;&#039;&#039;.  The answers of the question you selected one step before will be displayed. Now, you have to choose which answer you want the quota to be applied to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Add answer - part 2.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
In this example, the &amp;quot;&#039;&#039;Male&#039;&#039;&amp;quot; answer will have the quota applied to it. Whenever participants choose this option, the quota system registers the answer. Once the quota limit is reached, the stored survey answers will be saved in the survey responses table, but it will be marked &#039;incomplete&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Quick CSV report== &amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
The quick CSV report function is used to export the survey quotas table in a comma-delimited CSV file. It includes the following fields: &lt;br /&gt;
*&#039;&#039;&#039;Quota name:&#039;&#039;&#039; The name of the quotas;&lt;br /&gt;
*&#039;&#039;&#039;Limit&#039;&#039;&#039;: If the quota is active, it represents the maximum number of survey responses that can be marked as &#039;&#039;complete&#039;&#039; in the survey responses table;&lt;br /&gt;
*&#039;&#039;&#039;Completed:&#039;&#039;&#039; The number of survey answers marked as &#039;&#039;complete&#039;&#039; in the survey responses table. Please note that an answer is marked as &#039;&#039;incomplete&#039;&#039; if the quota is triggered.&lt;br /&gt;
*&#039;&#039;&#039;Remaining:&#039;&#039;&#039; The number of answers that can still be collected in the survey responses table and marked as &#039;&#039;complete&#039;&#039; there.&lt;br /&gt;
&lt;br /&gt;
=Quota and tokens= &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
When tokens are used in a survey and a participant is &#039;&#039;screened out&#039;&#039; due to a quota, then the respective token entry from the survey responses table is marked with the letter &amp;quot;Q&amp;quot; in the &#039;&#039;&#039;completed&#039;&#039;&#039; column from the survey responses table. The token is invalidated in this way and the survey participant cannot restart the survey.&lt;br /&gt;
&lt;br /&gt;
=Examples= &amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
The following examples are used to better explain the role of quotas and their usage within the LimeSurvey environment. Before viewing the following examples, please take into account that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
*Answers added in the same quota are summed up. For example, if answers A and B from the available responses of a survey question are added to quota Q1, the quota limit &#039;&#039;&#039;sums up&#039;&#039;&#039; the number of users who pick up A and B as their answers. Therefore, there is a high probability that the distribution of A and B answers will be uneven (dependent on the characteristics or preferences of your respondents). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
*Answers added in different quotas act as if there is a logical operator &amp;quot;AND&amp;quot; between them. Let&#039;s suppose that A is added to Q1 and B to Q2. If A is chosen and Q1 is reached, then respondents won&#039;t get their answers marked &#039;&#039;complete&#039;&#039; in the survey responses table. However, the survey participants that choose B are still allowed to continue as long as Q2 is not reached. Once it is reached, participants who further choose A or B as answers to that specific question will have their answers marked &#039;&#039;incomplete&#039;&#039; in the survey responses table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey quotas - survey responses.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding more answers to different quotas== &amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
Let&#039;s assume that you are doing a survey about LimeSurvey and you would like to receive feedback from your participants. You would like to receive 1000 answers from students (PhD student, graduate, undergraduate) and another 1000 from non-students (unemployed persons, full/part-time working persons or other). In order to do this, create two quotas: &#039;&#039;&#039;Students quota&#039;&#039;&#039; and &#039;&#039;&#039;Non-students quota&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey quotas - example - add survey quotas.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
Now, start adding answers to each quota box following the steps described above in the [[Survey quotas#Add an answer|wiki section]]. The quota boxes should look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Survey quotas - example - add answers.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
By using this method, you limit the number of responses you receive from the two defined groups: students and non-student groups. Now, activate the survey and start testing the quotas. If you first reach 1000 answers from the &#039;&#039;&#039;non-students&#039;&#039;&#039; group, the next answers you receive from this category will be marked as &#039;incomplete&#039;&#039; in the survey responses table. Only answers that come from the students group will still be accepted. Once it also reaches 1000, no more answers will be registered as &#039;&#039;complete&#039;&#039; in the survey responses table. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
{{Box|However, the survey can still be accessed by the participants! Set an expiry date (e.g. yesterday) once you see that the quota limit has been reached.}}&lt;br /&gt;
&lt;br /&gt;
==Adding a URL link== &amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
To add a URL link to a quota, please continue reading the [[URL fields|URL fields]] wiki section.&lt;br /&gt;
&lt;br /&gt;
==Using of equation question for quota in other question type== &amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
You can use [[Question_type_-_Equation|Equation Question]] to set a value to [[Survey_quotas#Supported_question_types|supported question types]] and [[Expression_Manager#Using_Assignment_Operator|assignment operator]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
The 2 question can be hidden, quota is checked if all question are hidden or when one question is in submitted page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
For example , to set a quota to a text question (user write ok or not) on a Y/N question: &amp;lt;code&amp;gt;{QuotaQuestion=if(strtolower(Q00.NAOK) == &#039;ok&#039;, &#039;Y&#039;, &#039;N&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
[[File:QuotaEquation.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
You can import and activate this sample survey [[File:Limesurvey_survey_quotaEquationAndOptOut.zip]] (remember to unzip the file and activate the survey).&lt;br /&gt;
&lt;br /&gt;
==Limiting max number of responses in survey using a hidden question== &amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
Like using an equation to set a value to an answer, quota for default values are checked if a question is hidden. This allows you to set a maximum number of response in a specific survey. You put a quota on the default answer in a hidden question and put this question in a simple group.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
You can import and activate this sample survey [[File:Quota_by_default_value_sample_survey.zip]] (remember to unzip the file and activate the survey).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174429</id>
		<title>Email templates/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174429"/>
		<updated>2022-09-14T11:00:54Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;Klicken Sie auf die Registerkarte „Registrierung“, um Details dieser Email zu bearbeiten. Sie können verschiedene Email-Platzhalter...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Einleitung=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen werden verwendet um Teilnehmern personalisierte Einladungen, Bestätigungen und Erinnerungen per E-Mail zu schicken. Dies ist von der Umfrageteilnehmerverwaltung aus möglich. Sie können hier auch die Basis und die ausführliche Admin-Benachrichtigung an den Umfrageadministrator anpassen.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Um zur Einstellungsansicht zu kommen, öffnen Sie den Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; und klicken Sie auf den &#039;&#039;&#039;E-Mail Vorlagen&#039;&#039;&#039; Menüpunkt.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] Wenn Sie Superadministratorprivilegien haben  (wenn Sie Zugriff auf die [[Globale Einstellungen| globalen Einstellungen Ihrer LimeSurvey Installation]]), können Sie den Standard HTML-Editor für all Ihre LimeSurvey Nutzer einstellen. Weitere Informationen hierzu bekommen Sie [[Global_settings#General|in diesem Artikel]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=WEnn Sie den HTML editor nutzen möchten, vergessen Sie nicht &#039;&#039;&#039;Benutze HTML-Format für Einladungs-E-Mails&#039;&#039;&#039; zu aktivieren. Diese Einstellung finden Sie im Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; in Ihrer Umfrage, unter dem Punkt [[Teilnehmereinstellungen]].}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=E-mail Vorlagen Ansicht=&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen Ansicht sieht so aus:&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Email templates panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie in dem Screenshot zu sehen ist, wird der &amp;quot;HTML Quellcode&amp;quot; Editormodus genutzt. Diesen können Sie in Ihren  [[First_login_-_your_user_preferences#HTML_editor_mode| persönlichen Einstellungen]] ändern.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Note|Um möglichst einfach mit den Textfeldern zu arbeiten, gehen Sie in Ihre Profileinstellungen und ändern den HTML Editor Modus zu  &#039;&#039;inline HTML Editor&#039;&#039;.}}&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie Sie sehen können gibt es fünf Typen von E-Mails deren Vorlagen Sie bearbeiten können:&lt;br /&gt;
*[[Email templates#Invitation|Einladung]]&lt;br /&gt;
*[[Email templates#Reminder|Erinnerung]]&lt;br /&gt;
*[[Email templates#Confirmation|Bestätigung]]&lt;br /&gt;
*[[Email templates#Registration|Registierung]]&lt;br /&gt;
*[[Email templates#Basic &amp;amp; detailed admin notifications|Basis &amp;amp; Ausführliche  Admin Benachrichtigung]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Einladung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Das Einladungssystem ist nützlich, wenn Sie E-Mails in großen Mengen an alle Befragten aus Ihrer [[Survey participants/de#E-Mail-Einladung senden|Umfrageteilnehmertabelle]] senden möchten, die noch keine Einladung zum Ausfüllen Ihrer Umfrage erhalten haben.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Im Bereich E-Mail-Vorlagen können Sie die Nachricht bearbeiten, die diese Umfrageteilnehmer erreicht. Lesen Sie den folgenden Abschnitt [[Email templates/de#E-Mail-Platzhalter|Wiki-Unterabschnitt]], um zu überprüfen, welche E-Mail-Platzhalter verwendet werden können. Sie können auch [[ExpressionScript - Presentation/de|ExpressionScript]] verwenden, um die Anpassung Ihrer Einladungs-E-Mail-Vorlage zu verbessern.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Erinnerung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die [[Survey_participants#Send_email_reminder|Teilnehmer aus der Umfrageteilnehmertabelle]] an die Beantwortung der Umfrage zu erinnern.&lt;br /&gt;
&lt;br /&gt;
You can edit the default format of the reminder email from the &#039;&#039;Email templates panel&#039;&#039;.  To verify which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. The [[ExpressionScript - Presentation|ExpressionScript]] can help you customize the text body of this email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hinweis:&#039;&#039;&#039; Eine Erinnerung wird nur an diejenigen Teilnehmer in der [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]] verschickt, bei denen das Feld „Abgeschlossen“ noch leer ist. Dies bedeutet, dass der Befragte entweder noch gar nicht an der Umfrage teilgenommen oder sie zumindest noch nicht abgeschlossen hat.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bestätigung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wenn Zugangsschlüssel verwendet werden und ein Teilnehmer die Umfrage ausfüllt, wird eine Bestätigungs-Email an seine Email-Adresse gesendet. Sie können diese Funktion im Bereich [[Teilnehmereinstellungen]] deaktivieren.&lt;br /&gt;
&lt;br /&gt;
Klicken Sie auf die Registerkarte &#039;&#039;&#039;Bestätigung&#039;&#039;&#039;, wenn Sie die Email-Vorlage bearbeiten möchten. Überprüfen Sie die [[E-Mail-Vorlagen#E-Mail-Platzhalter|E-Mail-Platzhalter]], um zu sehen, welche PLatzhalter in dieser Email verwendet werden können. Sie können auch das [[ExpressionScript - Presentation|ExpressionScript]] verwenden, um Ihre Email anzupassen.&lt;br /&gt;
&lt;br /&gt;
==Registrierung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wenn Sie Ihre Umfrage im geschlossenen Modus durchführen, gibt es gibt eine [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]]). Das bedeutet, dass nur diejenigen Teilnehmer, die dort eingetragen und einen Zugangsschlüssel zugewiesen haben bekommen, die jeweiligen Umfrage ausfüllen können. Wenn Sie den Teilnehmern erlauben, sich [[Teilnehmereinstellungen|öffentlich für Ihre Umfrage zu registrieren]], wird automatisch ein neuer Eintrag in der Umfrageteilnehmertabelle erstellt, sobald der Befragte seinen Namen und seine Email-Adresse im Rahmen der Registrierung eingetragen hat. LimeSurvey sendet dann dem jeweiligen Befragten automatisch eine &#039;&#039;&#039;Registrierungs-E-Mail&#039;&#039;&#039;, die die URL mit dem Zugangsschlüssel des Nutzers enthält.&lt;br /&gt;
&lt;br /&gt;
Klicken Sie auf die Registerkarte „Registrierung“, um Details dieser Email zu bearbeiten. Sie können verschiedene [[E-Mail-Vorlagen#E-Mail-Platzhalter|Email-Platzhalter]] im Textr verwenden. Das [[ExpressionScript - Presentation|ExpressionScript]] Feature kann ebenfalls genutzt werden, um Inhalte weiter anzupassen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Grundlegende und detaillierte Administratorbenachrichtigungen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get admin notifications, click the [[Notifications &amp;amp; data|Data management]] tab and type in an email address in the &amp;quot;&#039;&#039;Send basic admin notification email to&#039;&#039;&amp;quot; field and another one (or the same) in the &amp;quot;&#039;&#039;Send detailed admin notification email to&#039;&#039;&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
By default, the only difference between the two is related to the extra placeholder {ANSWERTABLE} that is included in the detailed admin notification email template. This allows the user who receives these kinds of emails to also check the submitted answers.  They do not have to access the LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
However, by using the [[ExpressionScript - Presentation|ExpressionScript]] and the [[Email templates#Email placeholders|email placeholders]] you can customize these two email templates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Vorlagenfelder =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each email template contains:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The subject of the email:&#039;&#039;&#039; The title of the email/batch of emails you want to send;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The email body:&#039;&#039;&#039; A text box that contains the text message you want to send to the participants. It may contain text, images, and [[Email templates#Email placeholders|email placeholders]]. The [[ExpressionScript - Presentation|ExpressionScript]] can also be used to further customize the message you want to deliver; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; Another tab is displayed above the tab with the  email templates tab if your survey uses [[General settings|additional languages]]. If you click any language tab other than the default language tab, the email templates will load the corresponding texts in the respective language. Access each email template in order to start editing them. Do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the screen to save your changes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Email actions:&#039;&#039;&#039; Two actions are available: &lt;br /&gt;
**&#039;&#039;Reset this template:&#039;&#039; Once clicked, the HTML code is reset. No text is deleted;&lt;br /&gt;
**&#039;&#039;Validate expressions:&#039;&#039; Checks the logic of the email - whether the placeholders are correctly used or not. We highly recommend using it before sending a batch of emails. This way you can see whether the placeholders are correctly defined or not. In the below example, a small typo exists - it is emphasized in red.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Validate email - email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Platzhalter =&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=Please note that some email placeholders can be used only within certain email templates! Read below for further details.}}&lt;br /&gt;
&lt;br /&gt;
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your [[Survey participants|survey participants list]]. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.&lt;br /&gt;
&lt;br /&gt;
Below are the email placeholders that can be used within the body message of your invitation and  reminder [[Email templates|email templates]]. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and [[Survey participants|survey participants table]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{ADMINEMAIL}||Email of the Survey admin&lt;br /&gt;
|-&lt;br /&gt;
|{ADMINNAME}||Name of Survey Admin&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||Title of your survey&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||Description of your survey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following placeholders are allowed in invitation/reminder email templates (subject &#039;&#039;&#039;and/or&#039;&#039;&#039; body fields) and they will be replaced when sending out the emails:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{EMAIL}||Email of the recipient&lt;br /&gt;
|-&lt;br /&gt;
|{FIRSTNAME}||First Name&lt;br /&gt;
|-&lt;br /&gt;
|{LASTNAME}||Last Name&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYURL}||The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant&lt;br /&gt;
|-&lt;br /&gt;
|@@SURVEYURL@@||The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)&lt;br /&gt;
|-&lt;br /&gt;
|{OPTOUTURL}||The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{OPTINURL}||If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. &lt;br /&gt;
|-&lt;br /&gt;
|{GLOBALOPTOUTURL}||The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||The token to access the survey&lt;br /&gt;
|-&lt;br /&gt;
|{USESLEFT}|| The number of uses left for the token&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDFROM}|| The date the token is valid from&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDUNTIL}|| The date the token is valid until&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_1}||Attribute 1&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_2}||Attribute 2 (...and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If your survey is &#039;&#039;&#039;not&#039;&#039;&#039; anonymous, the email placeholders can be used in order to add specific entry/participant data into the [[text elements|Survey text elements]] panel (e.g., survey description, welcome message, end message).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{TOKEN:EMAIL}||Displays the email of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||Displays the first name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||Displays the last name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||Displays the token code of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||Displays &amp;quot;Attribute 1&amp;quot; of the participant from the survey participants table &lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||Displays &amp;quot;Attribute 2&amp;quot; of the participant from the survey participants table (and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|To find out more about attributes, read the following [[Survey_participants#Manage_attributes|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
These email placeholders can also be used in the confirmation and admin notification email templates. &lt;br /&gt;
&lt;br /&gt;
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator! &lt;br /&gt;
&lt;br /&gt;
Some of the placeholders that can be used only in the admin notification panels are mentioned below:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{VIEWRESPONSEURL}||Displays an URL that redirects you to the respondent&#039;s submitted answer&lt;br /&gt;
|-&lt;br /&gt;
|{EDITRESPONSEURL}||Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant&lt;br /&gt;
|-&lt;br /&gt;
|{STATISTICSURL}||Click this URL to access the statistics of the survey&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERTABLE}||If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hints:&#039;&#039;&#039;&lt;br /&gt;
* If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.&lt;br /&gt;
* You can use [[ExpressionScript - Presentation|ExpressionScript]] to use expressions for tailoring an email{{NewIn|1.92}}. Please have a look at the [[ExpressionScript How-tos|ExpressionScript how-tos]] for an example.&lt;br /&gt;
* Also have a look at the examples on using [[Questions - introduction#Information from survey participants table|Information from survey participants table]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Box|Before sending the emails, we highly recommend the [[Email templates#Email templates fields|validation of your email templates]] - click on the validate expressions button located under the email text body.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Teilnehmer-Opt-out ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use the &#039;&#039;&#039;{OPTOUTURL}&#039;&#039;&#039; tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don&#039;t send them reminder emails. A participant that opts out of your survey will have the email status &#039;OptOut&#039; set in the [[Survey participants|survey participants list]].&lt;br /&gt;
&lt;br /&gt;
==Barebone URL==&lt;br /&gt;
&lt;br /&gt;
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= Ersetzungsfunktion verwenden =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.&lt;br /&gt;
&lt;br /&gt;
The below example uses a plain link to the survey instead of a long url:&lt;br /&gt;
&lt;br /&gt;
1) First, access the email templates panel and choose &#039;&#039;Invitation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
2) Write the text you want to appear as a link to start the survey.&lt;br /&gt;
&lt;br /&gt;
3) Then select that text.&lt;br /&gt;
&lt;br /&gt;
[[File:mark_text_to_hyperlink.jpg]]&lt;br /&gt;
&lt;br /&gt;
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.&lt;br /&gt;
&lt;br /&gt;
[[File:add_link_placeholder_choose_other.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now, when you send out your invitation emails, the link to start the survey will be shorter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Anhänge =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Dateiaktionen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When clicking &#039;&#039;&#039;Add file&#039;&#039;&#039; the following window will be displayed asking you to choose the document from the files folder that you want to send via email:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Upload_files_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.&lt;br /&gt;
&lt;br /&gt;
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the &#039;&#039;&#039;upload&#039;&#039;&#039; button and then selecting the file you want to attach to the respective email template.&lt;br /&gt;
&lt;br /&gt;
Once selected, double click it and the file will be immediately displayed in the &#039;&#039;&#039;Files&#039;&#039;&#039; table, below the &#039;&#039;&#039;Add File&#039;&#039;&#039; button: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Files_table_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have it permanently attached to the respective email template, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the window.&lt;br /&gt;
&lt;br /&gt;
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.&lt;br /&gt;
&lt;br /&gt;
All functions supported by the [[ExpressionScript - Presentation|ExpressionScript]] can be used, as well as token attributes if the survey uses tokens.&lt;br /&gt;
&lt;br /&gt;
With notification or confirmation templates, it is also possible to use [[ExpressionScript - Presentation#Access_to_Variables|question codes]] used in the survey.&lt;br /&gt;
&lt;br /&gt;
If you want to delete a file, click the red trash button located under the Action column and save the changes. &lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=* When a file can not be found on the file system, the email will be sent without an attachment.&lt;br /&gt;
*Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Bildanhang ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Image-email-embed.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|The source must be relative to your public directory on the server. If you LimeSurvey instance is installed in a subdirectory, the image will not be shown in your HTML editor.}}&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/119/de&amp;diff=174428</id>
		<title>Translations:Email templates/119/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/119/de&amp;diff=174428"/>
		<updated>2022-09-14T11:00:53Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;Klicken Sie auf die Registerkarte „Registrierung“, um Details dieser Email zu bearbeiten. Sie können verschiedene Email-Platzhalter...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Klicken Sie auf die Registerkarte „Registrierung“, um Details dieser Email zu bearbeiten. Sie können verschiedene [[E-Mail-Vorlagen#E-Mail-Platzhalter|Email-Platzhalter]] im Textr verwenden. Das [[ExpressionScript - Presentation|ExpressionScript]] Feature kann ebenfalls genutzt werden, um Inhalte weiter anzupassen.&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174427</id>
		<title>Email templates/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174427"/>
		<updated>2022-09-14T10:57:29Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;Wenn Sie Ihre Umfrage im geschlossenen Modus durchführen, gibt es gibt eine Umfrageteilnehmer-Tabelle). Das bedeutet, dass nur diejenigen Teilnehmer, di...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Einleitung=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen werden verwendet um Teilnehmern personalisierte Einladungen, Bestätigungen und Erinnerungen per E-Mail zu schicken. Dies ist von der Umfrageteilnehmerverwaltung aus möglich. Sie können hier auch die Basis und die ausführliche Admin-Benachrichtigung an den Umfrageadministrator anpassen.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Um zur Einstellungsansicht zu kommen, öffnen Sie den Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; und klicken Sie auf den &#039;&#039;&#039;E-Mail Vorlagen&#039;&#039;&#039; Menüpunkt.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] Wenn Sie Superadministratorprivilegien haben  (wenn Sie Zugriff auf die [[Globale Einstellungen| globalen Einstellungen Ihrer LimeSurvey Installation]]), können Sie den Standard HTML-Editor für all Ihre LimeSurvey Nutzer einstellen. Weitere Informationen hierzu bekommen Sie [[Global_settings#General|in diesem Artikel]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=WEnn Sie den HTML editor nutzen möchten, vergessen Sie nicht &#039;&#039;&#039;Benutze HTML-Format für Einladungs-E-Mails&#039;&#039;&#039; zu aktivieren. Diese Einstellung finden Sie im Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; in Ihrer Umfrage, unter dem Punkt [[Teilnehmereinstellungen]].}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=E-mail Vorlagen Ansicht=&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen Ansicht sieht so aus:&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Email templates panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie in dem Screenshot zu sehen ist, wird der &amp;quot;HTML Quellcode&amp;quot; Editormodus genutzt. Diesen können Sie in Ihren  [[First_login_-_your_user_preferences#HTML_editor_mode| persönlichen Einstellungen]] ändern.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Note|Um möglichst einfach mit den Textfeldern zu arbeiten, gehen Sie in Ihre Profileinstellungen und ändern den HTML Editor Modus zu  &#039;&#039;inline HTML Editor&#039;&#039;.}}&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie Sie sehen können gibt es fünf Typen von E-Mails deren Vorlagen Sie bearbeiten können:&lt;br /&gt;
*[[Email templates#Invitation|Einladung]]&lt;br /&gt;
*[[Email templates#Reminder|Erinnerung]]&lt;br /&gt;
*[[Email templates#Confirmation|Bestätigung]]&lt;br /&gt;
*[[Email templates#Registration|Registierung]]&lt;br /&gt;
*[[Email templates#Basic &amp;amp; detailed admin notifications|Basis &amp;amp; Ausführliche  Admin Benachrichtigung]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Einladung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Das Einladungssystem ist nützlich, wenn Sie E-Mails in großen Mengen an alle Befragten aus Ihrer [[Survey participants/de#E-Mail-Einladung senden|Umfrageteilnehmertabelle]] senden möchten, die noch keine Einladung zum Ausfüllen Ihrer Umfrage erhalten haben.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Im Bereich E-Mail-Vorlagen können Sie die Nachricht bearbeiten, die diese Umfrageteilnehmer erreicht. Lesen Sie den folgenden Abschnitt [[Email templates/de#E-Mail-Platzhalter|Wiki-Unterabschnitt]], um zu überprüfen, welche E-Mail-Platzhalter verwendet werden können. Sie können auch [[ExpressionScript - Presentation/de|ExpressionScript]] verwenden, um die Anpassung Ihrer Einladungs-E-Mail-Vorlage zu verbessern.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Erinnerung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die [[Survey_participants#Send_email_reminder|Teilnehmer aus der Umfrageteilnehmertabelle]] an die Beantwortung der Umfrage zu erinnern.&lt;br /&gt;
&lt;br /&gt;
You can edit the default format of the reminder email from the &#039;&#039;Email templates panel&#039;&#039;.  To verify which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. The [[ExpressionScript - Presentation|ExpressionScript]] can help you customize the text body of this email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hinweis:&#039;&#039;&#039; Eine Erinnerung wird nur an diejenigen Teilnehmer in der [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]] verschickt, bei denen das Feld „Abgeschlossen“ noch leer ist. Dies bedeutet, dass der Befragte entweder noch gar nicht an der Umfrage teilgenommen oder sie zumindest noch nicht abgeschlossen hat.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bestätigung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wenn Zugangsschlüssel verwendet werden und ein Teilnehmer die Umfrage ausfüllt, wird eine Bestätigungs-Email an seine Email-Adresse gesendet. Sie können diese Funktion im Bereich [[Teilnehmereinstellungen]] deaktivieren.&lt;br /&gt;
&lt;br /&gt;
Klicken Sie auf die Registerkarte &#039;&#039;&#039;Bestätigung&#039;&#039;&#039;, wenn Sie die Email-Vorlage bearbeiten möchten. Überprüfen Sie die [[E-Mail-Vorlagen#E-Mail-Platzhalter|E-Mail-Platzhalter]], um zu sehen, welche PLatzhalter in dieser Email verwendet werden können. Sie können auch das [[ExpressionScript - Presentation|ExpressionScript]] verwenden, um Ihre Email anzupassen.&lt;br /&gt;
&lt;br /&gt;
==Registrierung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wenn Sie Ihre Umfrage im geschlossenen Modus durchführen, gibt es gibt eine [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]]). Das bedeutet, dass nur diejenigen Teilnehmer, die dort eingetragen und einen Zugangsschlüssel zugewiesen haben bekommen, die jeweiligen Umfrage ausfüllen können. Wenn Sie den Teilnehmern erlauben, sich [[Teilnehmereinstellungen|öffentlich für Ihre Umfrage zu registrieren]], wird automatisch ein neuer Eintrag in der Umfrageteilnehmertabelle erstellt, sobald der Befragte seinen Namen und seine Email-Adresse im Rahmen der Registrierung eingetragen hat. LimeSurvey sendet dann dem jeweiligen Befragten automatisch eine &#039;&#039;&#039;Registrierungs-E-Mail&#039;&#039;&#039;, die die URL mit dem Zugangsschlüssel des Nutzers enthält.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;registration&#039;&#039;&#039; tab to edit the format of this email. Don&#039;t forget to take a look first at which [[Email templates#Email placeholders|email placeholders]] can be used within the text body. The [[ExpressionScript - Presentation|ExpressionScript]] can provide further customization to the body text you wish to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Grundlegende und detaillierte Administratorbenachrichtigungen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get admin notifications, click the [[Notifications &amp;amp; data|Data management]] tab and type in an email address in the &amp;quot;&#039;&#039;Send basic admin notification email to&#039;&#039;&amp;quot; field and another one (or the same) in the &amp;quot;&#039;&#039;Send detailed admin notification email to&#039;&#039;&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
By default, the only difference between the two is related to the extra placeholder {ANSWERTABLE} that is included in the detailed admin notification email template. This allows the user who receives these kinds of emails to also check the submitted answers.  They do not have to access the LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
However, by using the [[ExpressionScript - Presentation|ExpressionScript]] and the [[Email templates#Email placeholders|email placeholders]] you can customize these two email templates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Vorlagenfelder =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each email template contains:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The subject of the email:&#039;&#039;&#039; The title of the email/batch of emails you want to send;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The email body:&#039;&#039;&#039; A text box that contains the text message you want to send to the participants. It may contain text, images, and [[Email templates#Email placeholders|email placeholders]]. The [[ExpressionScript - Presentation|ExpressionScript]] can also be used to further customize the message you want to deliver; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; Another tab is displayed above the tab with the  email templates tab if your survey uses [[General settings|additional languages]]. If you click any language tab other than the default language tab, the email templates will load the corresponding texts in the respective language. Access each email template in order to start editing them. Do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the screen to save your changes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Email actions:&#039;&#039;&#039; Two actions are available: &lt;br /&gt;
**&#039;&#039;Reset this template:&#039;&#039; Once clicked, the HTML code is reset. No text is deleted;&lt;br /&gt;
**&#039;&#039;Validate expressions:&#039;&#039; Checks the logic of the email - whether the placeholders are correctly used or not. We highly recommend using it before sending a batch of emails. This way you can see whether the placeholders are correctly defined or not. In the below example, a small typo exists - it is emphasized in red.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Validate email - email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Platzhalter =&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=Please note that some email placeholders can be used only within certain email templates! Read below for further details.}}&lt;br /&gt;
&lt;br /&gt;
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your [[Survey participants|survey participants list]]. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.&lt;br /&gt;
&lt;br /&gt;
Below are the email placeholders that can be used within the body message of your invitation and  reminder [[Email templates|email templates]]. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and [[Survey participants|survey participants table]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{ADMINEMAIL}||Email of the Survey admin&lt;br /&gt;
|-&lt;br /&gt;
|{ADMINNAME}||Name of Survey Admin&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||Title of your survey&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||Description of your survey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following placeholders are allowed in invitation/reminder email templates (subject &#039;&#039;&#039;and/or&#039;&#039;&#039; body fields) and they will be replaced when sending out the emails:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{EMAIL}||Email of the recipient&lt;br /&gt;
|-&lt;br /&gt;
|{FIRSTNAME}||First Name&lt;br /&gt;
|-&lt;br /&gt;
|{LASTNAME}||Last Name&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYURL}||The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant&lt;br /&gt;
|-&lt;br /&gt;
|@@SURVEYURL@@||The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)&lt;br /&gt;
|-&lt;br /&gt;
|{OPTOUTURL}||The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{OPTINURL}||If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. &lt;br /&gt;
|-&lt;br /&gt;
|{GLOBALOPTOUTURL}||The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||The token to access the survey&lt;br /&gt;
|-&lt;br /&gt;
|{USESLEFT}|| The number of uses left for the token&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDFROM}|| The date the token is valid from&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDUNTIL}|| The date the token is valid until&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_1}||Attribute 1&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_2}||Attribute 2 (...and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If your survey is &#039;&#039;&#039;not&#039;&#039;&#039; anonymous, the email placeholders can be used in order to add specific entry/participant data into the [[text elements|Survey text elements]] panel (e.g., survey description, welcome message, end message).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{TOKEN:EMAIL}||Displays the email of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||Displays the first name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||Displays the last name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||Displays the token code of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||Displays &amp;quot;Attribute 1&amp;quot; of the participant from the survey participants table &lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||Displays &amp;quot;Attribute 2&amp;quot; of the participant from the survey participants table (and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|To find out more about attributes, read the following [[Survey_participants#Manage_attributes|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
These email placeholders can also be used in the confirmation and admin notification email templates. &lt;br /&gt;
&lt;br /&gt;
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator! &lt;br /&gt;
&lt;br /&gt;
Some of the placeholders that can be used only in the admin notification panels are mentioned below:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{VIEWRESPONSEURL}||Displays an URL that redirects you to the respondent&#039;s submitted answer&lt;br /&gt;
|-&lt;br /&gt;
|{EDITRESPONSEURL}||Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant&lt;br /&gt;
|-&lt;br /&gt;
|{STATISTICSURL}||Click this URL to access the statistics of the survey&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERTABLE}||If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hints:&#039;&#039;&#039;&lt;br /&gt;
* If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.&lt;br /&gt;
* You can use [[ExpressionScript - Presentation|ExpressionScript]] to use expressions for tailoring an email{{NewIn|1.92}}. Please have a look at the [[ExpressionScript How-tos|ExpressionScript how-tos]] for an example.&lt;br /&gt;
* Also have a look at the examples on using [[Questions - introduction#Information from survey participants table|Information from survey participants table]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Box|Before sending the emails, we highly recommend the [[Email templates#Email templates fields|validation of your email templates]] - click on the validate expressions button located under the email text body.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Teilnehmer-Opt-out ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use the &#039;&#039;&#039;{OPTOUTURL}&#039;&#039;&#039; tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don&#039;t send them reminder emails. A participant that opts out of your survey will have the email status &#039;OptOut&#039; set in the [[Survey participants|survey participants list]].&lt;br /&gt;
&lt;br /&gt;
==Barebone URL==&lt;br /&gt;
&lt;br /&gt;
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= Ersetzungsfunktion verwenden =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.&lt;br /&gt;
&lt;br /&gt;
The below example uses a plain link to the survey instead of a long url:&lt;br /&gt;
&lt;br /&gt;
1) First, access the email templates panel and choose &#039;&#039;Invitation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
2) Write the text you want to appear as a link to start the survey.&lt;br /&gt;
&lt;br /&gt;
3) Then select that text.&lt;br /&gt;
&lt;br /&gt;
[[File:mark_text_to_hyperlink.jpg]]&lt;br /&gt;
&lt;br /&gt;
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.&lt;br /&gt;
&lt;br /&gt;
[[File:add_link_placeholder_choose_other.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now, when you send out your invitation emails, the link to start the survey will be shorter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Anhänge =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Dateiaktionen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When clicking &#039;&#039;&#039;Add file&#039;&#039;&#039; the following window will be displayed asking you to choose the document from the files folder that you want to send via email:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Upload_files_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.&lt;br /&gt;
&lt;br /&gt;
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the &#039;&#039;&#039;upload&#039;&#039;&#039; button and then selecting the file you want to attach to the respective email template.&lt;br /&gt;
&lt;br /&gt;
Once selected, double click it and the file will be immediately displayed in the &#039;&#039;&#039;Files&#039;&#039;&#039; table, below the &#039;&#039;&#039;Add File&#039;&#039;&#039; button: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Files_table_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have it permanently attached to the respective email template, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the window.&lt;br /&gt;
&lt;br /&gt;
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.&lt;br /&gt;
&lt;br /&gt;
All functions supported by the [[ExpressionScript - Presentation|ExpressionScript]] can be used, as well as token attributes if the survey uses tokens.&lt;br /&gt;
&lt;br /&gt;
With notification or confirmation templates, it is also possible to use [[ExpressionScript - Presentation#Access_to_Variables|question codes]] used in the survey.&lt;br /&gt;
&lt;br /&gt;
If you want to delete a file, click the red trash button located under the Action column and save the changes. &lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=* When a file can not be found on the file system, the email will be sent without an attachment.&lt;br /&gt;
*Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Bildanhang ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Image-email-embed.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|The source must be relative to your public directory on the server. If you LimeSurvey instance is installed in a subdirectory, the image will not be shown in your HTML editor.}}&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/118/de&amp;diff=174426</id>
		<title>Translations:Email templates/118/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/118/de&amp;diff=174426"/>
		<updated>2022-09-14T10:57:27Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;Wenn Sie Ihre Umfrage im geschlossenen Modus durchführen, gibt es gibt eine Umfrageteilnehmer-Tabelle). Das bedeutet, dass nur diejenigen Teilnehmer, di...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wenn Sie Ihre Umfrage im geschlossenen Modus durchführen, gibt es gibt eine [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]]). Das bedeutet, dass nur diejenigen Teilnehmer, die dort eingetragen und einen Zugangsschlüssel zugewiesen haben bekommen, die jeweiligen Umfrage ausfüllen können. Wenn Sie den Teilnehmern erlauben, sich [[Teilnehmereinstellungen|öffentlich für Ihre Umfrage zu registrieren]], wird automatisch ein neuer Eintrag in der Umfrageteilnehmertabelle erstellt, sobald der Befragte seinen Namen und seine Email-Adresse im Rahmen der Registrierung eingetragen hat. LimeSurvey sendet dann dem jeweiligen Befragten automatisch eine &#039;&#039;&#039;Registrierungs-E-Mail&#039;&#039;&#039;, die die URL mit dem Zugangsschlüssel des Nutzers enthält.&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174425</id>
		<title>Email templates/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174425"/>
		<updated>2022-09-14T10:53:48Z</updated>

		<summary type="html">&lt;p&gt;Mazi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Einleitung=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen werden verwendet um Teilnehmern personalisierte Einladungen, Bestätigungen und Erinnerungen per E-Mail zu schicken. Dies ist von der Umfrageteilnehmerverwaltung aus möglich. Sie können hier auch die Basis und die ausführliche Admin-Benachrichtigung an den Umfrageadministrator anpassen.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Um zur Einstellungsansicht zu kommen, öffnen Sie den Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; und klicken Sie auf den &#039;&#039;&#039;E-Mail Vorlagen&#039;&#039;&#039; Menüpunkt.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] Wenn Sie Superadministratorprivilegien haben  (wenn Sie Zugriff auf die [[Globale Einstellungen| globalen Einstellungen Ihrer LimeSurvey Installation]]), können Sie den Standard HTML-Editor für all Ihre LimeSurvey Nutzer einstellen. Weitere Informationen hierzu bekommen Sie [[Global_settings#General|in diesem Artikel]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=WEnn Sie den HTML editor nutzen möchten, vergessen Sie nicht &#039;&#039;&#039;Benutze HTML-Format für Einladungs-E-Mails&#039;&#039;&#039; zu aktivieren. Diese Einstellung finden Sie im Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; in Ihrer Umfrage, unter dem Punkt [[Teilnehmereinstellungen]].}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=E-mail Vorlagen Ansicht=&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen Ansicht sieht so aus:&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Email templates panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie in dem Screenshot zu sehen ist, wird der &amp;quot;HTML Quellcode&amp;quot; Editormodus genutzt. Diesen können Sie in Ihren  [[First_login_-_your_user_preferences#HTML_editor_mode| persönlichen Einstellungen]] ändern.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Note|Um möglichst einfach mit den Textfeldern zu arbeiten, gehen Sie in Ihre Profileinstellungen und ändern den HTML Editor Modus zu  &#039;&#039;inline HTML Editor&#039;&#039;.}}&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie Sie sehen können gibt es fünf Typen von E-Mails deren Vorlagen Sie bearbeiten können:&lt;br /&gt;
*[[Email templates#Invitation|Einladung]]&lt;br /&gt;
*[[Email templates#Reminder|Erinnerung]]&lt;br /&gt;
*[[Email templates#Confirmation|Bestätigung]]&lt;br /&gt;
*[[Email templates#Registration|Registierung]]&lt;br /&gt;
*[[Email templates#Basic &amp;amp; detailed admin notifications|Basis &amp;amp; Ausführliche  Admin Benachrichtigung]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Einladung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Das Einladungssystem ist nützlich, wenn Sie E-Mails in großen Mengen an alle Befragten aus Ihrer [[Survey participants/de#E-Mail-Einladung senden|Umfrageteilnehmertabelle]] senden möchten, die noch keine Einladung zum Ausfüllen Ihrer Umfrage erhalten haben.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Im Bereich E-Mail-Vorlagen können Sie die Nachricht bearbeiten, die diese Umfrageteilnehmer erreicht. Lesen Sie den folgenden Abschnitt [[Email templates/de#E-Mail-Platzhalter|Wiki-Unterabschnitt]], um zu überprüfen, welche E-Mail-Platzhalter verwendet werden können. Sie können auch [[ExpressionScript - Presentation/de|ExpressionScript]] verwenden, um die Anpassung Ihrer Einladungs-E-Mail-Vorlage zu verbessern.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Erinnerung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die [[Survey_participants#Send_email_reminder|Teilnehmer aus der Umfrageteilnehmertabelle]] an die Beantwortung der Umfrage zu erinnern.&lt;br /&gt;
&lt;br /&gt;
You can edit the default format of the reminder email from the &#039;&#039;Email templates panel&#039;&#039;.  To verify which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. The [[ExpressionScript - Presentation|ExpressionScript]] can help you customize the text body of this email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hinweis:&#039;&#039;&#039; Eine Erinnerung wird nur an diejenigen Teilnehmer in der [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]] verschickt, bei denen das Feld „Abgeschlossen“ noch leer ist. Dies bedeutet, dass der Befragte entweder noch gar nicht an der Umfrage teilgenommen oder sie zumindest noch nicht abgeschlossen hat.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bestätigung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wenn Zugangsschlüssel verwendet werden und ein Teilnehmer die Umfrage ausfüllt, wird eine Bestätigungs-Email an seine Email-Adresse gesendet. Sie können diese Funktion im Bereich [[Teilnehmereinstellungen]] deaktivieren.&lt;br /&gt;
&lt;br /&gt;
Klicken Sie auf die Registerkarte &#039;&#039;&#039;Bestätigung&#039;&#039;&#039;, wenn Sie die Email-Vorlage bearbeiten möchten. Überprüfen Sie die [[E-Mail-Vorlagen#E-Mail-Platzhalter|E-Mail-Platzhalter]], um zu sehen, welche PLatzhalter in dieser Email verwendet werden können. Sie können auch das [[ExpressionScript - Presentation|ExpressionScript]] verwenden, um Ihre Email anzupassen.&lt;br /&gt;
&lt;br /&gt;
==Registrierung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&#039;closed-access mode&#039;&#039;&#039; is enabled (there is a [[Survey participants|survey participants table]], which means that only those participants who have an allocated entry and a unique token code associated to it can complete the respective survey. If you allow participants [[Participant settings|to publicly register to your survey]], a new entry in your survey participants table will be created once the respondent has submitted his or her name and email address. A script that runs in the background will automatically send the respective respondent a &#039;&#039;&#039;registration email&#039;&#039;&#039;. It contains the URL with the token that needs to be accessed by the newly registered user.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;registration&#039;&#039;&#039; tab to edit the format of this email. Don&#039;t forget to take a look first at which [[Email templates#Email placeholders|email placeholders]] can be used within the text body. The [[ExpressionScript - Presentation|ExpressionScript]] can provide further customization to the body text you wish to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Grundlegende und detaillierte Administratorbenachrichtigungen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get admin notifications, click the [[Notifications &amp;amp; data|Data management]] tab and type in an email address in the &amp;quot;&#039;&#039;Send basic admin notification email to&#039;&#039;&amp;quot; field and another one (or the same) in the &amp;quot;&#039;&#039;Send detailed admin notification email to&#039;&#039;&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
By default, the only difference between the two is related to the extra placeholder {ANSWERTABLE} that is included in the detailed admin notification email template. This allows the user who receives these kinds of emails to also check the submitted answers.  They do not have to access the LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
However, by using the [[ExpressionScript - Presentation|ExpressionScript]] and the [[Email templates#Email placeholders|email placeholders]] you can customize these two email templates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Vorlagenfelder =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each email template contains:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The subject of the email:&#039;&#039;&#039; The title of the email/batch of emails you want to send;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The email body:&#039;&#039;&#039; A text box that contains the text message you want to send to the participants. It may contain text, images, and [[Email templates#Email placeholders|email placeholders]]. The [[ExpressionScript - Presentation|ExpressionScript]] can also be used to further customize the message you want to deliver; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; Another tab is displayed above the tab with the  email templates tab if your survey uses [[General settings|additional languages]]. If you click any language tab other than the default language tab, the email templates will load the corresponding texts in the respective language. Access each email template in order to start editing them. Do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the screen to save your changes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Email actions:&#039;&#039;&#039; Two actions are available: &lt;br /&gt;
**&#039;&#039;Reset this template:&#039;&#039; Once clicked, the HTML code is reset. No text is deleted;&lt;br /&gt;
**&#039;&#039;Validate expressions:&#039;&#039; Checks the logic of the email - whether the placeholders are correctly used or not. We highly recommend using it before sending a batch of emails. This way you can see whether the placeholders are correctly defined or not. In the below example, a small typo exists - it is emphasized in red.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Validate email - email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Platzhalter =&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=Please note that some email placeholders can be used only within certain email templates! Read below for further details.}}&lt;br /&gt;
&lt;br /&gt;
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your [[Survey participants|survey participants list]]. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.&lt;br /&gt;
&lt;br /&gt;
Below are the email placeholders that can be used within the body message of your invitation and  reminder [[Email templates|email templates]]. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and [[Survey participants|survey participants table]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{ADMINEMAIL}||Email of the Survey admin&lt;br /&gt;
|-&lt;br /&gt;
|{ADMINNAME}||Name of Survey Admin&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||Title of your survey&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||Description of your survey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following placeholders are allowed in invitation/reminder email templates (subject &#039;&#039;&#039;and/or&#039;&#039;&#039; body fields) and they will be replaced when sending out the emails:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{EMAIL}||Email of the recipient&lt;br /&gt;
|-&lt;br /&gt;
|{FIRSTNAME}||First Name&lt;br /&gt;
|-&lt;br /&gt;
|{LASTNAME}||Last Name&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYURL}||The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant&lt;br /&gt;
|-&lt;br /&gt;
|@@SURVEYURL@@||The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)&lt;br /&gt;
|-&lt;br /&gt;
|{OPTOUTURL}||The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{OPTINURL}||If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. &lt;br /&gt;
|-&lt;br /&gt;
|{GLOBALOPTOUTURL}||The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||The token to access the survey&lt;br /&gt;
|-&lt;br /&gt;
|{USESLEFT}|| The number of uses left for the token&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDFROM}|| The date the token is valid from&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDUNTIL}|| The date the token is valid until&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_1}||Attribute 1&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_2}||Attribute 2 (...and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If your survey is &#039;&#039;&#039;not&#039;&#039;&#039; anonymous, the email placeholders can be used in order to add specific entry/participant data into the [[text elements|Survey text elements]] panel (e.g., survey description, welcome message, end message).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{TOKEN:EMAIL}||Displays the email of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||Displays the first name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||Displays the last name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||Displays the token code of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||Displays &amp;quot;Attribute 1&amp;quot; of the participant from the survey participants table &lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||Displays &amp;quot;Attribute 2&amp;quot; of the participant from the survey participants table (and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|To find out more about attributes, read the following [[Survey_participants#Manage_attributes|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
These email placeholders can also be used in the confirmation and admin notification email templates. &lt;br /&gt;
&lt;br /&gt;
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator! &lt;br /&gt;
&lt;br /&gt;
Some of the placeholders that can be used only in the admin notification panels are mentioned below:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{VIEWRESPONSEURL}||Displays an URL that redirects you to the respondent&#039;s submitted answer&lt;br /&gt;
|-&lt;br /&gt;
|{EDITRESPONSEURL}||Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant&lt;br /&gt;
|-&lt;br /&gt;
|{STATISTICSURL}||Click this URL to access the statistics of the survey&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERTABLE}||If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hints:&#039;&#039;&#039;&lt;br /&gt;
* If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.&lt;br /&gt;
* You can use [[ExpressionScript - Presentation|ExpressionScript]] to use expressions for tailoring an email{{NewIn|1.92}}. Please have a look at the [[ExpressionScript How-tos|ExpressionScript how-tos]] for an example.&lt;br /&gt;
* Also have a look at the examples on using [[Questions - introduction#Information from survey participants table|Information from survey participants table]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Box|Before sending the emails, we highly recommend the [[Email templates#Email templates fields|validation of your email templates]] - click on the validate expressions button located under the email text body.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Teilnehmer-Opt-out ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use the &#039;&#039;&#039;{OPTOUTURL}&#039;&#039;&#039; tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don&#039;t send them reminder emails. A participant that opts out of your survey will have the email status &#039;OptOut&#039; set in the [[Survey participants|survey participants list]].&lt;br /&gt;
&lt;br /&gt;
==Barebone URL==&lt;br /&gt;
&lt;br /&gt;
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= Ersetzungsfunktion verwenden =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.&lt;br /&gt;
&lt;br /&gt;
The below example uses a plain link to the survey instead of a long url:&lt;br /&gt;
&lt;br /&gt;
1) First, access the email templates panel and choose &#039;&#039;Invitation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
2) Write the text you want to appear as a link to start the survey.&lt;br /&gt;
&lt;br /&gt;
3) Then select that text.&lt;br /&gt;
&lt;br /&gt;
[[File:mark_text_to_hyperlink.jpg]]&lt;br /&gt;
&lt;br /&gt;
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.&lt;br /&gt;
&lt;br /&gt;
[[File:add_link_placeholder_choose_other.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now, when you send out your invitation emails, the link to start the survey will be shorter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Anhänge =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Dateiaktionen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When clicking &#039;&#039;&#039;Add file&#039;&#039;&#039; the following window will be displayed asking you to choose the document from the files folder that you want to send via email:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Upload_files_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.&lt;br /&gt;
&lt;br /&gt;
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the &#039;&#039;&#039;upload&#039;&#039;&#039; button and then selecting the file you want to attach to the respective email template.&lt;br /&gt;
&lt;br /&gt;
Once selected, double click it and the file will be immediately displayed in the &#039;&#039;&#039;Files&#039;&#039;&#039; table, below the &#039;&#039;&#039;Add File&#039;&#039;&#039; button: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Files_table_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have it permanently attached to the respective email template, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the window.&lt;br /&gt;
&lt;br /&gt;
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.&lt;br /&gt;
&lt;br /&gt;
All functions supported by the [[ExpressionScript - Presentation|ExpressionScript]] can be used, as well as token attributes if the survey uses tokens.&lt;br /&gt;
&lt;br /&gt;
With notification or confirmation templates, it is also possible to use [[ExpressionScript - Presentation#Access_to_Variables|question codes]] used in the survey.&lt;br /&gt;
&lt;br /&gt;
If you want to delete a file, click the red trash button located under the Action column and save the changes. &lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=* When a file can not be found on the file system, the email will be sent without an attachment.&lt;br /&gt;
*Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Bildanhang ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Image-email-embed.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|The source must be relative to your public directory on the server. If you LimeSurvey instance is installed in a subdirectory, the image will not be shown in your HTML editor.}}&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/117/de&amp;diff=174424</id>
		<title>Translations:Email templates/117/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/117/de&amp;diff=174424"/>
		<updated>2022-09-14T10:53:47Z</updated>

		<summary type="html">&lt;p&gt;Mazi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Registrierung==&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174423</id>
		<title>Email templates/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174423"/>
		<updated>2022-09-14T10:53:30Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;Klicken Sie auf die Registerkarte &amp;#039;&amp;#039;&amp;#039;Bestätigung&amp;#039;&amp;#039;&amp;#039;, wenn Sie die Email-Vorlage bearbeiten möchten. Überprüfen Sie die E-Mail-Vorlagen#E-Mail-Platzhalter|E-Mail-Platzhal...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Einleitung=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen werden verwendet um Teilnehmern personalisierte Einladungen, Bestätigungen und Erinnerungen per E-Mail zu schicken. Dies ist von der Umfrageteilnehmerverwaltung aus möglich. Sie können hier auch die Basis und die ausführliche Admin-Benachrichtigung an den Umfrageadministrator anpassen.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Um zur Einstellungsansicht zu kommen, öffnen Sie den Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; und klicken Sie auf den &#039;&#039;&#039;E-Mail Vorlagen&#039;&#039;&#039; Menüpunkt.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] Wenn Sie Superadministratorprivilegien haben  (wenn Sie Zugriff auf die [[Globale Einstellungen| globalen Einstellungen Ihrer LimeSurvey Installation]]), können Sie den Standard HTML-Editor für all Ihre LimeSurvey Nutzer einstellen. Weitere Informationen hierzu bekommen Sie [[Global_settings#General|in diesem Artikel]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=WEnn Sie den HTML editor nutzen möchten, vergessen Sie nicht &#039;&#039;&#039;Benutze HTML-Format für Einladungs-E-Mails&#039;&#039;&#039; zu aktivieren. Diese Einstellung finden Sie im Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; in Ihrer Umfrage, unter dem Punkt [[Teilnehmereinstellungen]].}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=E-mail Vorlagen Ansicht=&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen Ansicht sieht so aus:&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Email templates panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie in dem Screenshot zu sehen ist, wird der &amp;quot;HTML Quellcode&amp;quot; Editormodus genutzt. Diesen können Sie in Ihren  [[First_login_-_your_user_preferences#HTML_editor_mode| persönlichen Einstellungen]] ändern.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Note|Um möglichst einfach mit den Textfeldern zu arbeiten, gehen Sie in Ihre Profileinstellungen und ändern den HTML Editor Modus zu  &#039;&#039;inline HTML Editor&#039;&#039;.}}&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie Sie sehen können gibt es fünf Typen von E-Mails deren Vorlagen Sie bearbeiten können:&lt;br /&gt;
*[[Email templates#Invitation|Einladung]]&lt;br /&gt;
*[[Email templates#Reminder|Erinnerung]]&lt;br /&gt;
*[[Email templates#Confirmation|Bestätigung]]&lt;br /&gt;
*[[Email templates#Registration|Registierung]]&lt;br /&gt;
*[[Email templates#Basic &amp;amp; detailed admin notifications|Basis &amp;amp; Ausführliche  Admin Benachrichtigung]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Einladung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Das Einladungssystem ist nützlich, wenn Sie E-Mails in großen Mengen an alle Befragten aus Ihrer [[Survey participants/de#E-Mail-Einladung senden|Umfrageteilnehmertabelle]] senden möchten, die noch keine Einladung zum Ausfüllen Ihrer Umfrage erhalten haben.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Im Bereich E-Mail-Vorlagen können Sie die Nachricht bearbeiten, die diese Umfrageteilnehmer erreicht. Lesen Sie den folgenden Abschnitt [[Email templates/de#E-Mail-Platzhalter|Wiki-Unterabschnitt]], um zu überprüfen, welche E-Mail-Platzhalter verwendet werden können. Sie können auch [[ExpressionScript - Presentation/de|ExpressionScript]] verwenden, um die Anpassung Ihrer Einladungs-E-Mail-Vorlage zu verbessern.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Erinnerung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die [[Survey_participants#Send_email_reminder|Teilnehmer aus der Umfrageteilnehmertabelle]] an die Beantwortung der Umfrage zu erinnern.&lt;br /&gt;
&lt;br /&gt;
You can edit the default format of the reminder email from the &#039;&#039;Email templates panel&#039;&#039;.  To verify which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. The [[ExpressionScript - Presentation|ExpressionScript]] can help you customize the text body of this email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hinweis:&#039;&#039;&#039; Eine Erinnerung wird nur an diejenigen Teilnehmer in der [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]] verschickt, bei denen das Feld „Abgeschlossen“ noch leer ist. Dies bedeutet, dass der Befragte entweder noch gar nicht an der Umfrage teilgenommen oder sie zumindest noch nicht abgeschlossen hat.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bestätigung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wenn Zugangsschlüssel verwendet werden und ein Teilnehmer die Umfrage ausfüllt, wird eine Bestätigungs-Email an seine Email-Adresse gesendet. Sie können diese Funktion im Bereich [[Teilnehmereinstellungen]] deaktivieren.&lt;br /&gt;
&lt;br /&gt;
Klicken Sie auf die Registerkarte &#039;&#039;&#039;Bestätigung&#039;&#039;&#039;, wenn Sie die Email-Vorlage bearbeiten möchten. Überprüfen Sie die [[E-Mail-Vorlagen#E-Mail-Platzhalter|E-Mail-Platzhalter]], um zu sehen, welche PLatzhalter in dieser Email verwendet werden können. Sie können auch das [[ExpressionScript - Presentation|ExpressionScript]] verwenden, um Ihre Email anzupassen.&lt;br /&gt;
&lt;br /&gt;
== Registrierung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&#039;closed-access mode&#039;&#039;&#039; is enabled (there is a [[Survey participants|survey participants table]], which means that only those participants who have an allocated entry and a unique token code associated to it can complete the respective survey. If you allow participants [[Participant settings|to publicly register to your survey]], a new entry in your survey participants table will be created once the respondent has submitted his or her name and email address. A script that runs in the background will automatically send the respective respondent a &#039;&#039;&#039;registration email&#039;&#039;&#039;. It contains the URL with the token that needs to be accessed by the newly registered user.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;registration&#039;&#039;&#039; tab to edit the format of this email. Don&#039;t forget to take a look first at which [[Email templates#Email placeholders|email placeholders]] can be used within the text body. The [[ExpressionScript - Presentation|ExpressionScript]] can provide further customization to the body text you wish to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Grundlegende und detaillierte Administratorbenachrichtigungen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get admin notifications, click the [[Notifications &amp;amp; data|Data management]] tab and type in an email address in the &amp;quot;&#039;&#039;Send basic admin notification email to&#039;&#039;&amp;quot; field and another one (or the same) in the &amp;quot;&#039;&#039;Send detailed admin notification email to&#039;&#039;&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
By default, the only difference between the two is related to the extra placeholder {ANSWERTABLE} that is included in the detailed admin notification email template. This allows the user who receives these kinds of emails to also check the submitted answers.  They do not have to access the LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
However, by using the [[ExpressionScript - Presentation|ExpressionScript]] and the [[Email templates#Email placeholders|email placeholders]] you can customize these two email templates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Vorlagenfelder =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each email template contains:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The subject of the email:&#039;&#039;&#039; The title of the email/batch of emails you want to send;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The email body:&#039;&#039;&#039; A text box that contains the text message you want to send to the participants. It may contain text, images, and [[Email templates#Email placeholders|email placeholders]]. The [[ExpressionScript - Presentation|ExpressionScript]] can also be used to further customize the message you want to deliver; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; Another tab is displayed above the tab with the  email templates tab if your survey uses [[General settings|additional languages]]. If you click any language tab other than the default language tab, the email templates will load the corresponding texts in the respective language. Access each email template in order to start editing them. Do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the screen to save your changes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Email actions:&#039;&#039;&#039; Two actions are available: &lt;br /&gt;
**&#039;&#039;Reset this template:&#039;&#039; Once clicked, the HTML code is reset. No text is deleted;&lt;br /&gt;
**&#039;&#039;Validate expressions:&#039;&#039; Checks the logic of the email - whether the placeholders are correctly used or not. We highly recommend using it before sending a batch of emails. This way you can see whether the placeholders are correctly defined or not. In the below example, a small typo exists - it is emphasized in red.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Validate email - email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Platzhalter =&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=Please note that some email placeholders can be used only within certain email templates! Read below for further details.}}&lt;br /&gt;
&lt;br /&gt;
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your [[Survey participants|survey participants list]]. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.&lt;br /&gt;
&lt;br /&gt;
Below are the email placeholders that can be used within the body message of your invitation and  reminder [[Email templates|email templates]]. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and [[Survey participants|survey participants table]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{ADMINEMAIL}||Email of the Survey admin&lt;br /&gt;
|-&lt;br /&gt;
|{ADMINNAME}||Name of Survey Admin&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||Title of your survey&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||Description of your survey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following placeholders are allowed in invitation/reminder email templates (subject &#039;&#039;&#039;and/or&#039;&#039;&#039; body fields) and they will be replaced when sending out the emails:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{EMAIL}||Email of the recipient&lt;br /&gt;
|-&lt;br /&gt;
|{FIRSTNAME}||First Name&lt;br /&gt;
|-&lt;br /&gt;
|{LASTNAME}||Last Name&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYURL}||The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant&lt;br /&gt;
|-&lt;br /&gt;
|@@SURVEYURL@@||The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)&lt;br /&gt;
|-&lt;br /&gt;
|{OPTOUTURL}||The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{OPTINURL}||If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. &lt;br /&gt;
|-&lt;br /&gt;
|{GLOBALOPTOUTURL}||The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||The token to access the survey&lt;br /&gt;
|-&lt;br /&gt;
|{USESLEFT}|| The number of uses left for the token&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDFROM}|| The date the token is valid from&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDUNTIL}|| The date the token is valid until&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_1}||Attribute 1&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_2}||Attribute 2 (...and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If your survey is &#039;&#039;&#039;not&#039;&#039;&#039; anonymous, the email placeholders can be used in order to add specific entry/participant data into the [[text elements|Survey text elements]] panel (e.g., survey description, welcome message, end message).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{TOKEN:EMAIL}||Displays the email of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||Displays the first name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||Displays the last name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||Displays the token code of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||Displays &amp;quot;Attribute 1&amp;quot; of the participant from the survey participants table &lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||Displays &amp;quot;Attribute 2&amp;quot; of the participant from the survey participants table (and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|To find out more about attributes, read the following [[Survey_participants#Manage_attributes|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
These email placeholders can also be used in the confirmation and admin notification email templates. &lt;br /&gt;
&lt;br /&gt;
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator! &lt;br /&gt;
&lt;br /&gt;
Some of the placeholders that can be used only in the admin notification panels are mentioned below:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{VIEWRESPONSEURL}||Displays an URL that redirects you to the respondent&#039;s submitted answer&lt;br /&gt;
|-&lt;br /&gt;
|{EDITRESPONSEURL}||Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant&lt;br /&gt;
|-&lt;br /&gt;
|{STATISTICSURL}||Click this URL to access the statistics of the survey&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERTABLE}||If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hints:&#039;&#039;&#039;&lt;br /&gt;
* If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.&lt;br /&gt;
* You can use [[ExpressionScript - Presentation|ExpressionScript]] to use expressions for tailoring an email{{NewIn|1.92}}. Please have a look at the [[ExpressionScript How-tos|ExpressionScript how-tos]] for an example.&lt;br /&gt;
* Also have a look at the examples on using [[Questions - introduction#Information from survey participants table|Information from survey participants table]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Box|Before sending the emails, we highly recommend the [[Email templates#Email templates fields|validation of your email templates]] - click on the validate expressions button located under the email text body.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Teilnehmer-Opt-out ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use the &#039;&#039;&#039;{OPTOUTURL}&#039;&#039;&#039; tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don&#039;t send them reminder emails. A participant that opts out of your survey will have the email status &#039;OptOut&#039; set in the [[Survey participants|survey participants list]].&lt;br /&gt;
&lt;br /&gt;
==Barebone URL==&lt;br /&gt;
&lt;br /&gt;
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= Ersetzungsfunktion verwenden =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.&lt;br /&gt;
&lt;br /&gt;
The below example uses a plain link to the survey instead of a long url:&lt;br /&gt;
&lt;br /&gt;
1) First, access the email templates panel and choose &#039;&#039;Invitation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
2) Write the text you want to appear as a link to start the survey.&lt;br /&gt;
&lt;br /&gt;
3) Then select that text.&lt;br /&gt;
&lt;br /&gt;
[[File:mark_text_to_hyperlink.jpg]]&lt;br /&gt;
&lt;br /&gt;
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.&lt;br /&gt;
&lt;br /&gt;
[[File:add_link_placeholder_choose_other.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now, when you send out your invitation emails, the link to start the survey will be shorter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Anhänge =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Dateiaktionen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When clicking &#039;&#039;&#039;Add file&#039;&#039;&#039; the following window will be displayed asking you to choose the document from the files folder that you want to send via email:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Upload_files_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.&lt;br /&gt;
&lt;br /&gt;
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the &#039;&#039;&#039;upload&#039;&#039;&#039; button and then selecting the file you want to attach to the respective email template.&lt;br /&gt;
&lt;br /&gt;
Once selected, double click it and the file will be immediately displayed in the &#039;&#039;&#039;Files&#039;&#039;&#039; table, below the &#039;&#039;&#039;Add File&#039;&#039;&#039; button: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Files_table_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have it permanently attached to the respective email template, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the window.&lt;br /&gt;
&lt;br /&gt;
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.&lt;br /&gt;
&lt;br /&gt;
All functions supported by the [[ExpressionScript - Presentation|ExpressionScript]] can be used, as well as token attributes if the survey uses tokens.&lt;br /&gt;
&lt;br /&gt;
With notification or confirmation templates, it is also possible to use [[ExpressionScript - Presentation#Access_to_Variables|question codes]] used in the survey.&lt;br /&gt;
&lt;br /&gt;
If you want to delete a file, click the red trash button located under the Action column and save the changes. &lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=* When a file can not be found on the file system, the email will be sent without an attachment.&lt;br /&gt;
*Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Bildanhang ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Image-email-embed.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|The source must be relative to your public directory on the server. If you LimeSurvey instance is installed in a subdirectory, the image will not be shown in your HTML editor.}}&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/116/de&amp;diff=174422</id>
		<title>Translations:Email templates/116/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/116/de&amp;diff=174422"/>
		<updated>2022-09-14T10:53:29Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;Klicken Sie auf die Registerkarte &amp;#039;&amp;#039;&amp;#039;Bestätigung&amp;#039;&amp;#039;&amp;#039;, wenn Sie die Email-Vorlage bearbeiten möchten. Überprüfen Sie die E-Mail-Vorlagen#E-Mail-Platzhalter|E-Mail-Platzhal...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Klicken Sie auf die Registerkarte &#039;&#039;&#039;Bestätigung&#039;&#039;&#039;, wenn Sie die Email-Vorlage bearbeiten möchten. Überprüfen Sie die [[E-Mail-Vorlagen#E-Mail-Platzhalter|E-Mail-Platzhalter]], um zu sehen, welche PLatzhalter in dieser Email verwendet werden können. Sie können auch das [[ExpressionScript - Presentation|ExpressionScript]] verwenden, um Ihre Email anzupassen.&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174421</id>
		<title>Email templates/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174421"/>
		<updated>2022-09-14T10:52:43Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;Wenn Zugangsschlüssel verwendet werden und ein Teilnehmer die Umfrage ausfüllt, wird eine Bestätigungs-Email an seine Email-Adresse gesendet. Sie können diese Funktion im...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Einleitung=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen werden verwendet um Teilnehmern personalisierte Einladungen, Bestätigungen und Erinnerungen per E-Mail zu schicken. Dies ist von der Umfrageteilnehmerverwaltung aus möglich. Sie können hier auch die Basis und die ausführliche Admin-Benachrichtigung an den Umfrageadministrator anpassen.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Um zur Einstellungsansicht zu kommen, öffnen Sie den Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; und klicken Sie auf den &#039;&#039;&#039;E-Mail Vorlagen&#039;&#039;&#039; Menüpunkt.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] Wenn Sie Superadministratorprivilegien haben  (wenn Sie Zugriff auf die [[Globale Einstellungen| globalen Einstellungen Ihrer LimeSurvey Installation]]), können Sie den Standard HTML-Editor für all Ihre LimeSurvey Nutzer einstellen. Weitere Informationen hierzu bekommen Sie [[Global_settings#General|in diesem Artikel]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=WEnn Sie den HTML editor nutzen möchten, vergessen Sie nicht &#039;&#039;&#039;Benutze HTML-Format für Einladungs-E-Mails&#039;&#039;&#039; zu aktivieren. Diese Einstellung finden Sie im Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; in Ihrer Umfrage, unter dem Punkt [[Teilnehmereinstellungen]].}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=E-mail Vorlagen Ansicht=&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen Ansicht sieht so aus:&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Email templates panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie in dem Screenshot zu sehen ist, wird der &amp;quot;HTML Quellcode&amp;quot; Editormodus genutzt. Diesen können Sie in Ihren  [[First_login_-_your_user_preferences#HTML_editor_mode| persönlichen Einstellungen]] ändern.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Note|Um möglichst einfach mit den Textfeldern zu arbeiten, gehen Sie in Ihre Profileinstellungen und ändern den HTML Editor Modus zu  &#039;&#039;inline HTML Editor&#039;&#039;.}}&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie Sie sehen können gibt es fünf Typen von E-Mails deren Vorlagen Sie bearbeiten können:&lt;br /&gt;
*[[Email templates#Invitation|Einladung]]&lt;br /&gt;
*[[Email templates#Reminder|Erinnerung]]&lt;br /&gt;
*[[Email templates#Confirmation|Bestätigung]]&lt;br /&gt;
*[[Email templates#Registration|Registierung]]&lt;br /&gt;
*[[Email templates#Basic &amp;amp; detailed admin notifications|Basis &amp;amp; Ausführliche  Admin Benachrichtigung]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Einladung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Das Einladungssystem ist nützlich, wenn Sie E-Mails in großen Mengen an alle Befragten aus Ihrer [[Survey participants/de#E-Mail-Einladung senden|Umfrageteilnehmertabelle]] senden möchten, die noch keine Einladung zum Ausfüllen Ihrer Umfrage erhalten haben.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Im Bereich E-Mail-Vorlagen können Sie die Nachricht bearbeiten, die diese Umfrageteilnehmer erreicht. Lesen Sie den folgenden Abschnitt [[Email templates/de#E-Mail-Platzhalter|Wiki-Unterabschnitt]], um zu überprüfen, welche E-Mail-Platzhalter verwendet werden können. Sie können auch [[ExpressionScript - Presentation/de|ExpressionScript]] verwenden, um die Anpassung Ihrer Einladungs-E-Mail-Vorlage zu verbessern.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Erinnerung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die [[Survey_participants#Send_email_reminder|Teilnehmer aus der Umfrageteilnehmertabelle]] an die Beantwortung der Umfrage zu erinnern.&lt;br /&gt;
&lt;br /&gt;
You can edit the default format of the reminder email from the &#039;&#039;Email templates panel&#039;&#039;.  To verify which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. The [[ExpressionScript - Presentation|ExpressionScript]] can help you customize the text body of this email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hinweis:&#039;&#039;&#039; Eine Erinnerung wird nur an diejenigen Teilnehmer in der [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]] verschickt, bei denen das Feld „Abgeschlossen“ noch leer ist. Dies bedeutet, dass der Befragte entweder noch gar nicht an der Umfrage teilgenommen oder sie zumindest noch nicht abgeschlossen hat.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bestätigung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wenn Zugangsschlüssel verwendet werden und ein Teilnehmer die Umfrage ausfüllt, wird eine Bestätigungs-Email an seine Email-Adresse gesendet. Sie können diese Funktion im Bereich [[Teilnehmereinstellungen]] deaktivieren.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;Confirmation&#039;&#039;&#039; tab if you want to edit the email template. Check the [[Email templates#Email placeholders|email placeholders]] to see which ones can be used in this type of email. You may also use the [[ExpressionScript - Presentation|ExpressionScript]] to customize your email.&lt;br /&gt;
&lt;br /&gt;
== Registrierung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&#039;closed-access mode&#039;&#039;&#039; is enabled (there is a [[Survey participants|survey participants table]], which means that only those participants who have an allocated entry and a unique token code associated to it can complete the respective survey. If you allow participants [[Participant settings|to publicly register to your survey]], a new entry in your survey participants table will be created once the respondent has submitted his or her name and email address. A script that runs in the background will automatically send the respective respondent a &#039;&#039;&#039;registration email&#039;&#039;&#039;. It contains the URL with the token that needs to be accessed by the newly registered user.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;registration&#039;&#039;&#039; tab to edit the format of this email. Don&#039;t forget to take a look first at which [[Email templates#Email placeholders|email placeholders]] can be used within the text body. The [[ExpressionScript - Presentation|ExpressionScript]] can provide further customization to the body text you wish to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Grundlegende und detaillierte Administratorbenachrichtigungen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get admin notifications, click the [[Notifications &amp;amp; data|Data management]] tab and type in an email address in the &amp;quot;&#039;&#039;Send basic admin notification email to&#039;&#039;&amp;quot; field and another one (or the same) in the &amp;quot;&#039;&#039;Send detailed admin notification email to&#039;&#039;&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
By default, the only difference between the two is related to the extra placeholder {ANSWERTABLE} that is included in the detailed admin notification email template. This allows the user who receives these kinds of emails to also check the submitted answers.  They do not have to access the LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
However, by using the [[ExpressionScript - Presentation|ExpressionScript]] and the [[Email templates#Email placeholders|email placeholders]] you can customize these two email templates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Vorlagenfelder =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each email template contains:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The subject of the email:&#039;&#039;&#039; The title of the email/batch of emails you want to send;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The email body:&#039;&#039;&#039; A text box that contains the text message you want to send to the participants. It may contain text, images, and [[Email templates#Email placeholders|email placeholders]]. The [[ExpressionScript - Presentation|ExpressionScript]] can also be used to further customize the message you want to deliver; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; Another tab is displayed above the tab with the  email templates tab if your survey uses [[General settings|additional languages]]. If you click any language tab other than the default language tab, the email templates will load the corresponding texts in the respective language. Access each email template in order to start editing them. Do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the screen to save your changes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Email actions:&#039;&#039;&#039; Two actions are available: &lt;br /&gt;
**&#039;&#039;Reset this template:&#039;&#039; Once clicked, the HTML code is reset. No text is deleted;&lt;br /&gt;
**&#039;&#039;Validate expressions:&#039;&#039; Checks the logic of the email - whether the placeholders are correctly used or not. We highly recommend using it before sending a batch of emails. This way you can see whether the placeholders are correctly defined or not. In the below example, a small typo exists - it is emphasized in red.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Validate email - email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Platzhalter =&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=Please note that some email placeholders can be used only within certain email templates! Read below for further details.}}&lt;br /&gt;
&lt;br /&gt;
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your [[Survey participants|survey participants list]]. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.&lt;br /&gt;
&lt;br /&gt;
Below are the email placeholders that can be used within the body message of your invitation and  reminder [[Email templates|email templates]]. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and [[Survey participants|survey participants table]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{ADMINEMAIL}||Email of the Survey admin&lt;br /&gt;
|-&lt;br /&gt;
|{ADMINNAME}||Name of Survey Admin&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||Title of your survey&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||Description of your survey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following placeholders are allowed in invitation/reminder email templates (subject &#039;&#039;&#039;and/or&#039;&#039;&#039; body fields) and they will be replaced when sending out the emails:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{EMAIL}||Email of the recipient&lt;br /&gt;
|-&lt;br /&gt;
|{FIRSTNAME}||First Name&lt;br /&gt;
|-&lt;br /&gt;
|{LASTNAME}||Last Name&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYURL}||The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant&lt;br /&gt;
|-&lt;br /&gt;
|@@SURVEYURL@@||The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)&lt;br /&gt;
|-&lt;br /&gt;
|{OPTOUTURL}||The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{OPTINURL}||If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. &lt;br /&gt;
|-&lt;br /&gt;
|{GLOBALOPTOUTURL}||The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||The token to access the survey&lt;br /&gt;
|-&lt;br /&gt;
|{USESLEFT}|| The number of uses left for the token&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDFROM}|| The date the token is valid from&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDUNTIL}|| The date the token is valid until&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_1}||Attribute 1&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_2}||Attribute 2 (...and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If your survey is &#039;&#039;&#039;not&#039;&#039;&#039; anonymous, the email placeholders can be used in order to add specific entry/participant data into the [[text elements|Survey text elements]] panel (e.g., survey description, welcome message, end message).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{TOKEN:EMAIL}||Displays the email of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||Displays the first name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||Displays the last name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||Displays the token code of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||Displays &amp;quot;Attribute 1&amp;quot; of the participant from the survey participants table &lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||Displays &amp;quot;Attribute 2&amp;quot; of the participant from the survey participants table (and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|To find out more about attributes, read the following [[Survey_participants#Manage_attributes|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
These email placeholders can also be used in the confirmation and admin notification email templates. &lt;br /&gt;
&lt;br /&gt;
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator! &lt;br /&gt;
&lt;br /&gt;
Some of the placeholders that can be used only in the admin notification panels are mentioned below:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{VIEWRESPONSEURL}||Displays an URL that redirects you to the respondent&#039;s submitted answer&lt;br /&gt;
|-&lt;br /&gt;
|{EDITRESPONSEURL}||Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant&lt;br /&gt;
|-&lt;br /&gt;
|{STATISTICSURL}||Click this URL to access the statistics of the survey&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERTABLE}||If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hints:&#039;&#039;&#039;&lt;br /&gt;
* If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.&lt;br /&gt;
* You can use [[ExpressionScript - Presentation|ExpressionScript]] to use expressions for tailoring an email{{NewIn|1.92}}. Please have a look at the [[ExpressionScript How-tos|ExpressionScript how-tos]] for an example.&lt;br /&gt;
* Also have a look at the examples on using [[Questions - introduction#Information from survey participants table|Information from survey participants table]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Box|Before sending the emails, we highly recommend the [[Email templates#Email templates fields|validation of your email templates]] - click on the validate expressions button located under the email text body.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Teilnehmer-Opt-out ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use the &#039;&#039;&#039;{OPTOUTURL}&#039;&#039;&#039; tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don&#039;t send them reminder emails. A participant that opts out of your survey will have the email status &#039;OptOut&#039; set in the [[Survey participants|survey participants list]].&lt;br /&gt;
&lt;br /&gt;
==Barebone URL==&lt;br /&gt;
&lt;br /&gt;
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= Ersetzungsfunktion verwenden =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.&lt;br /&gt;
&lt;br /&gt;
The below example uses a plain link to the survey instead of a long url:&lt;br /&gt;
&lt;br /&gt;
1) First, access the email templates panel and choose &#039;&#039;Invitation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
2) Write the text you want to appear as a link to start the survey.&lt;br /&gt;
&lt;br /&gt;
3) Then select that text.&lt;br /&gt;
&lt;br /&gt;
[[File:mark_text_to_hyperlink.jpg]]&lt;br /&gt;
&lt;br /&gt;
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.&lt;br /&gt;
&lt;br /&gt;
[[File:add_link_placeholder_choose_other.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now, when you send out your invitation emails, the link to start the survey will be shorter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Anhänge =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Dateiaktionen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When clicking &#039;&#039;&#039;Add file&#039;&#039;&#039; the following window will be displayed asking you to choose the document from the files folder that you want to send via email:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Upload_files_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.&lt;br /&gt;
&lt;br /&gt;
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the &#039;&#039;&#039;upload&#039;&#039;&#039; button and then selecting the file you want to attach to the respective email template.&lt;br /&gt;
&lt;br /&gt;
Once selected, double click it and the file will be immediately displayed in the &#039;&#039;&#039;Files&#039;&#039;&#039; table, below the &#039;&#039;&#039;Add File&#039;&#039;&#039; button: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Files_table_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have it permanently attached to the respective email template, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the window.&lt;br /&gt;
&lt;br /&gt;
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.&lt;br /&gt;
&lt;br /&gt;
All functions supported by the [[ExpressionScript - Presentation|ExpressionScript]] can be used, as well as token attributes if the survey uses tokens.&lt;br /&gt;
&lt;br /&gt;
With notification or confirmation templates, it is also possible to use [[ExpressionScript - Presentation#Access_to_Variables|question codes]] used in the survey.&lt;br /&gt;
&lt;br /&gt;
If you want to delete a file, click the red trash button located under the Action column and save the changes. &lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=* When a file can not be found on the file system, the email will be sent without an attachment.&lt;br /&gt;
*Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Bildanhang ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Image-email-embed.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|The source must be relative to your public directory on the server. If you LimeSurvey instance is installed in a subdirectory, the image will not be shown in your HTML editor.}}&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/115/de&amp;diff=174420</id>
		<title>Translations:Email templates/115/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/115/de&amp;diff=174420"/>
		<updated>2022-09-14T10:52:42Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;Wenn Zugangsschlüssel verwendet werden und ein Teilnehmer die Umfrage ausfüllt, wird eine Bestätigungs-Email an seine Email-Adresse gesendet. Sie können diese Funktion im...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wenn Zugangsschlüssel verwendet werden und ein Teilnehmer die Umfrage ausfüllt, wird eine Bestätigungs-Email an seine Email-Adresse gesendet. Sie können diese Funktion im Bereich [[Teilnehmereinstellungen]] deaktivieren.&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174419</id>
		<title>Email templates/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174419"/>
		<updated>2022-09-14T10:52:10Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;==Bestätigung==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Einleitung=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen werden verwendet um Teilnehmern personalisierte Einladungen, Bestätigungen und Erinnerungen per E-Mail zu schicken. Dies ist von der Umfrageteilnehmerverwaltung aus möglich. Sie können hier auch die Basis und die ausführliche Admin-Benachrichtigung an den Umfrageadministrator anpassen.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Um zur Einstellungsansicht zu kommen, öffnen Sie den Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; und klicken Sie auf den &#039;&#039;&#039;E-Mail Vorlagen&#039;&#039;&#039; Menüpunkt.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] Wenn Sie Superadministratorprivilegien haben  (wenn Sie Zugriff auf die [[Globale Einstellungen| globalen Einstellungen Ihrer LimeSurvey Installation]]), können Sie den Standard HTML-Editor für all Ihre LimeSurvey Nutzer einstellen. Weitere Informationen hierzu bekommen Sie [[Global_settings#General|in diesem Artikel]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=WEnn Sie den HTML editor nutzen möchten, vergessen Sie nicht &#039;&#039;&#039;Benutze HTML-Format für Einladungs-E-Mails&#039;&#039;&#039; zu aktivieren. Diese Einstellung finden Sie im Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; in Ihrer Umfrage, unter dem Punkt [[Teilnehmereinstellungen]].}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=E-mail Vorlagen Ansicht=&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen Ansicht sieht so aus:&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Email templates panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie in dem Screenshot zu sehen ist, wird der &amp;quot;HTML Quellcode&amp;quot; Editormodus genutzt. Diesen können Sie in Ihren  [[First_login_-_your_user_preferences#HTML_editor_mode| persönlichen Einstellungen]] ändern.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Note|Um möglichst einfach mit den Textfeldern zu arbeiten, gehen Sie in Ihre Profileinstellungen und ändern den HTML Editor Modus zu  &#039;&#039;inline HTML Editor&#039;&#039;.}}&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie Sie sehen können gibt es fünf Typen von E-Mails deren Vorlagen Sie bearbeiten können:&lt;br /&gt;
*[[Email templates#Invitation|Einladung]]&lt;br /&gt;
*[[Email templates#Reminder|Erinnerung]]&lt;br /&gt;
*[[Email templates#Confirmation|Bestätigung]]&lt;br /&gt;
*[[Email templates#Registration|Registierung]]&lt;br /&gt;
*[[Email templates#Basic &amp;amp; detailed admin notifications|Basis &amp;amp; Ausführliche  Admin Benachrichtigung]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Einladung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Das Einladungssystem ist nützlich, wenn Sie E-Mails in großen Mengen an alle Befragten aus Ihrer [[Survey participants/de#E-Mail-Einladung senden|Umfrageteilnehmertabelle]] senden möchten, die noch keine Einladung zum Ausfüllen Ihrer Umfrage erhalten haben.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Im Bereich E-Mail-Vorlagen können Sie die Nachricht bearbeiten, die diese Umfrageteilnehmer erreicht. Lesen Sie den folgenden Abschnitt [[Email templates/de#E-Mail-Platzhalter|Wiki-Unterabschnitt]], um zu überprüfen, welche E-Mail-Platzhalter verwendet werden können. Sie können auch [[ExpressionScript - Presentation/de|ExpressionScript]] verwenden, um die Anpassung Ihrer Einladungs-E-Mail-Vorlage zu verbessern.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Erinnerung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die [[Survey_participants#Send_email_reminder|Teilnehmer aus der Umfrageteilnehmertabelle]] an die Beantwortung der Umfrage zu erinnern.&lt;br /&gt;
&lt;br /&gt;
You can edit the default format of the reminder email from the &#039;&#039;Email templates panel&#039;&#039;.  To verify which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. The [[ExpressionScript - Presentation|ExpressionScript]] can help you customize the text body of this email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hinweis:&#039;&#039;&#039; Eine Erinnerung wird nur an diejenigen Teilnehmer in der [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]] verschickt, bei denen das Feld „Abgeschlossen“ noch leer ist. Dies bedeutet, dass der Befragte entweder noch gar nicht an der Umfrage teilgenommen oder sie zumindest noch nicht abgeschlossen hat.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bestätigung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If tokens are used and a participant fills out the survey, a confirmation email will be sent to his/her email address. You can deactivate this functionality from the [[Participant settings]] panel.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;Confirmation&#039;&#039;&#039; tab if you want to edit the email template. Check the [[Email templates#Email placeholders|email placeholders]] to see which ones can be used in this type of email. You may also use the [[ExpressionScript - Presentation|ExpressionScript]] to customize your email.&lt;br /&gt;
&lt;br /&gt;
== Registrierung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&#039;closed-access mode&#039;&#039;&#039; is enabled (there is a [[Survey participants|survey participants table]], which means that only those participants who have an allocated entry and a unique token code associated to it can complete the respective survey. If you allow participants [[Participant settings|to publicly register to your survey]], a new entry in your survey participants table will be created once the respondent has submitted his or her name and email address. A script that runs in the background will automatically send the respective respondent a &#039;&#039;&#039;registration email&#039;&#039;&#039;. It contains the URL with the token that needs to be accessed by the newly registered user.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;registration&#039;&#039;&#039; tab to edit the format of this email. Don&#039;t forget to take a look first at which [[Email templates#Email placeholders|email placeholders]] can be used within the text body. The [[ExpressionScript - Presentation|ExpressionScript]] can provide further customization to the body text you wish to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Grundlegende und detaillierte Administratorbenachrichtigungen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get admin notifications, click the [[Notifications &amp;amp; data|Data management]] tab and type in an email address in the &amp;quot;&#039;&#039;Send basic admin notification email to&#039;&#039;&amp;quot; field and another one (or the same) in the &amp;quot;&#039;&#039;Send detailed admin notification email to&#039;&#039;&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
By default, the only difference between the two is related to the extra placeholder {ANSWERTABLE} that is included in the detailed admin notification email template. This allows the user who receives these kinds of emails to also check the submitted answers.  They do not have to access the LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
However, by using the [[ExpressionScript - Presentation|ExpressionScript]] and the [[Email templates#Email placeholders|email placeholders]] you can customize these two email templates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Vorlagenfelder =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each email template contains:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The subject of the email:&#039;&#039;&#039; The title of the email/batch of emails you want to send;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The email body:&#039;&#039;&#039; A text box that contains the text message you want to send to the participants. It may contain text, images, and [[Email templates#Email placeholders|email placeholders]]. The [[ExpressionScript - Presentation|ExpressionScript]] can also be used to further customize the message you want to deliver; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; Another tab is displayed above the tab with the  email templates tab if your survey uses [[General settings|additional languages]]. If you click any language tab other than the default language tab, the email templates will load the corresponding texts in the respective language. Access each email template in order to start editing them. Do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the screen to save your changes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Email actions:&#039;&#039;&#039; Two actions are available: &lt;br /&gt;
**&#039;&#039;Reset this template:&#039;&#039; Once clicked, the HTML code is reset. No text is deleted;&lt;br /&gt;
**&#039;&#039;Validate expressions:&#039;&#039; Checks the logic of the email - whether the placeholders are correctly used or not. We highly recommend using it before sending a batch of emails. This way you can see whether the placeholders are correctly defined or not. In the below example, a small typo exists - it is emphasized in red.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Validate email - email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Platzhalter =&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=Please note that some email placeholders can be used only within certain email templates! Read below for further details.}}&lt;br /&gt;
&lt;br /&gt;
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your [[Survey participants|survey participants list]]. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.&lt;br /&gt;
&lt;br /&gt;
Below are the email placeholders that can be used within the body message of your invitation and  reminder [[Email templates|email templates]]. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and [[Survey participants|survey participants table]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{ADMINEMAIL}||Email of the Survey admin&lt;br /&gt;
|-&lt;br /&gt;
|{ADMINNAME}||Name of Survey Admin&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||Title of your survey&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||Description of your survey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following placeholders are allowed in invitation/reminder email templates (subject &#039;&#039;&#039;and/or&#039;&#039;&#039; body fields) and they will be replaced when sending out the emails:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{EMAIL}||Email of the recipient&lt;br /&gt;
|-&lt;br /&gt;
|{FIRSTNAME}||First Name&lt;br /&gt;
|-&lt;br /&gt;
|{LASTNAME}||Last Name&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYURL}||The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant&lt;br /&gt;
|-&lt;br /&gt;
|@@SURVEYURL@@||The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)&lt;br /&gt;
|-&lt;br /&gt;
|{OPTOUTURL}||The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{OPTINURL}||If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. &lt;br /&gt;
|-&lt;br /&gt;
|{GLOBALOPTOUTURL}||The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||The token to access the survey&lt;br /&gt;
|-&lt;br /&gt;
|{USESLEFT}|| The number of uses left for the token&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDFROM}|| The date the token is valid from&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDUNTIL}|| The date the token is valid until&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_1}||Attribute 1&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_2}||Attribute 2 (...and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If your survey is &#039;&#039;&#039;not&#039;&#039;&#039; anonymous, the email placeholders can be used in order to add specific entry/participant data into the [[text elements|Survey text elements]] panel (e.g., survey description, welcome message, end message).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{TOKEN:EMAIL}||Displays the email of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||Displays the first name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||Displays the last name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||Displays the token code of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||Displays &amp;quot;Attribute 1&amp;quot; of the participant from the survey participants table &lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||Displays &amp;quot;Attribute 2&amp;quot; of the participant from the survey participants table (and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|To find out more about attributes, read the following [[Survey_participants#Manage_attributes|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
These email placeholders can also be used in the confirmation and admin notification email templates. &lt;br /&gt;
&lt;br /&gt;
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator! &lt;br /&gt;
&lt;br /&gt;
Some of the placeholders that can be used only in the admin notification panels are mentioned below:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{VIEWRESPONSEURL}||Displays an URL that redirects you to the respondent&#039;s submitted answer&lt;br /&gt;
|-&lt;br /&gt;
|{EDITRESPONSEURL}||Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant&lt;br /&gt;
|-&lt;br /&gt;
|{STATISTICSURL}||Click this URL to access the statistics of the survey&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERTABLE}||If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hints:&#039;&#039;&#039;&lt;br /&gt;
* If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.&lt;br /&gt;
* You can use [[ExpressionScript - Presentation|ExpressionScript]] to use expressions for tailoring an email{{NewIn|1.92}}. Please have a look at the [[ExpressionScript How-tos|ExpressionScript how-tos]] for an example.&lt;br /&gt;
* Also have a look at the examples on using [[Questions - introduction#Information from survey participants table|Information from survey participants table]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Box|Before sending the emails, we highly recommend the [[Email templates#Email templates fields|validation of your email templates]] - click on the validate expressions button located under the email text body.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Teilnehmer-Opt-out ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use the &#039;&#039;&#039;{OPTOUTURL}&#039;&#039;&#039; tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don&#039;t send them reminder emails. A participant that opts out of your survey will have the email status &#039;OptOut&#039; set in the [[Survey participants|survey participants list]].&lt;br /&gt;
&lt;br /&gt;
==Barebone URL==&lt;br /&gt;
&lt;br /&gt;
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= Ersetzungsfunktion verwenden =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.&lt;br /&gt;
&lt;br /&gt;
The below example uses a plain link to the survey instead of a long url:&lt;br /&gt;
&lt;br /&gt;
1) First, access the email templates panel and choose &#039;&#039;Invitation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
2) Write the text you want to appear as a link to start the survey.&lt;br /&gt;
&lt;br /&gt;
3) Then select that text.&lt;br /&gt;
&lt;br /&gt;
[[File:mark_text_to_hyperlink.jpg]]&lt;br /&gt;
&lt;br /&gt;
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.&lt;br /&gt;
&lt;br /&gt;
[[File:add_link_placeholder_choose_other.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now, when you send out your invitation emails, the link to start the survey will be shorter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Anhänge =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Dateiaktionen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When clicking &#039;&#039;&#039;Add file&#039;&#039;&#039; the following window will be displayed asking you to choose the document from the files folder that you want to send via email:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Upload_files_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.&lt;br /&gt;
&lt;br /&gt;
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the &#039;&#039;&#039;upload&#039;&#039;&#039; button and then selecting the file you want to attach to the respective email template.&lt;br /&gt;
&lt;br /&gt;
Once selected, double click it and the file will be immediately displayed in the &#039;&#039;&#039;Files&#039;&#039;&#039; table, below the &#039;&#039;&#039;Add File&#039;&#039;&#039; button: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Files_table_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have it permanently attached to the respective email template, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the window.&lt;br /&gt;
&lt;br /&gt;
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.&lt;br /&gt;
&lt;br /&gt;
All functions supported by the [[ExpressionScript - Presentation|ExpressionScript]] can be used, as well as token attributes if the survey uses tokens.&lt;br /&gt;
&lt;br /&gt;
With notification or confirmation templates, it is also possible to use [[ExpressionScript - Presentation#Access_to_Variables|question codes]] used in the survey.&lt;br /&gt;
&lt;br /&gt;
If you want to delete a file, click the red trash button located under the Action column and save the changes. &lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=* When a file can not be found on the file system, the email will be sent without an attachment.&lt;br /&gt;
*Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Bildanhang ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Image-email-embed.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|The source must be relative to your public directory on the server. If you LimeSurvey instance is installed in a subdirectory, the image will not be shown in your HTML editor.}}&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/114/de&amp;diff=174418</id>
		<title>Translations:Email templates/114/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/114/de&amp;diff=174418"/>
		<updated>2022-09-14T10:52:09Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;==Bestätigung==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Bestätigung==&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174417</id>
		<title>Email templates/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174417"/>
		<updated>2022-09-14T10:51:58Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;File:help.png &amp;#039;&amp;#039;&amp;#039;Hinweis:&amp;#039;&amp;#039;&amp;#039; Eine Erinnerung wird nur an diejenigen Teilnehmer in der Umfrageteilnehmer-Tabelle verschickt, be...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Einleitung=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen werden verwendet um Teilnehmern personalisierte Einladungen, Bestätigungen und Erinnerungen per E-Mail zu schicken. Dies ist von der Umfrageteilnehmerverwaltung aus möglich. Sie können hier auch die Basis und die ausführliche Admin-Benachrichtigung an den Umfrageadministrator anpassen.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Um zur Einstellungsansicht zu kommen, öffnen Sie den Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; und klicken Sie auf den &#039;&#039;&#039;E-Mail Vorlagen&#039;&#039;&#039; Menüpunkt.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] Wenn Sie Superadministratorprivilegien haben  (wenn Sie Zugriff auf die [[Globale Einstellungen| globalen Einstellungen Ihrer LimeSurvey Installation]]), können Sie den Standard HTML-Editor für all Ihre LimeSurvey Nutzer einstellen. Weitere Informationen hierzu bekommen Sie [[Global_settings#General|in diesem Artikel]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=WEnn Sie den HTML editor nutzen möchten, vergessen Sie nicht &#039;&#039;&#039;Benutze HTML-Format für Einladungs-E-Mails&#039;&#039;&#039; zu aktivieren. Diese Einstellung finden Sie im Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; in Ihrer Umfrage, unter dem Punkt [[Teilnehmereinstellungen]].}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=E-mail Vorlagen Ansicht=&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen Ansicht sieht so aus:&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Email templates panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie in dem Screenshot zu sehen ist, wird der &amp;quot;HTML Quellcode&amp;quot; Editormodus genutzt. Diesen können Sie in Ihren  [[First_login_-_your_user_preferences#HTML_editor_mode| persönlichen Einstellungen]] ändern.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Note|Um möglichst einfach mit den Textfeldern zu arbeiten, gehen Sie in Ihre Profileinstellungen und ändern den HTML Editor Modus zu  &#039;&#039;inline HTML Editor&#039;&#039;.}}&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie Sie sehen können gibt es fünf Typen von E-Mails deren Vorlagen Sie bearbeiten können:&lt;br /&gt;
*[[Email templates#Invitation|Einladung]]&lt;br /&gt;
*[[Email templates#Reminder|Erinnerung]]&lt;br /&gt;
*[[Email templates#Confirmation|Bestätigung]]&lt;br /&gt;
*[[Email templates#Registration|Registierung]]&lt;br /&gt;
*[[Email templates#Basic &amp;amp; detailed admin notifications|Basis &amp;amp; Ausführliche  Admin Benachrichtigung]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Einladung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Das Einladungssystem ist nützlich, wenn Sie E-Mails in großen Mengen an alle Befragten aus Ihrer [[Survey participants/de#E-Mail-Einladung senden|Umfrageteilnehmertabelle]] senden möchten, die noch keine Einladung zum Ausfüllen Ihrer Umfrage erhalten haben.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Im Bereich E-Mail-Vorlagen können Sie die Nachricht bearbeiten, die diese Umfrageteilnehmer erreicht. Lesen Sie den folgenden Abschnitt [[Email templates/de#E-Mail-Platzhalter|Wiki-Unterabschnitt]], um zu überprüfen, welche E-Mail-Platzhalter verwendet werden können. Sie können auch [[ExpressionScript - Presentation/de|ExpressionScript]] verwenden, um die Anpassung Ihrer Einladungs-E-Mail-Vorlage zu verbessern.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Erinnerung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die [[Survey_participants#Send_email_reminder|Teilnehmer aus der Umfrageteilnehmertabelle]] an die Beantwortung der Umfrage zu erinnern.&lt;br /&gt;
&lt;br /&gt;
You can edit the default format of the reminder email from the &#039;&#039;Email templates panel&#039;&#039;.  To verify which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. The [[ExpressionScript - Presentation|ExpressionScript]] can help you customize the text body of this email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hinweis:&#039;&#039;&#039; Eine Erinnerung wird nur an diejenigen Teilnehmer in der [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]] verschickt, bei denen das Feld „Abgeschlossen“ noch leer ist. Dies bedeutet, dass der Befragte entweder noch gar nicht an der Umfrage teilgenommen oder sie zumindest noch nicht abgeschlossen hat.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Confirmation==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If tokens are used and a participant fills out the survey, a confirmation email will be sent to his/her email address. You can deactivate this functionality from the [[Participant settings]] panel.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;Confirmation&#039;&#039;&#039; tab if you want to edit the email template. Check the [[Email templates#Email placeholders|email placeholders]] to see which ones can be used in this type of email. You may also use the [[ExpressionScript - Presentation|ExpressionScript]] to customize your email.&lt;br /&gt;
&lt;br /&gt;
== Registrierung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&#039;closed-access mode&#039;&#039;&#039; is enabled (there is a [[Survey participants|survey participants table]], which means that only those participants who have an allocated entry and a unique token code associated to it can complete the respective survey. If you allow participants [[Participant settings|to publicly register to your survey]], a new entry in your survey participants table will be created once the respondent has submitted his or her name and email address. A script that runs in the background will automatically send the respective respondent a &#039;&#039;&#039;registration email&#039;&#039;&#039;. It contains the URL with the token that needs to be accessed by the newly registered user.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;registration&#039;&#039;&#039; tab to edit the format of this email. Don&#039;t forget to take a look first at which [[Email templates#Email placeholders|email placeholders]] can be used within the text body. The [[ExpressionScript - Presentation|ExpressionScript]] can provide further customization to the body text you wish to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Grundlegende und detaillierte Administratorbenachrichtigungen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get admin notifications, click the [[Notifications &amp;amp; data|Data management]] tab and type in an email address in the &amp;quot;&#039;&#039;Send basic admin notification email to&#039;&#039;&amp;quot; field and another one (or the same) in the &amp;quot;&#039;&#039;Send detailed admin notification email to&#039;&#039;&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
By default, the only difference between the two is related to the extra placeholder {ANSWERTABLE} that is included in the detailed admin notification email template. This allows the user who receives these kinds of emails to also check the submitted answers.  They do not have to access the LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
However, by using the [[ExpressionScript - Presentation|ExpressionScript]] and the [[Email templates#Email placeholders|email placeholders]] you can customize these two email templates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Vorlagenfelder =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each email template contains:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The subject of the email:&#039;&#039;&#039; The title of the email/batch of emails you want to send;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The email body:&#039;&#039;&#039; A text box that contains the text message you want to send to the participants. It may contain text, images, and [[Email templates#Email placeholders|email placeholders]]. The [[ExpressionScript - Presentation|ExpressionScript]] can also be used to further customize the message you want to deliver; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; Another tab is displayed above the tab with the  email templates tab if your survey uses [[General settings|additional languages]]. If you click any language tab other than the default language tab, the email templates will load the corresponding texts in the respective language. Access each email template in order to start editing them. Do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the screen to save your changes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Email actions:&#039;&#039;&#039; Two actions are available: &lt;br /&gt;
**&#039;&#039;Reset this template:&#039;&#039; Once clicked, the HTML code is reset. No text is deleted;&lt;br /&gt;
**&#039;&#039;Validate expressions:&#039;&#039; Checks the logic of the email - whether the placeholders are correctly used or not. We highly recommend using it before sending a batch of emails. This way you can see whether the placeholders are correctly defined or not. In the below example, a small typo exists - it is emphasized in red.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Validate email - email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Platzhalter =&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=Please note that some email placeholders can be used only within certain email templates! Read below for further details.}}&lt;br /&gt;
&lt;br /&gt;
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your [[Survey participants|survey participants list]]. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.&lt;br /&gt;
&lt;br /&gt;
Below are the email placeholders that can be used within the body message of your invitation and  reminder [[Email templates|email templates]]. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and [[Survey participants|survey participants table]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{ADMINEMAIL}||Email of the Survey admin&lt;br /&gt;
|-&lt;br /&gt;
|{ADMINNAME}||Name of Survey Admin&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||Title of your survey&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||Description of your survey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following placeholders are allowed in invitation/reminder email templates (subject &#039;&#039;&#039;and/or&#039;&#039;&#039; body fields) and they will be replaced when sending out the emails:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{EMAIL}||Email of the recipient&lt;br /&gt;
|-&lt;br /&gt;
|{FIRSTNAME}||First Name&lt;br /&gt;
|-&lt;br /&gt;
|{LASTNAME}||Last Name&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYURL}||The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant&lt;br /&gt;
|-&lt;br /&gt;
|@@SURVEYURL@@||The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)&lt;br /&gt;
|-&lt;br /&gt;
|{OPTOUTURL}||The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{OPTINURL}||If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. &lt;br /&gt;
|-&lt;br /&gt;
|{GLOBALOPTOUTURL}||The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||The token to access the survey&lt;br /&gt;
|-&lt;br /&gt;
|{USESLEFT}|| The number of uses left for the token&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDFROM}|| The date the token is valid from&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDUNTIL}|| The date the token is valid until&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_1}||Attribute 1&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_2}||Attribute 2 (...and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If your survey is &#039;&#039;&#039;not&#039;&#039;&#039; anonymous, the email placeholders can be used in order to add specific entry/participant data into the [[text elements|Survey text elements]] panel (e.g., survey description, welcome message, end message).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{TOKEN:EMAIL}||Displays the email of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||Displays the first name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||Displays the last name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||Displays the token code of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||Displays &amp;quot;Attribute 1&amp;quot; of the participant from the survey participants table &lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||Displays &amp;quot;Attribute 2&amp;quot; of the participant from the survey participants table (and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|To find out more about attributes, read the following [[Survey_participants#Manage_attributes|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
These email placeholders can also be used in the confirmation and admin notification email templates. &lt;br /&gt;
&lt;br /&gt;
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator! &lt;br /&gt;
&lt;br /&gt;
Some of the placeholders that can be used only in the admin notification panels are mentioned below:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{VIEWRESPONSEURL}||Displays an URL that redirects you to the respondent&#039;s submitted answer&lt;br /&gt;
|-&lt;br /&gt;
|{EDITRESPONSEURL}||Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant&lt;br /&gt;
|-&lt;br /&gt;
|{STATISTICSURL}||Click this URL to access the statistics of the survey&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERTABLE}||If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hints:&#039;&#039;&#039;&lt;br /&gt;
* If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.&lt;br /&gt;
* You can use [[ExpressionScript - Presentation|ExpressionScript]] to use expressions for tailoring an email{{NewIn|1.92}}. Please have a look at the [[ExpressionScript How-tos|ExpressionScript how-tos]] for an example.&lt;br /&gt;
* Also have a look at the examples on using [[Questions - introduction#Information from survey participants table|Information from survey participants table]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Box|Before sending the emails, we highly recommend the [[Email templates#Email templates fields|validation of your email templates]] - click on the validate expressions button located under the email text body.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Teilnehmer-Opt-out ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use the &#039;&#039;&#039;{OPTOUTURL}&#039;&#039;&#039; tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don&#039;t send them reminder emails. A participant that opts out of your survey will have the email status &#039;OptOut&#039; set in the [[Survey participants|survey participants list]].&lt;br /&gt;
&lt;br /&gt;
==Barebone URL==&lt;br /&gt;
&lt;br /&gt;
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= Ersetzungsfunktion verwenden =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.&lt;br /&gt;
&lt;br /&gt;
The below example uses a plain link to the survey instead of a long url:&lt;br /&gt;
&lt;br /&gt;
1) First, access the email templates panel and choose &#039;&#039;Invitation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
2) Write the text you want to appear as a link to start the survey.&lt;br /&gt;
&lt;br /&gt;
3) Then select that text.&lt;br /&gt;
&lt;br /&gt;
[[File:mark_text_to_hyperlink.jpg]]&lt;br /&gt;
&lt;br /&gt;
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.&lt;br /&gt;
&lt;br /&gt;
[[File:add_link_placeholder_choose_other.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now, when you send out your invitation emails, the link to start the survey will be shorter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Anhänge =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Dateiaktionen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When clicking &#039;&#039;&#039;Add file&#039;&#039;&#039; the following window will be displayed asking you to choose the document from the files folder that you want to send via email:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Upload_files_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.&lt;br /&gt;
&lt;br /&gt;
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the &#039;&#039;&#039;upload&#039;&#039;&#039; button and then selecting the file you want to attach to the respective email template.&lt;br /&gt;
&lt;br /&gt;
Once selected, double click it and the file will be immediately displayed in the &#039;&#039;&#039;Files&#039;&#039;&#039; table, below the &#039;&#039;&#039;Add File&#039;&#039;&#039; button: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Files_table_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have it permanently attached to the respective email template, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the window.&lt;br /&gt;
&lt;br /&gt;
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.&lt;br /&gt;
&lt;br /&gt;
All functions supported by the [[ExpressionScript - Presentation|ExpressionScript]] can be used, as well as token attributes if the survey uses tokens.&lt;br /&gt;
&lt;br /&gt;
With notification or confirmation templates, it is also possible to use [[ExpressionScript - Presentation#Access_to_Variables|question codes]] used in the survey.&lt;br /&gt;
&lt;br /&gt;
If you want to delete a file, click the red trash button located under the Action column and save the changes. &lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=* When a file can not be found on the file system, the email will be sent without an attachment.&lt;br /&gt;
*Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Bildanhang ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Image-email-embed.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|The source must be relative to your public directory on the server. If you LimeSurvey instance is installed in a subdirectory, the image will not be shown in your HTML editor.}}&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/113/de&amp;diff=174416</id>
		<title>Translations:Email templates/113/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/113/de&amp;diff=174416"/>
		<updated>2022-09-14T10:51:57Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;File:help.png &amp;#039;&amp;#039;&amp;#039;Hinweis:&amp;#039;&amp;#039;&amp;#039; Eine Erinnerung wird nur an diejenigen Teilnehmer in der Umfrageteilnehmer-Tabelle verschickt, be...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hinweis:&#039;&#039;&#039; Eine Erinnerung wird nur an diejenigen Teilnehmer in der [[Umfrageteilnehmer|Umfrageteilnehmer-Tabelle]] verschickt, bei denen das Feld „Abgeschlossen“ noch leer ist. Dies bedeutet, dass der Befragte entweder noch gar nicht an der Umfrage teilgenommen oder sie zumindest noch nicht abgeschlossen hat.&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174415</id>
		<title>Email templates/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Email_templates/de&amp;diff=174415"/>
		<updated>2022-09-14T10:50:44Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die Teilnehmer aus der Umfrageteilnehmertabelle an di...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Einleitung=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen werden verwendet um Teilnehmern personalisierte Einladungen, Bestätigungen und Erinnerungen per E-Mail zu schicken. Dies ist von der Umfrageteilnehmerverwaltung aus möglich. Sie können hier auch die Basis und die ausführliche Admin-Benachrichtigung an den Umfrageadministrator anpassen.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Um zur Einstellungsansicht zu kommen, öffnen Sie den Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; und klicken Sie auf den &#039;&#039;&#039;E-Mail Vorlagen&#039;&#039;&#039; Menüpunkt.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] Wenn Sie Superadministratorprivilegien haben  (wenn Sie Zugriff auf die [[Globale Einstellungen| globalen Einstellungen Ihrer LimeSurvey Installation]]), können Sie den Standard HTML-Editor für all Ihre LimeSurvey Nutzer einstellen. Weitere Informationen hierzu bekommen Sie [[Global_settings#General|in diesem Artikel]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=WEnn Sie den HTML editor nutzen möchten, vergessen Sie nicht &#039;&#039;&#039;Benutze HTML-Format für Einladungs-E-Mails&#039;&#039;&#039; zu aktivieren. Diese Einstellung finden Sie im Reiter &#039;&#039;&#039;Einstellungen&#039;&#039;&#039; in Ihrer Umfrage, unter dem Punkt [[Teilnehmereinstellungen]].}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
=E-mail Vorlagen Ansicht=&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Die E-Mail Vorlagen Ansicht sieht so aus:&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Email templates panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie in dem Screenshot zu sehen ist, wird der &amp;quot;HTML Quellcode&amp;quot; Editormodus genutzt. Diesen können Sie in Ihren  [[First_login_-_your_user_preferences#HTML_editor_mode| persönlichen Einstellungen]] ändern.&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
{{Note|Um möglichst einfach mit den Textfeldern zu arbeiten, gehen Sie in Ihre Profileinstellungen und ändern den HTML Editor Modus zu  &#039;&#039;inline HTML Editor&#039;&#039;.}}&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Wie Sie sehen können gibt es fünf Typen von E-Mails deren Vorlagen Sie bearbeiten können:&lt;br /&gt;
*[[Email templates#Invitation|Einladung]]&lt;br /&gt;
*[[Email templates#Reminder|Erinnerung]]&lt;br /&gt;
*[[Email templates#Confirmation|Bestätigung]]&lt;br /&gt;
*[[Email templates#Registration|Registierung]]&lt;br /&gt;
*[[Email templates#Basic &amp;amp; detailed admin notifications|Basis &amp;amp; Ausführliche  Admin Benachrichtigung]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Einladung==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Das Einladungssystem ist nützlich, wenn Sie E-Mails in großen Mengen an alle Befragten aus Ihrer [[Survey participants/de#E-Mail-Einladung senden|Umfrageteilnehmertabelle]] senden möchten, die noch keine Einladung zum Ausfüllen Ihrer Umfrage erhalten haben.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Im Bereich E-Mail-Vorlagen können Sie die Nachricht bearbeiten, die diese Umfrageteilnehmer erreicht. Lesen Sie den folgenden Abschnitt [[Email templates/de#E-Mail-Platzhalter|Wiki-Unterabschnitt]], um zu überprüfen, welche E-Mail-Platzhalter verwendet werden können. Sie können auch [[ExpressionScript - Presentation/de|ExpressionScript]] verwenden, um die Anpassung Ihrer Einladungs-E-Mail-Vorlage zu verbessern.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Erinnerung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die [[Survey_participants#Send_email_reminder|Teilnehmer aus der Umfrageteilnehmertabelle]] an die Beantwortung der Umfrage zu erinnern.&lt;br /&gt;
&lt;br /&gt;
You can edit the default format of the reminder email from the &#039;&#039;Email templates panel&#039;&#039;.  To verify which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. The [[ExpressionScript - Presentation|ExpressionScript]] can help you customize the text body of this email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; A reminder will be sent only to those participants in the [[Survey participants|survey participants table]] where the &amp;quot;&#039;&#039;Completed&#039;&#039;&amp;quot; field is turned off. This means the respondent has either not taken or completed the survey.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Confirmation==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If tokens are used and a participant fills out the survey, a confirmation email will be sent to his/her email address. You can deactivate this functionality from the [[Participant settings]] panel.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;Confirmation&#039;&#039;&#039; tab if you want to edit the email template. Check the [[Email templates#Email placeholders|email placeholders]] to see which ones can be used in this type of email. You may also use the [[ExpressionScript - Presentation|ExpressionScript]] to customize your email.&lt;br /&gt;
&lt;br /&gt;
== Registrierung ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&#039;closed-access mode&#039;&#039;&#039; is enabled (there is a [[Survey participants|survey participants table]], which means that only those participants who have an allocated entry and a unique token code associated to it can complete the respective survey. If you allow participants [[Participant settings|to publicly register to your survey]], a new entry in your survey participants table will be created once the respondent has submitted his or her name and email address. A script that runs in the background will automatically send the respective respondent a &#039;&#039;&#039;registration email&#039;&#039;&#039;. It contains the URL with the token that needs to be accessed by the newly registered user.&lt;br /&gt;
&lt;br /&gt;
Click the &#039;&#039;&#039;registration&#039;&#039;&#039; tab to edit the format of this email. Don&#039;t forget to take a look first at which [[Email templates#Email placeholders|email placeholders]] can be used within the text body. The [[ExpressionScript - Presentation|ExpressionScript]] can provide further customization to the body text you wish to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Grundlegende und detaillierte Administratorbenachrichtigungen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get admin notifications, click the [[Notifications &amp;amp; data|Data management]] tab and type in an email address in the &amp;quot;&#039;&#039;Send basic admin notification email to&#039;&#039;&amp;quot; field and another one (or the same) in the &amp;quot;&#039;&#039;Send detailed admin notification email to&#039;&#039;&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
By default, the only difference between the two is related to the extra placeholder {ANSWERTABLE} that is included in the detailed admin notification email template. This allows the user who receives these kinds of emails to also check the submitted answers.  They do not have to access the LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
However, by using the [[ExpressionScript - Presentation|ExpressionScript]] and the [[Email templates#Email placeholders|email placeholders]] you can customize these two email templates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Vorlagenfelder =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each email template contains:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The subject of the email:&#039;&#039;&#039; The title of the email/batch of emails you want to send;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;The email body:&#039;&#039;&#039; A text box that contains the text message you want to send to the participants. It may contain text, images, and [[Email templates#Email placeholders|email placeholders]]. The [[ExpressionScript - Presentation|ExpressionScript]] can also be used to further customize the message you want to deliver; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; Another tab is displayed above the tab with the  email templates tab if your survey uses [[General settings|additional languages]]. If you click any language tab other than the default language tab, the email templates will load the corresponding texts in the respective language. Access each email template in order to start editing them. Do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the screen to save your changes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Email actions:&#039;&#039;&#039; Two actions are available: &lt;br /&gt;
**&#039;&#039;Reset this template:&#039;&#039; Once clicked, the HTML code is reset. No text is deleted;&lt;br /&gt;
**&#039;&#039;Validate expressions:&#039;&#039; Checks the logic of the email - whether the placeholders are correctly used or not. We highly recommend using it before sending a batch of emails. This way you can see whether the placeholders are correctly defined or not. In the below example, a small typo exists - it is emphasized in red.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Validate email - email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Platzhalter =&lt;br /&gt;
&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=Please note that some email placeholders can be used only within certain email templates! Read below for further details.}}&lt;br /&gt;
&lt;br /&gt;
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your [[Survey participants|survey participants list]]. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.&lt;br /&gt;
&lt;br /&gt;
Below are the email placeholders that can be used within the body message of your invitation and  reminder [[Email templates|email templates]]. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and [[Survey participants|survey participants table]].&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{ADMINEMAIL}||Email of the Survey admin&lt;br /&gt;
|-&lt;br /&gt;
|{ADMINNAME}||Name of Survey Admin&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||Title of your survey&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||Description of your survey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following placeholders are allowed in invitation/reminder email templates (subject &#039;&#039;&#039;and/or&#039;&#039;&#039; body fields) and they will be replaced when sending out the emails:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{EMAIL}||Email of the recipient&lt;br /&gt;
|-&lt;br /&gt;
|{FIRSTNAME}||First Name&lt;br /&gt;
|-&lt;br /&gt;
|{LASTNAME}||Last Name&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYURL}||The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant&lt;br /&gt;
|-&lt;br /&gt;
|@@SURVEYURL@@||The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)&lt;br /&gt;
|-&lt;br /&gt;
|{OPTOUTURL}||The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{OPTINURL}||If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. &lt;br /&gt;
|-&lt;br /&gt;
|{GLOBALOPTOUTURL}||The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||The token to access the survey&lt;br /&gt;
|-&lt;br /&gt;
|{USESLEFT}|| The number of uses left for the token&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDFROM}|| The date the token is valid from&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDUNTIL}|| The date the token is valid until&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_1}||Attribute 1&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_2}||Attribute 2 (...and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If your survey is &#039;&#039;&#039;not&#039;&#039;&#039; anonymous, the email placeholders can be used in order to add specific entry/participant data into the [[text elements|Survey text elements]] panel (e.g., survey description, welcome message, end message).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{TOKEN:EMAIL}||Displays the email of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||Displays the first name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||Displays the last name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||Displays the token code of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||Displays &amp;quot;Attribute 1&amp;quot; of the participant from the survey participants table &lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||Displays &amp;quot;Attribute 2&amp;quot; of the participant from the survey participants table (and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note|To find out more about attributes, read the following [[Survey_participants#Manage_attributes|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
These email placeholders can also be used in the confirmation and admin notification email templates. &lt;br /&gt;
&lt;br /&gt;
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator! &lt;br /&gt;
&lt;br /&gt;
Some of the placeholders that can be used only in the admin notification panels are mentioned below:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{VIEWRESPONSEURL}||Displays an URL that redirects you to the respondent&#039;s submitted answer&lt;br /&gt;
|-&lt;br /&gt;
|{EDITRESPONSEURL}||Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant&lt;br /&gt;
|-&lt;br /&gt;
|{STATISTICSURL}||Click this URL to access the statistics of the survey&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERTABLE}||If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hints:&#039;&#039;&#039;&lt;br /&gt;
* If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.&lt;br /&gt;
* You can use [[ExpressionScript - Presentation|ExpressionScript]] to use expressions for tailoring an email{{NewIn|1.92}}. Please have a look at the [[ExpressionScript How-tos|ExpressionScript how-tos]] for an example.&lt;br /&gt;
* Also have a look at the examples on using [[Questions - introduction#Information from survey participants table|Information from survey participants table]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Box|Before sending the emails, we highly recommend the [[Email templates#Email templates fields|validation of your email templates]] - click on the validate expressions button located under the email text body.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Teilnehmer-Opt-out ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use the &#039;&#039;&#039;{OPTOUTURL}&#039;&#039;&#039; tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don&#039;t send them reminder emails. A participant that opts out of your survey will have the email status &#039;OptOut&#039; set in the [[Survey participants|survey participants list]].&lt;br /&gt;
&lt;br /&gt;
==Barebone URL==&lt;br /&gt;
&lt;br /&gt;
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= Ersetzungsfunktion verwenden =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.&lt;br /&gt;
&lt;br /&gt;
The below example uses a plain link to the survey instead of a long url:&lt;br /&gt;
&lt;br /&gt;
1) First, access the email templates panel and choose &#039;&#039;Invitation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
2) Write the text you want to appear as a link to start the survey.&lt;br /&gt;
&lt;br /&gt;
3) Then select that text.&lt;br /&gt;
&lt;br /&gt;
[[File:mark_text_to_hyperlink.jpg]]&lt;br /&gt;
&lt;br /&gt;
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.&lt;br /&gt;
&lt;br /&gt;
[[File:add_link_placeholder_choose_other.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now, when you send out your invitation emails, the link to start the survey will be shorter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
= E-Mail-Anhänge =&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Dateiaktionen ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When clicking &#039;&#039;&#039;Add file&#039;&#039;&#039; the following window will be displayed asking you to choose the document from the files folder that you want to send via email:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Upload_files_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.&lt;br /&gt;
&lt;br /&gt;
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the &#039;&#039;&#039;upload&#039;&#039;&#039; button and then selecting the file you want to attach to the respective email template.&lt;br /&gt;
&lt;br /&gt;
Once selected, double click it and the file will be immediately displayed in the &#039;&#039;&#039;Files&#039;&#039;&#039; table, below the &#039;&#039;&#039;Add File&#039;&#039;&#039; button: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Files_table_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have it permanently attached to the respective email template, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the window.&lt;br /&gt;
&lt;br /&gt;
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.&lt;br /&gt;
&lt;br /&gt;
All functions supported by the [[ExpressionScript - Presentation|ExpressionScript]] can be used, as well as token attributes if the survey uses tokens.&lt;br /&gt;
&lt;br /&gt;
With notification or confirmation templates, it is also possible to use [[ExpressionScript - Presentation#Access_to_Variables|question codes]] used in the survey.&lt;br /&gt;
&lt;br /&gt;
If you want to delete a file, click the red trash button located under the Action column and save the changes. &lt;br /&gt;
&lt;br /&gt;
{{Alert|title=Attention|text=* When a file can not be found on the file system, the email will be sent without an attachment.&lt;br /&gt;
*Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
== Bildanhang ==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Image-email-embed.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Alert|The source must be relative to your public directory on the server. If you LimeSurvey instance is installed in a subdirectory, the image will not be shown in your HTML editor.}}&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/111/de&amp;diff=174414</id>
		<title>Translations:Email templates/111/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Email_templates/111/de&amp;diff=174414"/>
		<updated>2022-09-14T10:50:43Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Created page with &amp;quot;Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die Teilnehmer aus der Umfrageteilnehmertabelle an di...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Die Funktion „Erinnerung“ bietet Umfrageadministratoren die Möglichkeit, die [[Survey_participants#Send_email_reminder|Teilnehmer aus der Umfrageteilnehmertabelle]] an die Beantwortung der Umfrage zu erinnern.&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Email_templates&amp;diff=174413</id>
		<title>Email templates</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Email_templates&amp;diff=174413"/>
		<updated>2022-09-14T10:48:58Z</updated>

		<summary type="html">&lt;p&gt;Mazi: &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;
&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
The email templates are used to send personalized invitations, reminders, confirmations, and registration emails to your participants (from the survey participants table). You can also edit the standard basic (or detailed) admin notifications that are sent to the survey administrators. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
Email Templates: &#039;&#039;&#039;Settings&#039;&#039;&#039; &amp;gt; &#039;&#039;&#039;Survey menu&#039;&#039;&#039; &amp;gt; &#039;&#039;&#039;Email templates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] If you have the superadministrator permission (you have access to the [[Global settings|global settings of your LimeSurvey installation]]), you can change the Default HTML editor mode for all of your LimeSurvey users. For further details, continue reading [[Global_settings#General|the following wiki subsection]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=If you want to use the popup/inline HTML editor, do not forget to enable the &#039;&#039;&#039;HTML format for token emails&#039;&#039;&#039;! This is located in the &#039;&#039;&#039;Settings menu&#039;&#039;&#039; of your survey, under the [[Participant settings]] tab.}}&lt;br /&gt;
&lt;br /&gt;
=Email Templates Panel= &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
The email templates panel:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Email templates panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
In the above screenshot the &amp;quot;HTML source&amp;quot; editor mode is used. To change it, go to your [[First_login_-_your_user_preferences#HTML_editor_mode|personal account settings]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
{{Note|To edit the text fields, go to your account settings and choose the &#039;&#039;inline HTML editor mode&#039;&#039;.}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
Five types of emails can be sent to users or admins:&lt;br /&gt;
*[[Email templates#Invitation|Invitation]]&lt;br /&gt;
*[[Email templates#Reminder|Reminder]]&lt;br /&gt;
*[[Email templates#Confirmation|Confirmation]]&lt;br /&gt;
*[[Email templates#Registration|Registration]]&lt;br /&gt;
*[[Email templates#Basic &amp;amp; detailed admin notifications|Basic &amp;amp; detailed admin notifications]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Invitation== &amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
This functionality is used to send emails in bulk to all survey participants in the [[Survey participants#Send email invitation|survey participants table]] who have not yet received an invitation to complete your survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
From the email templates panel, you can edit the message sent to survey participants. To check which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. You can also use the [[ExpressionScript - Presentation|ExpressionScript]] to further customize your invitation email template.&lt;br /&gt;
&lt;br /&gt;
==Reminder== &amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
The &#039;&#039;Reminder&#039;&#039; functionality provides a way for survey administrators to remind the [[Survey_participants#Send_email_reminder|participants from the survey participants table]] to answer the survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
You can edit the default format of the reminder email from the &#039;&#039;Email templates panel&#039;&#039;.  To verify which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. The [[ExpressionScript - Presentation|ExpressionScript]] can help you customize the text body of this email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; A reminder will be sent only to those participants in the [[Survey participants|survey participants table]] where the &amp;quot;&#039;&#039;Completed&#039;&#039;&amp;quot; field is turned off. This means the respondent has either not taken or completed the survey.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Confirmation== &amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:115--&amp;gt;&lt;br /&gt;
If tokens are used and a participant fills out the survey, a confirmation email will be sent to his/her email address. You can deactivate this functionality from the [[Participant settings]] panel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:116--&amp;gt;&lt;br /&gt;
Click the &#039;&#039;&#039;Confirmation&#039;&#039;&#039; tab if you want to edit the email template. Check the [[Email templates#Email placeholders|email placeholders]] to see which ones can be used in this type of email. You may also use the [[ExpressionScript - Presentation|ExpressionScript]] to customize your email.&lt;br /&gt;
&lt;br /&gt;
==Registration== &amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
If &#039;&#039;&#039;closed-access mode&#039;&#039;&#039; is enabled (there is a [[Survey participants|survey participants table]], which means that only those participants who have an allocated entry and a unique token code associated to it can complete the respective survey. If you allow participants [[Participant settings|to publicly register to your survey]], a new entry in your survey participants table will be created once the respondent has submitted his or her name and email address. A script that runs in the background will automatically send the respective respondent a &#039;&#039;&#039;registration email&#039;&#039;&#039;. It contains the URL with the token that needs to be accessed by the newly registered user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:119--&amp;gt;&lt;br /&gt;
Click the &#039;&#039;&#039;registration&#039;&#039;&#039; tab to edit the format of this email. Don&#039;t forget to take a look first at which [[Email templates#Email placeholders|email placeholders]] can be used within the text body. The [[ExpressionScript - Presentation|ExpressionScript]] can provide further customization to the body text you wish to use.&lt;br /&gt;
&lt;br /&gt;
==Basic &amp;amp; Detailed Admin Notifications== &amp;lt;!--T:120--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
To get admin notifications, click the [[Notifications &amp;amp; data|Data management]] tab and type in an email address in the &amp;quot;&#039;&#039;Send basic admin notification email to&#039;&#039;&amp;quot; field and another one (or the same) in the &amp;quot;&#039;&#039;Send detailed admin notification email to&#039;&#039;&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
By default, the only difference between the two is related to the extra placeholder {ANSWERTABLE} that is included in the detailed admin notification email template. This allows the user who receives these kinds of emails to also check the submitted answers.  They do not have to access the LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
However, by using the [[ExpressionScript - Presentation|ExpressionScript]] and the [[Email templates#Email placeholders|email placeholders]] you can customize these two email templates.&lt;br /&gt;
&lt;br /&gt;
=Email Templates Fields= &amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
Each email template contains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;The subject of the email:&#039;&#039;&#039; The title of the email/batch of emails you want to send;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;The email body:&#039;&#039;&#039; A text box that contains the text message you want to send to the participants. It may contain text, images, and [[Email templates#Email placeholders|email placeholders]]. The [[ExpressionScript - Presentation|ExpressionScript]] can also be used to further customize the message you want to deliver; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:128--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; Another tab is displayed above the tab with the  email templates tab if your survey uses [[General settings|additional languages]]. If you click any language tab other than the default language tab, the email templates will load the corresponding texts in the respective language. Access each email template in order to start editing them. Do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the screen to save your changes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:129--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Email actions:&#039;&#039;&#039; Two actions are available: &lt;br /&gt;
**&#039;&#039;Reset this template:&#039;&#039; Once clicked, the HTML code is reset. No text is deleted;&lt;br /&gt;
**&#039;&#039;Validate expressions:&#039;&#039; Checks the logic of the email - whether the placeholders are correctly used or not. We highly recommend using it before sending a batch of emails. This way you can see whether the placeholders are correctly defined or not. In the below example, a small typo exists - it is emphasized in red.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:130--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Validate email - email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Email Placeholders= &amp;lt;!--T:138--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=Please note that some email placeholders can be used only within certain email templates! Read below for further details.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your [[Survey participants|survey participants list]]. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
Below are the email placeholders that can be used within the body message of your invitation and  reminder [[Email templates|email templates]]. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and [[Survey participants|survey participants table]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{ADMINEMAIL}||Email of the Survey admin&lt;br /&gt;
|-&lt;br /&gt;
|{ADMINNAME}||Name of Survey Admin&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||Title of your survey&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||Description of your survey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
The following placeholders are allowed in invitation/reminder email templates (subject &#039;&#039;&#039;and/or&#039;&#039;&#039; body fields) and they will be replaced when sending out the emails:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{EMAIL}||Email of the recipient&lt;br /&gt;
|-&lt;br /&gt;
|{FIRSTNAME}||First Name&lt;br /&gt;
|-&lt;br /&gt;
|{LASTNAME}||Last Name&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYURL}||The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant&lt;br /&gt;
|-&lt;br /&gt;
|@@SURVEYURL@@||The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)&lt;br /&gt;
|-&lt;br /&gt;
|{OPTOUTURL}||The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{OPTINURL}||If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. &lt;br /&gt;
|-&lt;br /&gt;
|{GLOBALOPTOUTURL}||The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||The token to access the survey&lt;br /&gt;
|-&lt;br /&gt;
|{USESLEFT}|| The number of uses left for the token&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDFROM}|| The date the token is valid from&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDUNTIL}|| The date the token is valid until&lt;br /&gt;
|-&lt;br /&gt;
|{EMAILSTATUS}|| Used for skipping emails on email sending. Default email status is &amp;quot;OK&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|{LANGUAGE}|| Used to define the language to be used for emails and survey URL when using multilingual surveys&lt;br /&gt;
|-&lt;br /&gt;
|{SENT}|| Invitation send date&lt;br /&gt;
|-&lt;br /&gt;
|{REMINDERSENT }|| Reminder send date&lt;br /&gt;
|-&lt;br /&gt;
|{REMINDERCOUNT}|| Number of reminders already sent&lt;br /&gt;
|-&lt;br /&gt;
|{COMPLETED }|| Survey completion date&lt;br /&gt;
|-&lt;br /&gt;
|{TID}|| Internal ID at token table&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_1}||Attribute 1&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_2}||Attribute 2 (...and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
If your survey is &#039;&#039;&#039;not&#039;&#039;&#039; anonymous, the email placeholders can be used in order to add specific entry/participant data into the [[text elements|Survey text elements]] panel (e.g., survey description, welcome message, end message).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{TOKEN:EMAIL}||Displays the email of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||Displays the first name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||Displays the last name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||Displays the token code of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||Displays &amp;quot;Attribute 1&amp;quot; of the participant from the survey participants table &lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||Displays &amp;quot;Attribute 2&amp;quot; of the participant from the survey participants table (and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:140--&amp;gt;&lt;br /&gt;
{{Note|To find out more about attributes, read the following [[Survey_participants#Manage_attributes|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
These email placeholders can also be used in the confirmation and admin notification email templates. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:142--&amp;gt;&lt;br /&gt;
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator! &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:143--&amp;gt;&lt;br /&gt;
Some of the placeholders that can be used only in the admin notification panels are mentioned below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:144--&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{VIEWRESPONSEURL}||Displays an URL that redirects you to the respondent&#039;s submitted answer&lt;br /&gt;
|-&lt;br /&gt;
|{EDITRESPONSEURL}||Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant&lt;br /&gt;
|-&lt;br /&gt;
|{STATISTICSURL}||Click this URL to access the statistics of the survey&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERTABLE}||If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hints:&#039;&#039;&#039;&lt;br /&gt;
* If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.&lt;br /&gt;
* You can use [[ExpressionScript - Presentation|ExpressionScript]] to use expressions for tailoring an email{{NewIn|1.92}}. Please have a look at the [[ExpressionScript How-tos|ExpressionScript how-tos]] for an example.&lt;br /&gt;
* Also have a look at the examples on using [[Questions - introduction#Information from survey participants table|Information from survey participants table]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
{{Box|Before sending the emails, we highly recommend the [[Email templates#Email templates fields|validation of your email templates]] - click on the validate expressions button located under the email text body.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Participant Opt-out== &amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
When you use the &#039;&#039;&#039;{OPTOUTURL}&#039;&#039;&#039; tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don&#039;t send them reminder emails. A participant that opts out of your survey will have the email status &#039;OptOut&#039; set in the [[Survey participants|survey participants list]].&lt;br /&gt;
&lt;br /&gt;
==Barebone URL== &amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …&lt;br /&gt;
&lt;br /&gt;
=Using Replacement Function= &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
The below example uses a plain link to the survey instead of a long url:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
1) First, access the email templates panel and choose &#039;&#039;Invitation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
2) Write the text you want to appear as a link to start the survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
3) Then select that text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
[[File:mark_text_to_hyperlink.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:150--&amp;gt;&lt;br /&gt;
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
[[File:add_link_placeholder_choose_other.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Now, when you send out your invitation emails, the link to start the survey will be shorter.&lt;br /&gt;
&lt;br /&gt;
= Email Attachments = &amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== File Actions == &amp;lt;!--T:153--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
When clicking &#039;&#039;&#039;Add file&#039;&#039;&#039; the following window will be displayed asking you to choose the document from the files folder that you want to send via email:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
[[File:Upload_files_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the &#039;&#039;&#039;upload&#039;&#039;&#039; button and then selecting the file you want to attach to the respective email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
Once selected, double click it and the file will be immediately displayed in the &#039;&#039;&#039;Files&#039;&#039;&#039; table, below the &#039;&#039;&#039;Add File&#039;&#039;&#039; button: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
[[File:Files_table_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
To have it permanently attached to the respective email template, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
All functions supported by the [[ExpressionScript - Presentation|ExpressionScript]] can be used, as well as token attributes if the survey uses tokens.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
With notification or confirmation templates, it is also possible to use [[ExpressionScript - Presentation#Access_to_Variables|question codes]] used in the survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
If you want to delete a file, click the red trash button located under the Action column and save the changes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=* When a file can not be found on the file system, the email will be sent without an attachment.&lt;br /&gt;
*Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.}}&lt;br /&gt;
&lt;br /&gt;
== Image Attachment == &amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Image-email-embed.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
{{Alert|The source must be relative to your public directory on the server. If you LimeSurvey instance is installed in a subdirectory, the image will not be shown in your HTML editor.}}&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Email_templates&amp;diff=174412</id>
		<title>Email templates</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Email_templates&amp;diff=174412"/>
		<updated>2022-09-14T10:47:48Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Added additional placeholder according to discussion at https://bugs.limesurvey.org/view.php?id=18345#c71701&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;
&lt;br /&gt;
&lt;br /&gt;
=Introduction= &amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
The email templates are used to send personalized invitations, reminders, confirmations, and registration emails to your participants (from the survey participants table). You can also edit the standard basic (or detailed) admin notifications that are sent to the survey administrators. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
Email Templates: &#039;&#039;&#039;Settings&#039;&#039;&#039; &amp;gt; &#039;&#039;&#039;Survey menu&#039;&#039;&#039; &amp;gt; &#039;&#039;&#039;Email templates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] If you have the superadministrator permission (you have access to the [[Global settings|global settings of your LimeSurvey installation]]), you can change the Default HTML editor mode for all of your LimeSurvey users. For further details, continue reading [[Global_settings#General|the following wiki subsection]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=If you want to use the popup/inline HTML editor, do not forget to enable the &#039;&#039;&#039;HTML format for token emails&#039;&#039;&#039;! This is located in the &#039;&#039;&#039;Settings menu&#039;&#039;&#039; of your survey, under the [[Participant settings]] tab.}}&lt;br /&gt;
&lt;br /&gt;
=Email Templates Panel= &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
The email templates panel:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Email templates panel.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
In the above screenshot the &amp;quot;HTML source&amp;quot; editor mode is used. To change it, go to your [[First_login_-_your_user_preferences#HTML_editor_mode|personal account settings]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
{{Note|To edit the text fields, go to your account settings and choose the &#039;&#039;inline HTML editor mode&#039;&#039;.}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
Five types of emails can be sent to users or admins:&lt;br /&gt;
*[[Email templates#Invitation|Invitation]]&lt;br /&gt;
*[[Email templates#Reminder|Reminder]]&lt;br /&gt;
*[[Email templates#Confirmation|Confirmation]]&lt;br /&gt;
*[[Email templates#Registration|Registration]]&lt;br /&gt;
*[[Email templates#Basic &amp;amp; detailed admin notifications|Basic &amp;amp; detailed admin notifications]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Invitation== &amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
This functionality is used to send emails in bulk to all survey participants in the [[Survey participants#Send email invitation|survey participants table]] who have not yet received an invitation to complete your survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
From the email templates panel, you can edit the message sent to survey participants. To check which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. You can also use the [[ExpressionScript - Presentation|ExpressionScript]] to further customize your invitation email template.&lt;br /&gt;
&lt;br /&gt;
==Reminder== &amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
The &#039;&#039;Reminder&#039;&#039; functionality provides a way for survey administrators to remind the [[Survey_participants#Send_email_reminder|participants from the survey participants table]] to answer the survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
You can edit the default format of the reminder email from the &#039;&#039;Email templates panel&#039;&#039;.  To verify which email placeholders can be used, continue reading the following [[Email templates#Email placeholders|wiki subsection]]. The [[ExpressionScript - Presentation|ExpressionScript]] can help you customize the text body of this email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:113--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; A reminder will be sent only to those participants in the [[Survey participants|survey participants table]] where the &amp;quot;&#039;&#039;Completed&#039;&#039;&amp;quot; field is turned off. This means the respondent has either not taken or completed the survey.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Confirmation== &amp;lt;!--T:114--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:115--&amp;gt;&lt;br /&gt;
If tokens are used and a participant fills out the survey, a confirmation email will be sent to his/her email address. You can deactivate this functionality from the [[Participant settings]] panel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:116--&amp;gt;&lt;br /&gt;
Click the &#039;&#039;&#039;Confirmation&#039;&#039;&#039; tab if you want to edit the email template. Check the [[Email templates#Email placeholders|email placeholders]] to see which ones can be used in this type of email. You may also use the [[ExpressionScript - Presentation|ExpressionScript]] to customize your email.&lt;br /&gt;
&lt;br /&gt;
==Registration== &amp;lt;!--T:117--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:118--&amp;gt;&lt;br /&gt;
If &#039;&#039;&#039;closed-access mode&#039;&#039;&#039; is enabled (there is a [[Survey participants|survey participants table]], which means that only those participants who have an allocated entry and a unique token code associated to it can complete the respective survey. If you allow participants [[Participant settings|to publicly register to your survey]], a new entry in your survey participants table will be created once the respondent has submitted his or her name and email address. A script that runs in the background will automatically send the respective respondent a &#039;&#039;&#039;registration email&#039;&#039;&#039;. It contains the URL with the token that needs to be accessed by the newly registered user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:119--&amp;gt;&lt;br /&gt;
Click the &#039;&#039;&#039;registration&#039;&#039;&#039; tab to edit the format of this email. Don&#039;t forget to take a look first at which [[Email templates#Email placeholders|email placeholders]] can be used within the text body. The [[ExpressionScript - Presentation|ExpressionScript]] can provide further customization to the body text you wish to use.&lt;br /&gt;
&lt;br /&gt;
==Basic &amp;amp; Detailed Admin Notifications== &amp;lt;!--T:120--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:121--&amp;gt;&lt;br /&gt;
To get admin notifications, click the [[Notifications &amp;amp; data|Data management]] tab and type in an email address in the &amp;quot;&#039;&#039;Send basic admin notification email to&#039;&#039;&amp;quot; field and another one (or the same) in the &amp;quot;&#039;&#039;Send detailed admin notification email to&#039;&#039;&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:122--&amp;gt;&lt;br /&gt;
By default, the only difference between the two is related to the extra placeholder {ANSWERTABLE} that is included in the detailed admin notification email template. This allows the user who receives these kinds of emails to also check the submitted answers.  They do not have to access the LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:123--&amp;gt;&lt;br /&gt;
However, by using the [[ExpressionScript - Presentation|ExpressionScript]] and the [[Email templates#Email placeholders|email placeholders]] you can customize these two email templates.&lt;br /&gt;
&lt;br /&gt;
=Email Templates Fields= &amp;lt;!--T:124--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:125--&amp;gt;&lt;br /&gt;
Each email template contains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:126--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;The subject of the email:&#039;&#039;&#039; The title of the email/batch of emails you want to send;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:127--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;The email body:&#039;&#039;&#039; A text box that contains the text message you want to send to the participants. It may contain text, images, and [[Email templates#Email placeholders|email placeholders]]. The [[ExpressionScript - Presentation|ExpressionScript]] can also be used to further customize the message you want to deliver; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:128--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Note:&#039;&#039;&#039; Another tab is displayed above the tab with the  email templates tab if your survey uses [[General settings|additional languages]]. If you click any language tab other than the default language tab, the email templates will load the corresponding texts in the respective language. Access each email template in order to start editing them. Do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the screen to save your changes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:129--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Email actions:&#039;&#039;&#039; Two actions are available: &lt;br /&gt;
**&#039;&#039;Reset this template:&#039;&#039; Once clicked, the HTML code is reset. No text is deleted;&lt;br /&gt;
**&#039;&#039;Validate expressions:&#039;&#039; Checks the logic of the email - whether the placeholders are correctly used or not. We highly recommend using it before sending a batch of emails. This way you can see whether the placeholders are correctly defined or not. In the below example, a small typo exists - it is emphasized in red.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:130--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Validate email - email templates.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Email Placeholders= &amp;lt;!--T:138--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:139--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=Please note that some email placeholders can be used only within certain email templates! Read below for further details.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your [[Survey participants|survey participants list]]. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
Below are the email placeholders that can be used within the body message of your invitation and  reminder [[Email templates|email templates]]. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and [[Survey participants|survey participants table]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{ADMINEMAIL}||Email of the Survey admin&lt;br /&gt;
|-&lt;br /&gt;
|{ADMINNAME}||Name of Survey Admin&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYNAME}||Title of your survey&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYDESCRIPTION}||Description of your survey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
The following placeholders are allowed in invitation/reminder email templates (subject &#039;&#039;&#039;and/or&#039;&#039;&#039; body fields) and they will be replaced when sending out the emails:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{EMAIL}||Email of the recipient&lt;br /&gt;
|-&lt;br /&gt;
|{FIRSTNAME}||First Name&lt;br /&gt;
|-&lt;br /&gt;
|{LASTNAME}||Last Name&lt;br /&gt;
|-&lt;br /&gt;
|{SURVEYURL}||The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant&lt;br /&gt;
|-&lt;br /&gt;
|@@SURVEYURL@@||The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later)&lt;br /&gt;
|-&lt;br /&gt;
|{OPTOUTURL}||The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{OPTINURL}||If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. &lt;br /&gt;
|-&lt;br /&gt;
|{GLOBALOPTOUTURL}||The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||The token to access the survey&lt;br /&gt;
|-&lt;br /&gt;
|{USESLEFT}|| The number of uses left for the token&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDFROM}|| The date the token is valid from&lt;br /&gt;
|-&lt;br /&gt;
|{VALIDUNTIL}|| The date the token is valid until&lt;br /&gt;
|-&lt;br /&gt;
|{EMAILSTATUS}|| Used for skipping emails on email sending. Default email status is &amp;quot;OK&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{LANGUAGE}|| To define the language version do be used for emails and survey URL when using multilingual surveys&lt;br /&gt;
|-&lt;br /&gt;
|{SENT}|| Invitation send date&lt;br /&gt;
|-&lt;br /&gt;
|{REMINDERSENT }|| Remindersend date&lt;br /&gt;
|-&lt;br /&gt;
|{REMINDERCOUNT}|| Number of reminders already sent&lt;br /&gt;
|-&lt;br /&gt;
|{COMPLETED }|| Survey completion date&lt;br /&gt;
|-&lt;br /&gt;
|{TID}|| Internal ID at token table&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_1}||Attribute 1&lt;br /&gt;
|-&lt;br /&gt;
|{ATTRIBUTE_2}||Attribute 2 (...and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
If your survey is &#039;&#039;&#039;not&#039;&#039;&#039; anonymous, the email placeholders can be used in order to add specific entry/participant data into the [[text elements|Survey text elements]] panel (e.g., survey description, welcome message, end message).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{TOKEN:EMAIL}||Displays the email of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:FIRSTNAME}||Displays the first name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:LASTNAME}||Displays the last name of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN}||Displays the token code of the participant from the survey participants table&lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_1}||Displays &amp;quot;Attribute 1&amp;quot; of the participant from the survey participants table &lt;br /&gt;
|-&lt;br /&gt;
|{TOKEN:ATTRIBUTE_2}||Displays &amp;quot;Attribute 2&amp;quot; of the participant from the survey participants table (and so on for more attribute fields)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:140--&amp;gt;&lt;br /&gt;
{{Note|To find out more about attributes, read the following [[Survey_participants#Manage_attributes|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:141--&amp;gt;&lt;br /&gt;
These email placeholders can also be used in the confirmation and admin notification email templates. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:142--&amp;gt;&lt;br /&gt;
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator! &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:143--&amp;gt;&lt;br /&gt;
Some of the placeholders that can be used only in the admin notification panels are mentioned below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:144--&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|{VIEWRESPONSEURL}||Displays an URL that redirects you to the respondent&#039;s submitted answer&lt;br /&gt;
|-&lt;br /&gt;
|{EDITRESPONSEURL}||Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant&lt;br /&gt;
|-&lt;br /&gt;
|{STATISTICSURL}||Click this URL to access the statistics of the survey&lt;br /&gt;
|-&lt;br /&gt;
|{ANSWERTABLE}||If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:145--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;[[File:help.png]] &#039;&#039;&#039;Hints:&#039;&#039;&#039;&lt;br /&gt;
* If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.&lt;br /&gt;
* You can use [[ExpressionScript - Presentation|ExpressionScript]] to use expressions for tailoring an email{{NewIn|1.92}}. Please have a look at the [[ExpressionScript How-tos|ExpressionScript how-tos]] for an example.&lt;br /&gt;
* Also have a look at the examples on using [[Questions - introduction#Information from survey participants table|Information from survey participants table]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:146--&amp;gt;&lt;br /&gt;
{{Box|Before sending the emails, we highly recommend the [[Email templates#Email templates fields|validation of your email templates]] - click on the validate expressions button located under the email text body.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Participant Opt-out== &amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
When you use the &#039;&#039;&#039;{OPTOUTURL}&#039;&#039;&#039; tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don&#039;t send them reminder emails. A participant that opts out of your survey will have the email status &#039;OptOut&#039; set in the [[Survey participants|survey participants list]].&lt;br /&gt;
&lt;br /&gt;
==Barebone URL== &amp;lt;!--T:170--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:171--&amp;gt;&lt;br /&gt;
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …&lt;br /&gt;
&lt;br /&gt;
=Using Replacement Function= &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
The below example uses a plain link to the survey instead of a long url:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
1) First, access the email templates panel and choose &#039;&#039;Invitation&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:147--&amp;gt;&lt;br /&gt;
2) Write the text you want to appear as a link to start the survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
3) Then select that text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:149--&amp;gt;&lt;br /&gt;
[[File:mark_text_to_hyperlink.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:150--&amp;gt;&lt;br /&gt;
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:151--&amp;gt;&lt;br /&gt;
[[File:add_link_placeholder_choose_other.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Now, when you send out your invitation emails, the link to start the survey will be shorter.&lt;br /&gt;
&lt;br /&gt;
= Email Attachments = &amp;lt;!--T:152--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== File Actions == &amp;lt;!--T:153--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:154--&amp;gt;&lt;br /&gt;
When clicking &#039;&#039;&#039;Add file&#039;&#039;&#039; the following window will be displayed asking you to choose the document from the files folder that you want to send via email:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:155--&amp;gt;&lt;br /&gt;
[[File:Upload_files_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:156--&amp;gt;&lt;br /&gt;
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:157--&amp;gt;&lt;br /&gt;
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the &#039;&#039;&#039;upload&#039;&#039;&#039; button and then selecting the file you want to attach to the respective email template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:158--&amp;gt;&lt;br /&gt;
Once selected, double click it and the file will be immediately displayed in the &#039;&#039;&#039;Files&#039;&#039;&#039; table, below the &#039;&#039;&#039;Add File&#039;&#039;&#039; button: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:159--&amp;gt;&lt;br /&gt;
[[File:Files_table_-_email_templates.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:160--&amp;gt;&lt;br /&gt;
To have it permanently attached to the respective email template, do not forget to click the &#039;&#039;&#039;Save&#039;&#039;&#039; button located in the upper-right part of the window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:161--&amp;gt;&lt;br /&gt;
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:162--&amp;gt;&lt;br /&gt;
All functions supported by the [[ExpressionScript - Presentation|ExpressionScript]] can be used, as well as token attributes if the survey uses tokens.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:163--&amp;gt;&lt;br /&gt;
With notification or confirmation templates, it is also possible to use [[ExpressionScript - Presentation#Access_to_Variables|question codes]] used in the survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:164--&amp;gt;&lt;br /&gt;
If you want to delete a file, click the red trash button located under the Action column and save the changes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:165--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=* When a file can not be found on the file system, the email will be sent without an attachment.&lt;br /&gt;
*Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.}}&lt;br /&gt;
&lt;br /&gt;
== Image Attachment == &amp;lt;!--T:166--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:167--&amp;gt;&lt;br /&gt;
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:168--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Image-email-embed.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:169--&amp;gt;&lt;br /&gt;
{{Alert|The source must be relative to your public directory on the server. If you LimeSurvey instance is installed in a subdirectory, the image will not be shown in your HTML editor.}}&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=TwoFactorAdminLogin&amp;diff=173752</id>
		<title>TwoFactorAdminLogin</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=TwoFactorAdminLogin&amp;diff=173752"/>
		<updated>2022-05-25T18:50:06Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Fixed limestore and download link&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;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2-Factor-Authentication&#039;&#039;&#039; (2FA) is a way to add additional security to your account. It is called &amp;quot;two-factor-authentication&amp;quot; because two verification methods are used to access your account. The first &amp;quot;factor&amp;quot; is your usual password that is standard for any account. The second &amp;quot;factor&amp;quot; is a verification code retrieved from a 2FA application either from your computer or mobile device. For more details about 2FA and its importance, please visit the following [https://en.wikipedia.org/wiki/Multi-factor_authentication article].&lt;br /&gt;
&lt;br /&gt;
If enabled, a 6 digits code (default value) has to be introduced when you log in to your LimeSurvey instance:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2FA_login.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To learn more about this functionality, please continue reading below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=How to install the 2FA plugin=&lt;br /&gt;
&lt;br /&gt;
==LimeSurvey Cloud==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using LimeSurvey Cloud (hosting provided by [https://limesurvey.org LimeSurvey GmbH]), just visit the [[Plugin manager|Plugin Manager]] page and enable it from there (see below for more details).&lt;br /&gt;
&lt;br /&gt;
==LimeSurvey CE==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the moment, the plugin is not a core component of LimeSurvey CE (Community Edition). To download it, access [https://account.limesurvey.org/limestore LimeStore] and [https://account.limesurvey.org/limestore/extensiondetails/49/plugin/two-factor-administration-login download the plugin from here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|To be able to download it, you need a [https://www.limesurvey.org/editions-and-prices/limesurvey-ce/editions-and-prices-community Premium account].}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once downloaded, unzip it, and move the folder into the plugins-related folder inside your LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|To understand the difference between LimeSurvey Cloud and LimeSurvey CE, please visit this [[LimeSurvey_PRO_vs_LimeSurvey_CE|wiki section]].}}&lt;br /&gt;
&lt;br /&gt;
{{Note|For LimeSurvey 3.x, the folder name inside plugins has to be &#039;&#039;TwoFactorAdminLogin&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
=Activate the 2FA plugin=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To activate your 2FA plugin, access your LimeSurvey instance, and activate it from your [[Plugin manager|Plugin Manager]]: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_activate.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the default settings, please click on &amp;quot;Configure&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Plugin settings==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The configuration page contains the following settings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2FA plugin configuration.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Issuer:&#039;&#039;&#039; The text typed in this box will be displayed in the app as issuer name.&lt;br /&gt;
*&#039;&#039;&#039;Digits:&#039;&#039;&#039; The number of digits the resulting codes will be. Please leave it at 6 for Google Authenticator.&lt;br /&gt;
*&#039;&#039;&#039;TimePeriod:&#039;&#039;&#039; The number of seconds a code will be valid. If you use Google Authenticator, please leave it to 30.&lt;br /&gt;
*&#039;&#039;&#039;Discrepancy:&#039;&#039;&#039; The amount of discrepancy is allowed for the client after the TimePeriod expires (seconds)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Algorithm:&#039;&#039;&#039; The algorithm used to generate a hash:&lt;br /&gt;
**&#039;&#039;SHA1 (Default)&#039;&#039;&lt;br /&gt;
**&#039;&#039;SHA256&#039;&#039;&lt;br /&gt;
**&#039;&#039;MD5&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Force 2FA:&#039;&#039;&#039; If you enable it, all instance users have to create a 2FA token after they log in again into the LimeSurvey instance.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to click on &amp;quot;Save&amp;quot; after updating your 2FA configuration.&lt;br /&gt;
&lt;br /&gt;
=2-Factor-Settings=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you activated the plugin, a new menu item will be displayed on the top bar:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_location.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dropdown menu includes the following two options:&lt;br /&gt;
&lt;br /&gt;
*[[TwoFactorAdminLogin#2FA-Setting|2FA-Setting]]: Users can enable and manage their 2FA settings.&lt;br /&gt;
*[[TwoFactorAdminLogin#2FA-Administration|2FA-Administration]]: With the right permission, you can visualize whether the other instance users use 2FA or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2FA-Setting==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you haven&#039;t created any 2FA-token yet, the following page will be displayed:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_register.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you decide to create a 2FA-token, click on &amp;quot;Register 2FA now&amp;quot;. You will be prompted by the following message box:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_user_settings.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To enable 2FA:&lt;br /&gt;
#Select the 2FA authentication method. By default, five different 2FA types are provided: Google Authenticator (default), Authy, YubiKey, Authenticator Plus, Duo, and HDE OTP.&lt;br /&gt;
#Scan the QR-code with your mobile phone. For a list of application recommendations, check this [https://en.wikipedia.org/wiki/Help:Two-factor_authentication#Enabling_2FA_on_smartphones_and_tablet_computers article].&lt;br /&gt;
#Enter the confirmation key displayed in your 2FA application.&lt;br /&gt;
&lt;br /&gt;
{{Note|From a technical perspective, you can use any 2FA application that supports TOTP (Time-based One-Time Password algorithm). For more information on what TOTP is, please check this [https://en.wikipedia.org/wiki/Time-based_One-time_Password_algorithm article].}}&lt;br /&gt;
&lt;br /&gt;
To confirm the creation of your 2FA-token, click on &amp;quot;Create 2FA binding&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr width=&amp;quot;50%&amp;quot; style=&amp;quot;margin:auto&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once done, the following two options will be displayed in your personal 2FA settings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_unset.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Unset 2FA:&#039;&#039;&#039; Confirm your action to delete the 2FA-token associated to your account.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Please note that you will need to re-authenticate again if &amp;quot;Force 2FA&amp;quot; is enabled from the plugin settings.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Reset 2FA:&#039;&#039;&#039; If this option is selected, you will be asked to scan the new QR-code and introduce the new confirmation Key. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==2FA-Administration==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the necessary permissions, you can have access to the 2FA user management panel from where you can check how many users activated 2FA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2fa_user_management.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Action:&#039;&#039;&#039; A red trash button is displayed in this column next to the users that have enabled 2FA. If someone asks to get the 2FA-token reset because he/she cannot log in anymore into your instance, you can delete the 2FA-token associated with his/her account from here.  &lt;br /&gt;
*&#039;&#039;&#039;Username:&#039;&#039;&#039; All the instance users are listed under this column.&lt;br /&gt;
*&#039;&#039;&#039;Full name:&#039;&#039;&#039;The full name typed in here by your users is displayed in this field.&lt;br /&gt;
*&#039;&#039;&#039;Email:&#039;&#039;&#039; The email address corresponding to your users.&lt;br /&gt;
*&#039;&#039;&#039;2FA-Method:&#039;&#039;&#039; The 2FA-method chosen by each user.&lt;br /&gt;
*&#039;&#039;&#039;2FA enabled:&#039;&#039;&#039; If &amp;quot;1&amp;quot;, it means that 2FA is enabled for the respective user.&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
==I am a super administrator and locked myself out. How can I delete my 2FA-token?==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need access to your database and truncate the 2FA-related column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How can I enforce 2FA to all my users?==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable &amp;quot;Force 2FA&amp;quot; from the plugin configuration menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==From where can I download the plugin?==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please access [https://www.limesurvey.org/limestore LimeStore] and [https://www.limesurvey.org/limestore?view=extensiondetails&amp;amp;id=49 download the plugin from download it from here]. To be able to download it, you need to hold a Premium package&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==I use LimeSurvey Cloud. Do I have to purchase the plugin?==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No. The plugin is already part of the core LimeSurvey plugins - you can enable it by accessing the plugin menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Authentication_plugins&amp;diff=158264</id>
		<title>Authentication plugins</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Authentication_plugins&amp;diff=158264"/>
		<updated>2020-10-26T15:14:18Z</updated>

		<summary type="html">&lt;p&gt;Mazi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an overview of the authentication plugins currently shipped with LimeSurvey. If you want to extend or develop your own authentication plugin, please see [[Authentication_plugin development]]&lt;br /&gt;
&lt;br /&gt;
== Internal database ==&lt;br /&gt;
This plugin is the default and can not be disabled. It uses the built in LimeSurvey database. It is a fall-back mechanism so that you can always login to the installation when needed.&lt;br /&gt;
&lt;br /&gt;
== LDAP ==&lt;br /&gt;
By activating this plugin you can perform basic authentication against an LDAP server. Make sure your PHP configuration has LDAP support enabled.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Enabling and configuring settings for plugin AuthLDAP v2.05+&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Enable LDAP in PHP.INI.&lt;br /&gt;
Verify that [http://php.net/manual/en/function.phpinfo.php phpinfo.php] shows that LDAP is enabled.&lt;br /&gt;
The location of LimeSurvey&#039;s built-in phpinfo.php is: Upper Right Menu -- Configuration -- Settings -- Global Settings.  Then, below the table, you will have a link for &amp;quot;Show PHPInfo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Go to LimeSurvey Plugin Manager.&lt;br /&gt;
&lt;br /&gt;
Configure LDAP plugin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Simple Example settings ===&lt;br /&gt;
* Ldap server e.g. ldap://ldap.mydomain.com: ldap://ldap.mydomain.com&lt;br /&gt;
&lt;br /&gt;
* Port number (default when omitted is 389):&lt;br /&gt;
&lt;br /&gt;
* LDAP version (LDAPv2 = 2), e.g. 3: 3&lt;br /&gt;
&lt;br /&gt;
* Username prefix cn= or uid=: cn=&lt;br /&gt;
&lt;br /&gt;
* Username suffix e.g. @mydomain.com or remaining part of ldap query: ,OU=people,DC=mydomain,DC=com&lt;br /&gt;
&lt;br /&gt;
* Create a LimeSurvey administrator with the same name as a AD(active directory) user account.&lt;br /&gt;
&lt;br /&gt;
* Log in using the AD credentials(username and password).&lt;br /&gt;
&lt;br /&gt;
=== Example settings AD2008 &amp;amp; 2.05+ ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Settings working with Active Directory 2008 and 2.05+ (build 140520) with AuthLDAP plugin &#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Authentication with LDAP and &#039;&#039;userPrincipalName&#039;&#039; attribute ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Authentication with &#039;&#039;userPrincipalName&#039;&#039; attribute (ie: firstname.lastname@example.intra). Create a LimeSurvey user with the same name as a AD(active directory) user account :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Username&#039;&#039;: &#039;&#039;&#039;firstname.lastname@example.intra&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Email&#039;&#039;: &#039;&#039;&#039;firstname.lastname@example.intra&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Full name&#039;&#039;: &#039;&#039;&#039;Firstname LASTNAME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then configure the plugin : &#039;&#039;Plugin Manager &amp;gt; LDAP &amp;gt; Configure&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Ldap server e.g. ldap://ldap.example.intra&#039;&#039;: &#039;&#039;&#039;ldap://ldap.example.intra&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Port number (default when omitted is 389)&#039;&#039;: &#039;&#039;&#039;389&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;LDAP version (LDAPv2 = 2), e.g. 3&#039;&#039;: &#039;&#039;&#039;LDAPv3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Username prefix cn= or uid=: cn=&#039;&#039;: &#039;&#039;&#039;empty&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Username suffix e.g. @example.intra or remaining part of ldap query&#039;&#039;: &#039;&#039;&#039;empty&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Log in using the AD credentials (username: &#039;&#039;&#039;firstname.lastname@example.intra&#039;&#039;&#039; and password).&lt;br /&gt;
&lt;br /&gt;
==== Authentication with LDAP and &#039;&#039;sAMaccountName&#039;&#039; attribute ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Authentication with &#039;&#039;sAMaccountName&#039;&#039; attribute (ie: firstname.lastname). Create a LimeSurvey user with the same name as a AD(active directory) user account :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Username&#039;&#039;: &#039;&#039;&#039;firstname.lastname&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Email&#039;&#039;: &#039;&#039;&#039;firstname.lastname@example.intra&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Full name&#039;&#039;: &#039;&#039;&#039;Firstname LASTNAME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then configure the plugin : &#039;&#039;Plugin Manager &amp;gt; LDAP &amp;gt; Configure&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Ldap server e.g. ldap://ldap.example.com&#039;&#039;: &#039;&#039;&#039;ldap://ldap.example.intra&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Port number (default when omitted is 389)&#039;&#039;: &#039;&#039;&#039;389&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;LDAP version (LDAPv2 = 2), e.g. 3&#039;&#039;: &#039;&#039;&#039;LDAPv3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Username prefix cn= or uid=: cn=&#039;&#039;: &#039;&#039;&#039;empty&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Username suffix e.g. @example.com or remaining part of ldap query&#039;&#039;: &#039;&#039;&#039;@example.intra&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Log in using the AD credentials (username: &#039;&#039;&#039;firstname.lastname&#039;&#039;&#039; and password).&lt;br /&gt;
&lt;br /&gt;
==== Authentication with LDAPS and &#039;&#039;sAMaccountName&#039;&#039; attribute ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Authentication with &#039;&#039;sAMaccountName&#039;&#039; attribute (ie: firstname.lastname). Create a LimeSurvey user with the same name as a AD(active directory) user account :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Username&#039;&#039;: &#039;&#039;&#039;firstname.lastname&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Email&#039;&#039;: &#039;&#039;&#039;firstname.lastname@example.intra&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Full name&#039;&#039;: &#039;&#039;&#039;Firstname LASTNAME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then configure the plugin : &#039;&#039;Plugin Manager &amp;gt; LDAP &amp;gt; Configure&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Ldap server e.g. ldap://ldap.example.com&#039;&#039;: &#039;&#039;&#039;ldaps://ldap.example.intra&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Port number (default when omitted is 389)&#039;&#039;: &#039;&#039;&#039;636&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;LDAP version (LDAPv2 = 2), e.g. 3&#039;&#039;: &#039;&#039;&#039;LDAPv3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Username prefix cn= or uid=: cn=&#039;&#039;: &#039;&#039;&#039;empty&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Username suffix e.g. @example.intra or remaining part of ldap query&#039;&#039;: &#039;&#039;&#039;@example.intra&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Log in using the AD credentials (username: &#039;&#039;&#039;firstname.lastname&#039;&#039;&#039; and password).&lt;br /&gt;
&lt;br /&gt;
=== Example settings OpenLDAP &amp;amp; 2.05+ ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Settings working with OpenLDAP and 2.05+ (git version Feb. 2015) with AuthLDAP plugin &#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Authentication with LDAP and &#039;&#039;uid&#039;&#039; attribute ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Authentication with &#039;&#039;uid&#039;&#039; attribute. Create a LimeSurvey user with the same name as a the LDAP user account.&lt;br /&gt;
&lt;br /&gt;
Then configure the plugin : &#039;&#039;Plugin Manager &amp;gt; LDAP &amp;gt; Configure&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Ldap server e.g. ldap://ldap.mydomain.com&#039;&#039;: &#039;&#039;&#039;ldap://ldap.mydomain.com&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;Port number (default when omitted is 389)&#039;&#039;: &#039;&#039;&#039;(389 or leave blank)&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;LDAP version (LDAPv2 = 2), e.g. 3&#039;&#039;: &#039;&#039;&#039;LDAPv3&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;Select true if referrals must be followed (use false for ActiveDirectory)&#039;&#039;: &#039;&#039;&#039;(leave blank)&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;Check to enable Start-TLS encryption When using LDAPv3&#039;&#039;: &#039;&#039;&#039;False&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;Select how to perform authentication&#039;&#039;: &#039;&#039;&#039;Search and bind&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;Attribute to compare to the given login can be uid, cn, mail, ...&#039;&#039;: &#039;&#039;&#039;uid&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;Base DN for the user search operation&#039;&#039;: &#039;&#039;&#039;ou=people,dc=mydomain,dc=com&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;Optional extra LDAP filter to be ANDed to the basic (searchuserattribute=username) filter. Don&#039;t forget the outmost enclosing parentheses&#039;&#039;: &#039;&#039;&#039;(leave blank)&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;Optional DN of the LDAP account used to search for the end-user&#039;s DN. An anonymous bind is performed if empty.&#039;&#039;: &#039;&#039;&#039;cn=admin,dc=mydomain,dc=com&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;Password of the LDAP account used to search for the end-user&#039;s DN if previoulsy set.&#039;&#039;: &#039;&#039;&#039;password&#039;&#039;&#039; (appears!)&lt;br /&gt;
* &#039;&#039;Check to make default authentication method&#039;&#039;: &#039;&#039;&#039;(as you wish)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Log in using the LDAP credentials (username: &#039;&#039;&#039;user&#039;&#039;&#039; and password).&lt;br /&gt;
&lt;br /&gt;
==== Authentication with OpenLDAP, &#039;&#039;uid&#039;&#039; attribute, and group restriction [2.62+] ====&lt;br /&gt;
&lt;br /&gt;
Some applications require a separate LDAP query (beyond the user search and bind to check password) to determine if the user has sufficient authorization. For example, let&#039;s assume that LDAP has a &amp;lt;code&amp;gt;Groups&amp;lt;/code&amp;gt; OU that includes an entry identified by &amp;lt;code&amp;gt;cn=limeusers&amp;lt;/code&amp;gt; and our policy is that for a user to be authorized to use LimeSurvey that entry must include an attribute of the form &amp;lt;code&amp;gt;memberUid=&amp;lt;i&amp;gt;username&amp;lt;/i&amp;gt;&amp;lt;/code&amp;gt; where &#039;&#039;username&#039;&#039; is the username (uid) entered by the user attempting to login. To configure LDAP for that, set up basic &#039;&#039;uid&#039;&#039; authentication as above and then set the following additional (optional) parameters:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Optional base DN for group restriction&#039;&#039;: &amp;lt;code&amp;gt;ou=Groups,dc=mydomain,dc=com&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;Optional filter for group restriction&#039;&#039;: &amp;lt;code&amp;gt;(&amp;amp;(cn=limeusers)(memberUid=$username))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
# &amp;lt;code&amp;gt;$username&amp;lt;/code&amp;gt; is a magic value (in the context of the filter parameter) that is replaced by the username entered by the user when logging in.&lt;br /&gt;
# Although intended for testing group membership as above, this optional &amp;quot;group restriction&amp;quot; capability can be used to add any authorization check that can be expressed as a separate filtered search like this.&lt;br /&gt;
# Before specifying a group restriction this way, verify that basic LDAP authentication is working correctly.&lt;br /&gt;
# If either of the group restriction parameters is empty then the group restriction step will not be applied.&lt;br /&gt;
&lt;br /&gt;
== Webserver authentication ==&lt;br /&gt;
&lt;br /&gt;
This plugin leaves authentication to the webserver and reads the result from a configurable server setting. This method has been around for a while, and was configured from config.php. If you used this authentication, you should enable the plugin in the plugins menu and move your configuration from config.php to the plugin&#039;s settings. Feel free to contact the team via the bugtracker or irc-channel if it no longer functions the way it did before.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Question_types/de&amp;diff=154359</id>
		<title>Question types/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Question_types/de&amp;diff=154359"/>
		<updated>2020-09-11T07:05:54Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Fixed broken link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Einführung=&lt;br /&gt;
&lt;br /&gt;
Diese Seite bietet Ihnen einen Überblick über alle verfügbaren Fragetypen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt; [[File: help.png]] Das LimeSurvey-Downloadpaket enthält eine Beispielumfrage, die alle Fragetypen enthält. Sie finden es in Ihrem Verzeichnis &#039;&#039;/docs/demosurveys/&#039;&#039;. Sie können diese Umfrage importieren, um sich einen Überblick zu verschaffen. &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bitte beachten Sie, dass Sie [[Question groups - introduction/de|Fragengruppen]] erstellen müssen, bevor sie Fragen erstellen können.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Fragetypen (Allgemeines)=&lt;br /&gt;
&lt;br /&gt;
Wenn Sie einen Frage anlegen/bearbeiten, können Sie über die Registerkarte &#039;&#039;&#039;Allgemeine Optionen&#039;&#039;&#039; den Fragentyp festlegen:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Fragetyp ändern.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Wählen dann Sie im Menü &#039;&#039;Fragetyp wählen&#039;&#039; den gewünschten Fragetyp aus:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Fragetyp auswählen.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Grundlegende Informationen zu Fragen finden Sie [[Questions - introduction|hier]].}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr width=&amp;quot;50%&amp;quot; style=&amp;quot;margin:auto&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Die folgenden Kategorien von Fragetypen können in einer Umfrage verwendet werden:&lt;br /&gt;
&lt;br /&gt;
*[[Question types/de#Einfachauswahl|Einfachauswahl]]&lt;br /&gt;
*[[Question types/de#Textfragen|Textfragen]]&lt;br /&gt;
*[[Question types/de#Maskenfragen|Maskenfragen]]&lt;br /&gt;
*[[Question types/de#Matrixfragen|Matrixfragen]]&lt;br /&gt;
*[[Question types/de#Mehrfachauswahl|Mehrfachauswahl]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Teilfragen==&lt;br /&gt;
&lt;br /&gt;
Üblicherweise hat eine Frage nur Antwortoptionen. Es gibt aber bestimmte Fragetypen (wie die Matrix) die eigentlich eine Zusammenfassung mehrerer Teilfragen sind, wobei jede Teilfrage vom Teilnehmer der Umfrage einzeln beantwortet werden kann (beispielsweise unter Nutzung einer vordefinierten Skala von Antwortoptionen).&lt;br /&gt;
&lt;br /&gt;
[[File:F_AFL.png]]&lt;br /&gt;
&lt;br /&gt;
Ein etwas komplexeres Beispiel ist der Fragetyp &#039;Matrix (Texte)&#039;, in dem der Teilnehmer die Möglichkeit zur Texteingabe für bestimmte Kombinationen hat. In diesem Fall ist diese Eingabe die &#039;Antwort&#039; und die Zeilen- bzw. Spaltenbezeichnungen stellen die Teilfragen dar.&lt;br /&gt;
&lt;br /&gt;
[[File:SC_MFT.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Matrixfragen=&lt;br /&gt;
&lt;br /&gt;
Im Prinzip ist der Fragentyp Matrix eine andere Darstellung des von Listenfragen. Die Matrix ermöglicht die Darstellung von Teilfragen in Spalten, wobei für jede Zeile dieselben Antwortoptionen angeboten werden. Der Text kann eine spezifische Frage sein oder auch nur eine Beschreibung.&lt;br /&gt;
&lt;br /&gt;
Bei der Ausgabe gibt es keinen Unterschied zum Fragentyp Liste (Einfachauswahl).&lt;br /&gt;
&lt;br /&gt;
Die flexibelsten Matrix-Fragetypen sind &#039;&#039;Matrix&#039;&#039;, &#039;&#039;Matrix (Texte)&#039;&#039; und &#039;&#039; Matrix (Zahlen)&#039;&#039;. LimeSurvey unterstützt jedoch auch einige Matrix-Fragetypen mit vordefinierten Antwortoptionen (z. B. &#039;&#039;Matrix (5 Punkte Auswahl)&#039;&#039;, &#039;&#039;Matrix (Zunahme/Gleich/Abnahme)&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&#039;simplebox&#039;&amp;gt; [[File: help.png]] Um die Grundlagen von Array-Fragen schnell zu verstehen, überprüfen Sie das folgende (englische) [https://www.youtube.com/watch?v=7134QebOQzY Video-Tutorial]. &amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Matrix==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Array/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 1:&#039;&#039;&#039; [[Media:Question tpye - Array using flexible labels.zip|Question type - Array using flexible labels.zip]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example 2:&#039;&#039;&#039; [[Media:Question type - Array - Semantic Differential Question Type.zip|Question type - Array - Semantic Differential Question Type.zip]]&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Array/de|hier]].&lt;br /&gt;
&lt;br /&gt;
==Matrix (5 Punkte Auswahl)==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Array (5 point choice)/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Array (5 point choice)/de|hier]].&lt;br /&gt;
&lt;br /&gt;
==Matrix (10 Punkte Auswahl)==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Array (10 point choice)/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Array (10 point choice)/de|hier]].&lt;br /&gt;
&lt;br /&gt;
==Matrix (Ja/Nein/Unsicher)==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Array (Yes-No-Uncertain)/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Array (Yes-No-Uncertain)/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Matrix (Zunahme/Gleich/Abnahme)==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Array (Increase-Same-Decrease)/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Array (Increase-Same-Decrease)/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Matrix nach Spalte==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Array by column/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Array by column/de|hier]].&lt;br /&gt;
&lt;br /&gt;
==Dual Matrix==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Array dual scale/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Array dual scale/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Matrix (Zahlen) ==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Array (Numbers)/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Array (Numbers)/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Matrix (Texte) ==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Array (Texts)/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Array (Texts)/de|hier]].&lt;br /&gt;
&lt;br /&gt;
=Maskenfragen=&lt;br /&gt;
&lt;br /&gt;
Unter der Kategorie Masenkenfragen werden jene Fragen verstanden, bei denen die Antworten vordefiniert sind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Datum/Zeit==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Date/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Date/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Datei-Upload==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - File upload/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - File upload/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Geschlecht==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Gender/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
-&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Gender/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sprachwechsel==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Language switch/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Language switch/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Zahleneingabe==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Numerical input/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Numerical input/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Mehrfache numerische Eingabe==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Multiple numerical input/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Multiple numerical input/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reihenfolge==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Ranking/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Ranking/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Textanzeige ==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Text display/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Text display/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ja/Nein ==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Yes-No/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Yes-No/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Gleichung==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Equation/de|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Mehr Informationen finden Sie [[Question type - Equation/de|hier]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Mehrfachauswahl=&lt;br /&gt;
&lt;br /&gt;
Es gibt Fragen, bei denen die Teilnehmer mehrere Antwortmöglichkeiten aus einer Auswahl auswählen sollen. Dies können Sie über den Fragetyp &#039;&#039;Mehrfachauswahl&#039;&#039; erreichen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mehrfachauswahl ==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Multiple choice|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Find out [[Question type - Multiple choice|more about the Multiple Choice Question type...]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mehrfachauswahl mit Kommentar ==&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Multiple choice with comments|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Find out [[Question type - Multiple choice with comments|more about the Multiple Choice With Comments question type...]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Einfachauswahl=&lt;br /&gt;
&lt;br /&gt;
Single choice questions are those where the participant can only pick a single predefined answer option.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===5 point choice===&lt;br /&gt;
&lt;br /&gt;
{{:Question type - 5 point choice|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Find out [[Question type - 5 point choice|more about the 5 Point Choice question type...]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===List (Dropdown)===&lt;br /&gt;
&lt;br /&gt;
{{:Question type - List (Dropdown)|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Find out [[Question type - List (Dropdown)|more about the List Dropdown question type...]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===List (Radio)===&lt;br /&gt;
&lt;br /&gt;
{{:Question type - List (Radio)|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Find out [[Question type - List (Radio)|more about the List Radio question type...]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===List with comment===&lt;br /&gt;
&lt;br /&gt;
{{:Question type - List with comment|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Find out [[Question type - List with comment |more about the List with comment question type...]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Textfragen=&lt;br /&gt;
&lt;br /&gt;
LimeSurvey provides a number of possible variations of the standard text field. All of these can be defined further using the attributes of the question which permit to restrict the number of characters as well as the size of the field.&lt;br /&gt;
&lt;br /&gt;
Furthermore text input can be validated by [[Using regular expressions|using regular expressions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Short free text===&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Short free text|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Find out [[Question type - Short free text|more about the Short Free Text question type...]]&lt;br /&gt;
&lt;br /&gt;
===Long free text===&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Long free text|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Find out [[Question type - Long free text|more about the Long Free Text question type...]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Huge free text===&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Huge free text|transcludesection=short_description}}&lt;br /&gt;
&lt;br /&gt;
Find out [[Question type - Huge free text|more about the Huge Free Text question type...]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Multiple short text===&lt;br /&gt;
&lt;br /&gt;
{{:Question type - Multiple short text|transcludesection=short_description}}&lt;br /&gt;
Find out [[Question type - Multiple short text|more about the Multiple Short Text question type...]]&lt;br /&gt;
&lt;br /&gt;
=Fragen-Design=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;&lt;br /&gt;
Es ist möglich, in der Regel das Frage Layout/Design durch die Verwendung von CSS zu bearbeiten. Mehr Informationen finden Sie unter [[The template editor/de|Fragenlayout mit CSS]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Translations:Question_types/79/de&amp;diff=154358</id>
		<title>Translations:Question types/79/de</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Translations:Question_types/79/de&amp;diff=154358"/>
		<updated>2020-09-11T07:05:53Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Fixed broken link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mehr Informationen finden Sie [[Question type - Equation/de|hier]].&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=153869</id>
		<title>Theme editor</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Theme_editor&amp;diff=153869"/>
		<updated>2020-09-07T06:17:34Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Added CSS details for eqaution question type&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 an advanced theme and style system providing to developers an efficient way to customize the survey appearance. Since LS3, we&#039;re not speaking anymore about &#039;&#039;&#039;&amp;quot;templates&amp;quot;&#039;&#039;&#039; like in previous versions, but about &#039;&#039;&#039;&amp;quot;themes&amp;quot;&#039;&#039;&#039;. The &#039;&#039;&#039;themes&#039;&#039;&#039; allow control over the look and feel of pages during a survey. A survey administrator can select a default theme that will be used for each survey to further personalize it and improve its look and feel. &#039;&#039;&#039;Themes&#039;&#039;&#039;  come with options that provide to admin without coding skill a simple way to add a logo on the welcome page, to change the background colors, to select a font, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
LimeSurvey comes with 3 themes right out of the box. These initial themes are defined by directories located in the LimeSurvey installation &amp;quot;themes/survey/&amp;quot; directory. Each theme has its own directory. Within the main directory of a theme you&#039;ll find a configuration file in XML, and numerous directories containing the views &#039;&#039;&#039;themes (.twig)&#039;&#039;&#039;, &#039;&#039;&#039;cascading style sheets (.css)&#039;&#039;&#039;, &#039;&#039;&#039;scripts&#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;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Since LimeSurvey 2.50, the theme engine use [http://getbootstrap.com/docs/3.3/ Bootstrap 3]  as CSS framework. Bootstrap 3 being a standard framework, developers will find a lot of documentation, tutorials and forum threads about it on Internet. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:312--&amp;gt;&lt;br /&gt;
Since LimeSurvey 3, the theme engine use [https://twig.symfony.com Twig], so the theme developers can change the logic of the survey rendering in a safe and easy way. Twig replace the old system of replacement keywords that was used in the previous versions. The logic that was used to generate the HTML of the keywords are now available inside the theme&#039;s views. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:313--&amp;gt;&lt;br /&gt;
Snippet from Vanilla Theme:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;twig&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;{{ aSurveyInfo.class.answercontainer }} col-xs-12&amp;quot; {{ aSurveyInfo.attr.answercontainer }}&amp;gt;&lt;br /&gt;
    {# NOTE: If you want to customize the question rendering, use a question theme #}&lt;br /&gt;
    {{ aQuestion.answer | raw }}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Themes, being HTML and Twig 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 of them 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 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 Theme file. Finally, special keywords in curly braces are replaced with text defined in the survey for each language translation correspondent (for example, the &#039;Survey Title&#039; or &#039;Question Text&#039; 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 theme, please consider contributing it back to the LimeSurvey community and make it available to others. With your help, we can grow our repository of themes, surveys, and other add-ons to make LimeSurvey even better! &lt;br /&gt;
See our [https://www.limesurvey.org/index.php?option=com_sobipro&amp;amp;sid=55:Templates&amp;amp;Itemid=729 LimeSurvey template repository] where you can share your templates.&lt;br /&gt;
&lt;br /&gt;
=Creating a new theme= &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 theme (or edit an existing theme), you need [[Manage users#Set global permissions for a user|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;&amp;lt;span style=&#039;color:red&#039;&amp;gt;&#039;&#039;&#039;Note of Warning:&#039;&#039;&#039;&amp;lt;/span&amp;gt; If you change themes, you could also affect all the pre-existing surveys from your LimeSurvey installation. Themes are an advanced feature that require experience and HTML knowledge in order to make them running smoothly.&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 theme is through the &#039;&#039;&#039;Theme Editor&#039;&#039;&#039; (see below), which is located in the &#039;&#039;&#039;Configuration&#039;&#039;&#039; dialog. Some people may like to work directly with theme files so that they can use their favorite text editor instead of the web interface. In this case, still use the Theme Editor to first create your new theme. This will create a new base theme with all the files you need in the &#039;&#039;LimeSurvey_web_root/upload/themes/survey/your_new_template&#039;&#039; 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 theme files will be owned by the group and user where the web server is running (may be &amp;quot;www&amp;quot; for some systems). So, make sure you have enough access to edit these files, When you save them, make sure they don&#039;t change ownership! In this way, you can still use the web Theme Editing interface if needed.&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
A number of &#039;public&#039; elements of LimeSurvey can be adjusted by a series of themes. The next section provides a very brief explanation of these templates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
{{Note|Themes files may seem complex. Besides HTML, you might also need to understand CSS, Twig, and JavaScript.}}&lt;br /&gt;
&lt;br /&gt;
=The LimeSurvey Theme 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 Theme, LimeSurvey provides a &#039;&#039;&#039;Theme Editor&#039;&#039;&#039; in the main &#039;&#039;&#039;administrative&#039;&#039;&#039; toolbar of the application. This Theme Editor is only available to users [[Manage users#Set global permissions for a user|with the Templates permission]] and to superadministrators. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:297--&amp;gt;&lt;br /&gt;
{{Alert|title=Attention|text=A theme that is not correctly constructed can make a survey (that uses the respective template) inoperable. }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
The LimeSurvey theme editor allows you to edit the contents of your themes online. To start the Theme Editor: click on &#039;&#039;&#039;Themes&#039;&#039;&#039; link in the &#039;&#039;&#039;Configuration&#039;&#039;&#039; menu, and then click on the &amp;quot;Theme editor&amp;quot;  button next of the theme you want to edit or extend. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:285--&amp;gt;&lt;br /&gt;
[[File:Themes menu.png]]&lt;br /&gt;
[[File:Theme editor button.png|&#039;&#039;The button to access the theme editor for Bootswatch theme&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:286--&amp;gt;&lt;br /&gt;
The template editor page allows you to select the template you would like to edit/view. &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;
&amp;lt;!--T:298--&amp;gt;&lt;br /&gt;
The following options are available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:280--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Create&#039;&#039;&#039;: Allows you to create a new template. In order not to start from scratch, the template &#039;default&#039; is copied.&lt;br /&gt;
*&#039;&#039;&#039;Import&#039;&#039;&#039;: Allows you to import a template from a ZIP file.&lt;br /&gt;
*&#039;&#039;&#039;Export&#039;&#039;&#039;: Allows you to export the current template to a ZIP file.&lt;br /&gt;
*&#039;&#039;&#039;Copy&#039;&#039;&#039;: Allows you to make a new template by copying the current one.&lt;br /&gt;
*&#039;&#039;&#039;Rename&#039;&#039;&#039;: Allows you to change the name of the template. It is generally used after copying or importing a template.&lt;br /&gt;
*&#039;&#039;&#039;Template&#039;&#039;&#039;: It is a drop-down list that shows all the available templates that are located in your LimeSurvey installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Screen&#039;&#039;&#039;: It is a drop-down list which allows you to choose which particular survey page of that template you want to look at.&lt;br /&gt;
*&#039;&#039;&#039;Return to admin panel&#039;&#039;&#039;.&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, a ZIP-file archive with all the files your template consists of will be created (.pstpl files, images, css files, ...). You can simply &#039;&#039;&#039;import&#039;&#039;&#039; the exported zip-file into another LimeSurvey installation by using the import feature or you can manually copy the archive into another LimeSurvey installation and extract it into the corresponding [[Theme editor#Template files location|template directory there]]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:288--&amp;gt;&lt;br /&gt;
However, it is preferred to use the LimeSurvey template import/export/copy functions in the template editor.&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, 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 standards, the LimeSurvey script needs to find a &amp;lt;body&amp;gt; tag to run certain javascript elements. It is not expected to see many &#039;keywords&#039; 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. For example, 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 (i.e.: 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. Please note that in the survey settings (access the &#039;&#039;Presentation &amp;amp; navigation settings&#039;&#039; by clicking on the &#039;&#039;&#039;Presentation&#039;&#039;&#039; tab) you can set if the group description should be shown or not. If not, then this file is not included at all.&lt;br /&gt;
*&#039;&#039;&#039;question.pstpl:&#039;&#039;&#039; This file contains the question, answer, and help text sections of your survey. 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 LimeSurvey 1.87)&#039;&#039;&#039;. All keywords from this template are now available directly in question.pstpl. &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 necessary 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 and 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 that are always used in a template are 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;
=== Using Bootstrap=== &amp;lt;!--T:294--&amp;gt;&lt;br /&gt;
LimeSurvey has Bootstrap 3 embedded, so you can style all your templates with the well documented Bootstrap classes.&lt;br /&gt;
For more information please refer to the [https://getbootstrap.com Bootstrap documentation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:295--&amp;gt;&lt;br /&gt;
The [https://github.com/flatlogic/awesome-bootstrap-checkbox Awesome-Bootstrap-Checkbox] plugin is also included. With it, you can use the typical Bootstrap color-classes (info,warning,danger,etc.) also with the suffix &amp;quot;-checkbox&amp;quot; or &amp;quot;-radio&amp;quot;, though styling checkboxes and radios as you prefer.&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 questions use specific files for Javascript or CSS. If you need to replace a function, use a cascading system. For javascript function, the last function read is the function used.&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 settings of the survey. 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 version 1.90+, 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 in the template. In version 2, &#039;&#039;&#039;you have to use {TEMPLATEJS} in 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. You can see the &#039;&#039;Screen part&#039;&#039;, JavaScript, and CSS files. 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:299--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:File Control Section.png|center]]&amp;lt;/center&amp;gt;&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 from 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;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:300--&amp;gt;&lt;br /&gt;
Instead of using a link for each picture, utilize 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/files/mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
You can use {{NewIn|2.50}}:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html4strict&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;img src=&#039;{TEMPLATEURL}files/mypicture.jpg&#039;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:287--&amp;gt;&lt;br /&gt;
In LimeSurvey versions before 2.50 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 in the bottom of the screen. There is no way to delete a template from the template editor. This must be done by accessing the underlying directory and deleting manually the files from there. You also have the possibility to select different screen resolutions in order to better evaluate the feel and look of the template.&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. If you want to modify them, create a copy first and edit the copy.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Template files location== &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 &#039;&#039;/templates&#039;&#039; directory that is kept in the public directory with the other LimeSurvey public files. Customized user templates are stored in the &#039;&#039;/upload/templates&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
There should &#039;&#039;&#039;ALWAYS&#039;&#039;&#039; 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. It comes installed by default.&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 the help of this syntax:&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 has now a unique class. The mandatory questions 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 classes, while others may 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 {{ObsoleteIn|3.0}}&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; | .ls-answers {{NewIn|3.0}}&lt;br /&gt;
| All question block&lt;br /&gt;
| All question type&lt;br /&gt;
|&amp;amp;lt;div class=&amp;quot;ls-answers &amp;quot;&amp;gt;, &amp;amp;lt;ul class=&amp;quot;ls-answers &amp;quot;&amp;gt;, &amp;amp;lt;table class=&amp;quot;ls-answers&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 answers are questions 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; | .button-list&lt;br /&gt;
| A list of button&lt;br /&gt;
| Yes no and Gender question&lt;br /&gt;
| &amp;amp;lt;ul class=&amp;quot;button-list&amp;quot;&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .button-item&lt;br /&gt;
| The answer part with a button&lt;br /&gt;
| Yes no and Gender question&lt;br /&gt;
| &amp;amp;lt;li class=&amp;quot;button-item&amp;quot;&amp;gt;&lt;br /&gt;
|&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 types use 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-array  {{NewIn|3.0}}&lt;br /&gt;
| A array of checkbox&lt;br /&gt;
| Array (numbers) with checkbox option&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;checkbox-list&amp;quot;&amp;gt;&lt;br /&gt;
| &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 (each row)&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-array {{NewIn|3.0}}&lt;br /&gt;
| A array of radio item&lt;br /&gt;
| Array question type&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;radio-array&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; | .number-list&lt;br /&gt;
| A list of text input with numeric only answer (each row)&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; | .number-array  {{NewIn|3.0}}&lt;br /&gt;
| The answer part of a numeric input&lt;br /&gt;
| Array of number&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;number-array&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-list  {{ObsoleteIn|2.50}}&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; | .dropdown-list  {{NewIn|2.50}}&lt;br /&gt;
| A list of select&lt;br /&gt;
| Array numbers, Dual scale array (select) (each row)&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;dropdown-list&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .dropdown-array  {{NewIn|3.0}}&lt;br /&gt;
| A array of dropdown&lt;br /&gt;
| Array numbers, Dual scale array (select)&lt;br /&gt;
| &amp;amp;lt;table class=&amp;quot;dropdown-array&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .select-item  {{ObsoleteIn|2.50}}&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; | .dropdown-item  {{NewIn|2.50}}&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;dropdown-item&amp;quot;&amp;gt;, &amp;amp;lt;td class=&amp;quot;dropdown-item&amp;quot;&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .hide  {{ObsoleteIn|3.0}}&lt;br /&gt;
| Used for accessibility: hidden with css but read by screenreader, since 2.50 : you can use sr-only from bootstrap&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 purposes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .ls-js-hidden {{NewIn|3.0}}&lt;br /&gt;
| Used for part to be hidden if javascript is activated&lt;br /&gt;
| Button for example&lt;br /&gt;
| &amp;amp;lt;div class=&amp;quot;ls-js-hidden&amp;quot;&amp;gt;&lt;br /&gt;
| LimeSurvey core used it, but you can use it too in your template&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .ls-js-hidden-sr {{NewIn|3.0}}&lt;br /&gt;
| Used for accessibility: hide it if js is activated, but always show if user use a screenreader&lt;br /&gt;
| Button for example&lt;br /&gt;
| &amp;amp;lt;a class=&amp;quot;ls-js-hidden-sr&amp;quot;&amp;gt;&lt;br /&gt;
| Button&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .ls-no-js-hidden {{NewIn|3.0}}&lt;br /&gt;
| Used for part to be hidden if javascript is not activated&lt;br /&gt;
| Link&lt;br /&gt;
| &amp;amp;lt;a class=&amp;quot;ls-no-js-hidden&amp;quot;&amp;gt;&lt;br /&gt;
| LimeSurvey core used it for inactive link if javascript is not activated&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .ls-label-xs-visibility {{NewIn|3.0}}&lt;br /&gt;
|  Label to be hidden in big screen, but show with little screen (with no more table) and to screenreader&lt;br /&gt;
| label&lt;br /&gt;
| &amp;amp;lt;label class=&amp;quot;ls-no-js-hidden&amp;quot;&amp;gt;&lt;br /&gt;
| Used for label inside table cell of array question type&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .ls-input-group-extra {{NewIn|3.0}}&lt;br /&gt;
| Same usage of boostrap input-group-addon, but without the border and the background.&lt;br /&gt;
| right suffix&lt;br /&gt;
| &amp;amp;lt;div class=&amp;quot;ls-input-group-extra&amp;quot;&amp;gt;&lt;br /&gt;
| Used for right and left suffix (global)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | .checkbox {{ObsoleteIn|3.0}}&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 {{ObsoleteIn|3.0}}&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 {{ObsoleteIn|2.50}}&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  {{ObsoleteIn|3.0}}&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;
! scope=&amp;quot;row&amp;quot; | .ls-odd .ls-even  {{NewIn|3.0}}&lt;br /&gt;
| Array question type&lt;br /&gt;
| Alternation for subquestion and Y axis&lt;br /&gt;
| &amp;amp;lt;tr class=&amp;quot;ls-odd&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;
|Equation||.equation||*&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 interact by default so that you can have validation tips hidden. However, they do appear when there are 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 met yet; 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;
|defrault type||.em_default||for default tip set ( numeric value etc …)&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 one from &#039;&#039;templates/default/template.css&#039;&#039; (for table-based layouts) or &#039;&#039;/templates/limespired/template.css&#039;&#039; (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 &amp;amp; IE7 and the 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 &#039;&#039;/templates/default/&#039;&#039; or &#039;&#039;/templates/limespired&#039;&#039; 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 a conditional class for body in startpage.pstpl and use this class in your template.css. This method is used in the citronade template{{ObsoleteIn|2.06}}. Adding a js / no-js class 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:309--&amp;gt;&lt;br /&gt;
{{Deprecated|3.0}} &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 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}, {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;
|{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;
|{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;
|{SURVEYRESOURCESURL}||All Files||The URL to the current uploaded files for this survey location (useful for referencing image files in your question, group, ....)&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;
|{SAVEDID}||All Files||Displays &#039;Response ID&#039; of user&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{QUEXMLPDF}||All Files||Displays button to export the queXML PDF of questionnaire including answers entered up until the point that has been completed in the survey.&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;
|{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, but it does allow the changing of background colour, text colour, 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 color 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 color 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 color 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 color 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: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 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;div class=&#039;new_name&#039;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&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: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 color 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 color 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;
LimeSurvey has integrated some user-made patches that permits some special changes. These very advanced features (generally) require changes to the underlying code base of LimeSurvey and should be done carefully in order not to introduce security holes.&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 them. In this way, a template author can create his or her 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;
*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;
&lt;br /&gt;
&amp;lt;!--T:301--&amp;gt;&lt;br /&gt;
{{Note|For further details, see 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, and customizing survey description page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:302--&amp;gt;&lt;br /&gt;
Video - needed&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 the end of each page, you can add in a .pstl file a sentence and hidding it for other language. If we hide it in the template.css, we can use the pseudo selector :lang, but we use some class for better compatibility.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:148--&amp;gt;&lt;br /&gt;
Below, there are two help sentences, 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;
==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;
After editing and saving a template, it applies to a survey list page only if it is selected from the settings of the survey. To make it the default template, go under the &#039;&#039;&#039;General tab&#039;&#039;&#039; located in the &#039;&#039;&#039;Global settings&#039;&#039;&#039; of your LimeSurvey installation and choose the desired template. From now on, all the templates that use the &amp;quot;default&amp;quot; option as template plus the ones that are going to be newly created, will use the newly selected default template.&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 to change the according setting from &#039;&#039;&#039;Global settings&#039;&#039;&#039;. In older versions, this change can be done by editing the $defaulttemplate setting from the config file: copy this setting from config-defaults.php to config.php which overrides config-defaults.php and edit this setting to &amp;lt;code lang=&amp;quot;html&amp;quot;&amp;gt;$defaulttemplate = &#039;yourtemplatename&#039;;&amp;lt;/code&amp;gt;.&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;
&amp;lt;u&amp;gt;Mac users&amp;lt;/u&amp;gt;, please note that the 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 workaround 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;
Another workaround is to use scripts in their mac-compiled counterparts.&lt;br /&gt;
&lt;br /&gt;
==Replacing the help icon {{ObsoleteIn|2.50}} == &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 will then be automatically used instead of the default help icon.&lt;br /&gt;
&lt;br /&gt;
==Replacing an existing logo {{NewIn|2.50}} {{ObsoleteIn|3.0}}== &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;: In the &#039;&#039;&#039;default&#039;&#039;&#039; Template of 2.50, there is no preembedded logo. Read further our [[#Adding_your_own_logo |wiki on how to add your own logo]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:178--&amp;gt;&lt;br /&gt;
1. To edit the logo go to the &#039;&#039;&amp;lt;u&amp;gt;template.css&amp;lt;/u&amp;gt;&#039;&#039; file which you can find it here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:179--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:t1.PNG|200px]]&amp;lt;/center&amp;gt;&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 and search for &#039;&#039;logo&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:181--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:2.png|200px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:184--&amp;gt;&lt;br /&gt;
3. 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;
&amp;lt;center&amp;gt;[[File:t4.PNG|500px]]&amp;lt;/center&amp;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;
&amp;lt;!--T:188--&amp;gt;&lt;br /&gt;
If you want to 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 {{ObsoleteIn|3.0}} == &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 &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039; template file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:192--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:startpage.pstpl.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:194--&amp;gt;&lt;br /&gt;
2. After this&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot; &amp;gt;&amp;lt;div id=&amp;quot;topContainer&amp;quot; class=&amp;quot;jumbotron&amp;quot;&amp;gt;&amp;lt;/source&amp;gt; &lt;br /&gt;
add this line to &#039;&#039;&#039;startpage.pstpl&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;container&amp;quot;&amp;gt;&amp;lt;img id=&#039;page_logo&#039; src=&#039;{TEMPLATEURL}/files/logo.png&#039; class=&amp;quot;clearfix pull-right&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:196--&amp;gt;&lt;br /&gt;
3. To upload your own logo, go to the template editor and upload your logo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:197--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:uploadyourlogo.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:199--&amp;gt;&lt;br /&gt;
To position your logo, please use one of the following css classes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:293--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;If you want the logo to be placed on the left side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:200--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;clearfix pull-left&amp;lt;/source&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 on the right side:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:205--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;clearfix pull-right&amp;lt;/source&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;source lang=&amp;quot;html&amp;quot;&amp;gt;clearfix center-block&amp;lt;/source&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}files/logoImage-{SID}.png&amp;quot;&amp;gt;&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 /files 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}files/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}files/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: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;
An 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;
If you do &#039;&#039;&#039;not&#039;&#039;&#039; want differentiate even and odd pages, 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;
&#039;&#039;header_separator&#039;&#039; is used to adress the separator for the header &amp;quot;td&amp;quot;. The &amp;quot;dual_scale_separator&amp;quot; is used to address 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 {{ObsoleteIn|3.0}} == &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 {{ObsoleteIn|3.0}}== &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 function from below. It calls 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 a survey in English language and has to be extended when used for multilingual surveys. But it&#039;s an idea/tip on how to solve this.&lt;br /&gt;
&lt;br /&gt;
==How to deal with multilingual question attributes {{ObsoleteIn|2.50}}== &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;
Add in the template.css of your template (at &#039;&#039;/limesurvey/upload/templates/&amp;lt;yourtemplatename&amp;gt;/template.css&#039;&#039;):&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;
==Adding your own logo to the survey list {{ NewIn|3.0}} == &amp;lt;!--T:310--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:311--&amp;gt;&lt;br /&gt;
# First please open the theme editor for the theme you like to use. [[File:OpenThemeEditor.jpg]]&lt;br /&gt;
# We recommend to use fruity, it is our best theme currently. &lt;br /&gt;
# Then extend the theme and give it a name you will recognize. [[File:ExtendTheme.jpg]]&lt;br /&gt;
# In the following view you may upload the logo you want to use. [[File:UploadFileTheme.jpg]]&lt;br /&gt;
# Select the editor screen `Survey List´ in the Screen dropdown in the top right corner. [[File:OpenScreenSurveyList.jpg]]&lt;br /&gt;
# Then select `layout_survey_list.twig´ in the left side menu. [[File:EditLayoutSurveyListTwig.jpg]]&lt;br /&gt;
# In the editor scroll to line 126 and change the marked part to the filename of the image you uploaded to the theme before. [[File:ChangeSurveyListHeaderImageEditor.jpg]]&lt;br /&gt;
# Save your file. [[File:ThemeEditorSaveChanges.jpg]]&lt;br /&gt;
# Change default theme to your extended theme. [[File:ChangeDefaultTheme.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Custom Question Views {{NewIn|3.0}}= &amp;lt;!--T:289--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:290--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; This is a temporary feature to be replaced in the future by question object (it will be very easy to move custom views to question object). It is disabled by default.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:291--&amp;gt;&lt;br /&gt;
As of version 2.5, you can create template-specific custom views for questions and some of their incorporated elements. This is useful if you want to modify the HTML layout of a particular question type for one or more surveys.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:292--&amp;gt;&lt;br /&gt;
*In application/config/config.php, find &#039;config&#039;=&amp;gt;array and add this line to the array : &#039;allow_templates_to_overwrite_views&#039;=&amp;gt;1&lt;br /&gt;
*In /{your_template}/config.xml, set &amp;quot;overwrite_question_views&amp;quot; to true&lt;br /&gt;
*Copy application/views/survey/* to template/{your_view_directory}/survey/&lt;br /&gt;
*Note that you only need to copy the files that you intend to modify but the file structure must remain the same as in application/views/survey/&lt;br /&gt;
&lt;br /&gt;
=Insert Custom CSS or JavaScript files for template {{NewIn|2.50}}= &amp;lt;!--T:296--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:303--&amp;gt;&lt;br /&gt;
As of version 2.50, you can use the config.xml file to automatically load plugin files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:304--&amp;gt;&lt;br /&gt;
*Upload your files to the template /css or /scripts folder&lt;br /&gt;
*In /{your_template}/config.xml, add the file paths to the &amp;lt;css&amp;gt; or &amp;lt;js&amp;gt; blocks, something like this:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&amp;lt;css&amp;gt;&lt;br /&gt;
	&amp;lt;filename&amp;gt;css/jquery-ui-custom.css&amp;lt;/filename&amp;gt;&lt;br /&gt;
	&amp;lt;filename&amp;gt;css/bootstrap-slider.css&amp;lt;/filename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!--T:305--&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;css/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css&amp;lt;/filename&amp;gt;&lt;br /&gt;
	&amp;lt;filename&amp;gt;css/flat_and_modern.css&amp;lt;/filename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!--T:306--&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;css/template.css&amp;lt;/filename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!--T:307--&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;css/myCustomPlugin.css&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;/css&amp;gt;&lt;br /&gt;
&amp;lt;js&amp;gt;&lt;br /&gt;
	&amp;lt;filename&amp;gt;scripts/template.js&amp;lt;/filename&amp;gt;&lt;br /&gt;
	&amp;lt;filename&amp;gt;scripts/bootstrap-slider.js&amp;lt;/filename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!--T:308--&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;scripts/myCustomPlugin.js&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;/js&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[Category:Theme]]&lt;br /&gt;
[[Category:Twig]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Statistics&amp;diff=144395</id>
		<title>Statistics</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Statistics&amp;diff=144395"/>
		<updated>2019-10-29T14:06:39Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Documented usage of custom logo for statistics PDF&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;
&lt;br /&gt;
&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=General= &amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
The statistics feature is available from the responses toolbar by clicking first on the &amp;quot;Response and Statistics&amp;quot; menu entry located in the last drop-down menu, [[Responses]] (which is only available if a survey has been activated):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Location_responses_and_statistics.png]]&amp;lt;/center&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Look for the Statistics button located on the top toolbar and click on it:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
The following page will be loaded:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Statistics - start page.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
The LimeSurvey statistics can be visualized in either the &#039;&#039;&#039;expert mode&#039;&#039;&#039; or &#039;&#039;&#039;simple mode&#039;&#039;&#039;. By default, the &#039;&#039;&#039;expert mode&#039;&#039;&#039; is loaded when you click on the [[Statistics]] button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Statistics - expert mode= &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
Let&#039;s say you&#039;ve got a survey running, or it is finished and you want to start analyzing the results. LimeSurvey can dump all the results into an Excel spreadsheet or CSV file. You can do whatever you want with the data from the respective file. Alternatively, you can use the statistics feature to have a look at your data and start getting some useful information from it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
The statistics - expert mode feature allows you to &#039;filter&#039; your data and retrieve numbers and summaries of different fields from it. The statistics script doesn&#039;t attempt to do highly complex filtering, but you&#039;d be surprised at the sort of information that can be easily obtained.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Running quick statistics== &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
As it can be observed below, there is a checkbox for each question that can be selected in order to show a response summary for each question, and an icon that when clicked (or if the mouse hovers over it), it gives you the full text of the question. To view the results for a question or questions, check the checkbox(es) at the top of the question(s) and then click &amp;quot;View statistics&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Select answers and view statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
Alternatively, to view the results for all available questions, enable &amp;quot;View summary of all available fields&amp;quot; and then click &amp;quot;View statistics&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:View summary of all available fields.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
You will then be given a &amp;quot;Results&amp;quot; table which will indicate the number of cases and a &amp;quot;Field Summary&amp;quot; table for each question selected which summarizes all possible answers in the question(s), their totals, and their corresponding percentage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Results view statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
{{Note|Please note that the statistics are displayed on the same page because the default [[Statistics#Output format and options|output format]] is HTML. If this is changed to PDF or Excel, then a pop-up will appear once the &amp;quot;View statistics&amp;quot; button is pressed, asking you to save the respective file on your machine.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Filtering data== &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
Two types of filters exist: [[Statistics#General filters|general]] and [[Statistics#Response filters|response filters]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===General filters=== &amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
As the name suggests, it refers to filters at the general (macro) level:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:General filters - statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
The filters can be related to:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Data selection&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;The type of responses:&#039;&#039;&lt;br /&gt;
*** Complete responses: responses that contain a submission date&lt;br /&gt;
*** Incomplete responses: answers that do not contain a submission date&lt;br /&gt;
*** All records: the aggregated number of complete and incomplete responses.&lt;br /&gt;
** &#039;&#039;Statistics report language:&#039;&#039; if additional languages are used, this filter option is useful to divide respondents based on the language they used to fill out your survey.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
{{Note|For a discussion on incomplete responses, see the [[Responses &amp;amp; statistics#Responses summary|response summary]] wiki section.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt; Two attributes are located within the &amp;quot;Data selection&amp;quot; box:&lt;br /&gt;
*&#039;&#039;&#039;View summary of all available field:&#039;&#039;&#039; it is turned off by default. By enabling it, all the survey questions and groups will be taken into account when running the statistics script&lt;br /&gt;
*&#039;&#039;&#039;Subtotals based on displayed questions:&#039;&#039;&#039; it is deactivated by default. It counts stats for each question based only on the total number of responses for which the question was displayed (good way to filter the unfinished/incomplete responses).&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Response ID:&#039;&#039;&#039; use the ID number to filter your gathered responses &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Submission date:&#039;&#039;&#039; displayed only if [[Notifications_%26_data#Save_timings|timings is enabled]]. You can filter the data based on the submission date of your collected responses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
To get the answers filtered according only to the &#039;&#039;&#039;general filters&#039;&#039;&#039;, enable the &amp;quot;View summary of all available field&amp;quot; option and click on the &#039;&#039;&#039;View statistics&#039;&#039;&#039; button located in the upper-right part of the screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Response filters=== &amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
Depending on the used [[Question types|question type]], different fields may be used to filter your answers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;By response:&#039;&#039;&#039; click on one or more responses in the list under each question to filter the data by those responses (use CTRL/click to select multiple responses in the same question). Note that if you choose to view the summary of all available fields (checkbox at top) you will need to select your response filters before checking that box.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;By text:&#039;&#039;&#039; you can search the responses to a free text question type (and similar types) by entering a text. If you want to search for a partial string you can use the percentage sign (%) as wildcard. E.g.: If you look for &#039;Tom%&#039;, it will find entries with &#039;Tomb&#039; and &#039;Tommy&#039;, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;By numerical value:&#039;&#039;&#039; you can search the responses that contain a certain numerical value if number-based question types are used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Response filters - filtering options.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
Selecting &amp;quot;View statistics&amp;quot; will then give you the &amp;quot;Results&amp;quot; table, indicating the number of responses matching your criteria, and a &amp;quot;Field Summary&amp;quot; table for each question selected which summarizes all possible answers in the question(s), their totals and their percentage. It is important to note that these results are a subset of your total responses. So, for example, if your criteria display 146 records out of a total 180, the summary will show the breakdown of just those 146 records for that table.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
The images below indicate that I have elected to view the stats for &amp;quot;Employment status&amp;quot; of &#039;&#039;&#039;&#039;&#039;completed records/female/age 18-25&#039;&#039;&#039;&#039;&#039;. This gives me the results for 6 out of 13 records.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:stats_1a_new.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:stats_1b_new.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:stats_2b.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:stats_2_new.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
{{Alert|title=Things to be cautious of|&lt;br /&gt;
*If you set criteria on the same question that you ask for a summary, then that question will only present answers matching your criteria. So it is good practice &#039;&#039;&#039;not&#039;&#039;&#039; to set any criteria on the same question you are getting a summary of.&lt;br /&gt;
*To select multiple entries for a question hold down the CTRL button when clicking. To &amp;quot;unselect&amp;quot; the last criteria (if you want to clear all criteria from a question) click on the respective highlighted answer while holding pressed the CTRL button.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Graphs== &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
{{Note|For technical reasons the Excel output does &#039;&#039;&#039;not&#039;&#039;&#039; contain any charts. If the PDF output is selected, charts are limited to pie charts (single choice questions) and bar charts (multiple choice question types).}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
For charting, the library pChart is used, which is completely included and usually doesn&#039;t have to be configured.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
After the graphs have been generated you can export them easily. Right click on a graph and choose &amp;quot;Save image as&amp;quot;, then save the graph as a .png file to your chosen location.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
You can also use the &amp;quot;Export images&amp;quot; function to save all the graphs to your machine:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Export images buttom.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;simplebox&amp;quot;&amp;gt; [[File:help.png]] Please note that LimeSurvey cannot create graphs from certain types of question. For example, the [[Question type - Numerical input|numerical input question type]] cannot be visualized with the help of graphs. However, a simple table with values such as count, sum, standard deviation, average, minimum, median, and maximum is displayed in its case:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Numerical question type statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
To see which questions can make use of statistics and/or graphs, you have to read each question type manual entry from [[Question types|here]]. If tab statistics is available, check which options are displayed under this tab. Three statistics attributes exist: [[QS:Chart type|chart type]], [[QS:Display chart|display chart]], and [[QS:Public statistics|public statistics]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;incomplete responses&amp;quot;, &amp;quot;no answers&amp;quot; and &amp;quot;not completed/not displayed&amp;quot; counts== &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;incomplete responses&#039;&#039;&#039;: all responses that started to be filled out by respondents, but weren&#039;t completed. A response started when the participant clicked the &amp;quot;Next&amp;quot; button in the survey, but did not click the &amp;quot;Submit&amp;quot; button in the end (did not land on the end page of your survey).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
Technically speaking, this is when there is no SubmitDate in the [[Responses|response table]] for this entry, but new data set was created already.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;no answer&#039;&#039;&#039;: when the question was displayed, but the participant hasn&#039;t given an answer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Technically speaking, this is when the question is not mandatory, was displayed, received no answer and the user clicked &amp;quot;Next&amp;quot; or &amp;quot;Submit&amp;quot;. The consequence is that the database field for this answer is set to &amp;quot;&amp;quot; (empty string). This &amp;quot;no answer&amp;quot; status cannot be really computed for &amp;quot;Date&amp;quot; or pure &amp;quot;Numerical questions&amp;quot; where the database field cannot record a string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;not completed/not displayed&#039;&#039;&#039;: when the page containing the question was not displayed. This can be because of conditions, or just because the participant left the survey before this page was displayed (or just while this page is displayed, but without clicking the Next button).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Technically speaking, the database field for this question is filled with a NULL value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Output format and options== &amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
The statistics can be displayed under three different formats:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Output format - statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;HTML&#039;&#039;&#039; (default option): the statistics are displayed in LimeSurvey&lt;br /&gt;
* &#039;&#039;&#039;PDF&#039;&#039;&#039;: a popup will be displayed, asking to save the statistics as a PDF file&lt;br /&gt;
* &#039;&#039;&#039;Excel&#039;&#039;&#039;: To further work with your (filtered) data, choose Excel. You can export the file from a spreadsheet application to CSV to work with more advanced statistical tools such as SPSS or R.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
The output options can be used to alter the way in which the statistics are displayed. The following options are available:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Output options - statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Show text responses inline:&#039;&#039;&#039; it is disabled by default. It shows the text questions responses without having to click on a browse button (if enabled; useful for the HTML version of output format)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Show graphs:&#039;&#039;&#039; it is disabled by default. If enabled, graphs will be displayed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Number of columns:&#039;&#039;&#039; two is the default number. If you wish to have statistics and graphs displayed on only one or three columns, choose the desired value from this option. It applies to HTML statistics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Graph labels:&#039;&#039;&#039; choose how the label should look like in the graph.&lt;br /&gt;
**&#039;&#039;Question code&#039;&#039;&lt;br /&gt;
**&#039;&#039;Question text&#039;&#039;&lt;br /&gt;
**&#039;&#039;Both&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Chart type:&#039;&#039;&#039; the following chart type settings are available:&lt;br /&gt;
**&#039;&#039;As defined in question settings:&#039;&#039; useful if you wish the graph not to be displayed. If this is the case, deactivate it from the question settings and select from the &amp;quot;Statistics&amp;quot; panel this option.&lt;br /&gt;
**&#039;&#039;Bar chart&#039;&#039;&lt;br /&gt;
**&#039;&#039;Pie chart&#039;&#039;&lt;br /&gt;
**&#039;&#039;Radar chart&#039;&#039;&lt;br /&gt;
**&#039;&#039;Line chart&#039;&#039;&lt;br /&gt;
**&#039;&#039;Polar chart&#039;&#039;&lt;br /&gt;
**&#039;&#039;Doughnut chart&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Embed custom logo at statistic PDF==&lt;br /&gt;
(available for Limesurvey 3.x since 12/2018)&lt;br /&gt;
&lt;br /&gt;
If you want to embed your own logo to the statistics PDF, then make sure a file named exactly &amp;quot;statistics.jpg&amp;quot; is placed within the &amp;quot;images&amp;quot; folder of the [[Custom_Admin_Themes|admin theme]] used for your system. Which admin theme is used can be set at the [[Global_settings#General|Global Settings]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Statistics - simple mode= &amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
The simple mode was created in order to provide simple bar chart statistics that can be quickly exported and saved, and then included into a presentation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Simple mode - statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
As you can observe, fewer graphs are displayed than in the expert mode. While in the export mode you can display graphs with respect to those who filled out the survey, did not answer it or did not finish completing it, the simple mode displays only statistics that rely on the &amp;quot;countable&amp;quot; data submitted by the respondents (e.g., single or multiple choice questions as well as array questions).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:94--&amp;gt;&lt;br /&gt;
There is only one option to filter the data within the simple mode - via the responses to be included in the statistics. As a result, the statistics may include the complete responses, incomplete responses, or all responses (the aggregated sum of the first two options). This option is located in the upper-right part of the panel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:95--&amp;gt;&lt;br /&gt;
To switch back to [[Statistics#Statistics - expert mode|expert mode]], look for the &amp;quot;Expert mode&amp;quot; button located in the upper-right part of the screen:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:96--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Switch to expert mode.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
{{Note|If you wish to have direct access to the simple mode of Statistics, LimeSurvey allows you to create your own entries in the menu. For more information, check the [[Menu entries configuration|menu entries configuration wiki section]].}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Statistics= &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
LimeSurvey includes the functionality to display simple statistics to the general public or to your participants after they have ended filling out an online survey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
Two components need to be enabled in order to activate and display statistics to your participants. The first one refers to the public statistics of your survey which must be enabled (it is turned off by default). It is located under the [[Presentation]] tab. To also show graphs, look on the same page for the [[Presentation#Show_graphs_in_public_statistics|Show graphs in public statistics attribute]] and enable it (it is disabled by default).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Presentation - public statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
Once you have set your survey to display statistics, you need to indicate question-by-question which statistics you want to be displayed to your respondents. By default, no questions will be displayed. To have them displayed, access the desired question, look for the &amp;quot;Statistics&amp;quot; tab and enable the [[QS:Public statistics|Show in public statistics]] attribute.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Statistics tab - public statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==What participants see== &amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
Once you have enabled public statistics and selected some questions to display, an additional option will be visible to participants when they end filling out your survey. In addition to the usual thank you, there will be a link to &amp;quot;View the statistics for this survey&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Respondent - view statistics.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
The survey statistics will be displayed on this page. Graphs can also be displayed by enabling the [[QS:Display chart|Display chart]] question attribute:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:101--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Display statistics to user.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:102--&amp;gt;&lt;br /&gt;
{{Note|Please note that only bar charts can be displayed in public statistics.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Changing the look of the public statistics page== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
The looks of the public statistics page can be modified via template.css (search for &amp;quot;#statsContainer&amp;quot;). However, there is currently no template of it&#039;s own that can be edited in the [[Theme editor|LimeSurvey theme editor]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Hints &amp;amp; tips= &amp;lt;!--T:103--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:104--&amp;gt;&lt;br /&gt;
Feel free to edit the following wiki sections to let other LimeSurvey users learn about statistics-related hints &amp;amp; tips.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Wrong font when exporting statistics. What to do?== &amp;lt;!--T:105--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
For some languages (like Chinese), the usual font used (Vera) does not cover the needed character set. In that case you can use the setting $chartfontfile to set a new TTF font file in config.php (Check out config-defaults.php for the right setting). For Chinese (Simplified and Traditional), another font has to be used such as the FireFlySung font which can be downloaded from [https://github.com/rougier/freetype-gl/blob/master/fonts/fireflysung.ttf github].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=FAQs= &amp;lt;!--T:106--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==5 point choice question type - what do the values located under the &amp;quot;Sum&amp;quot; column represent?== &amp;lt;!--T:107--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:108--&amp;gt;&lt;br /&gt;
As it can be observed in the below screenshot, the &#039;&#039;&#039;&amp;quot;Sum&amp;quot;&#039;&#039;&#039; column shows the aggregated values in the following way: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:109--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Sum_column_SC.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:110--&amp;gt;&lt;br /&gt;
The grouping from the &#039;&#039;&#039;&amp;quot;Sum&amp;quot;&#039;&#039;&#039; column was done in this way because, when rating questions, survey administrators usually interpret the results in this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:111--&amp;gt;&lt;br /&gt;
*Y percent of the respondents &#039;&#039;&#039;DISLIKE&#039;&#039;&#039; item ABC, where Y represents the percentage of those who answered &amp;quot;1&amp;quot; and &amp;quot;2&amp;quot;&lt;br /&gt;
*X percent of the respondents &#039;&#039;&#039;LIKE&#039;&#039;&#039; item ABC, where X represents the percentage of those who answered &amp;quot;4&amp;quot; and &amp;quot;5&amp;quot;&lt;br /&gt;
*Z percent of the respondents have a &#039;&#039;&#039;NEUTRAL&#039;&#039;&#039; opinion about item ABC, where Z represents the percentage of those who answered &amp;quot;3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:112--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;&lt;br /&gt;
!Answer&lt;br /&gt;
!Count&lt;br /&gt;
!Sum&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|0&lt;br /&gt;
|50% (the percentage of those who answered &amp;quot;1&amp;quot; and &amp;quot;2&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|1&lt;br /&gt;
|25% (the percentage of those who selected &amp;quot;3&amp;quot; - the neutral option)&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|1&lt;br /&gt;
|25% (the sum of those who answered &amp;quot;4&amp;quot; and &amp;quot;5&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|Sum (Answers)&lt;br /&gt;
|4&lt;br /&gt;
|100%&lt;br /&gt;
|-&lt;br /&gt;
|No answer&lt;br /&gt;
|1&lt;br /&gt;
|0% (always &amp;quot;0%&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
|Not completed or displayed&lt;br /&gt;
|0&lt;br /&gt;
|0% (always &amp;quot;0%&amp;quot;)&lt;br /&gt;
|-}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Plugin_events&amp;diff=144284</id>
		<title>Plugin events</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Plugin_events&amp;diff=144284"/>
		<updated>2019-10-03T08:07:46Z</updated>

		<summary type="html">&lt;p&gt;Mazi: added details for availability&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At version 2.50 build 160425 the following events are available for plugins to subscribe to:&lt;br /&gt;
&lt;br /&gt;
NB: Version 2.60.0 is not the same as version 2.6, which is the new number for version 2.06. 2.60.0 comes after 2.59.1.&lt;br /&gt;
&lt;br /&gt;
== Global Events ==&lt;br /&gt;
&lt;br /&gt;
*[[afterFindSurvey]]&lt;br /&gt;
*[[afterPluginLoad]]&lt;br /&gt;
*[[afterQuickMenuLoad]]&lt;br /&gt;
*[[afterSurveyActivate]]&lt;br /&gt;
*[[afterSurveyComplete]]&lt;br /&gt;
*[[afterSurveyDeactivate]]&lt;br /&gt;
*[[afterSurveyQuestionAssessment]]{{NewIn|v=2.62|b=170207}}&lt;br /&gt;
*[[afterSurveyQuota]]{{NewIn|v=2.05|b=141006}}&lt;br /&gt;
*[[afterSurveySettingsSave]]&lt;br /&gt;
*[[beforeActivate]]&lt;br /&gt;
*[[beforeAdminMenuRender]] {{NewIn|v=2.50|b=160426}}&lt;br /&gt;
*[[beforeEmail]]{{NewIn|v=4.0.0}}&lt;br /&gt;
*[[beforeCloseHtml]]{{NewIn|v=2.60.0}}&lt;br /&gt;
*[[beforeControllerAction]]{{NewIn|v=2.50|b=160425}}&lt;br /&gt;
*[[beforeDeactivate]]&lt;br /&gt;
*[[beforeHasPermission]]{{NewIn|v=2.06}}&lt;br /&gt;
*[[beforeLoadResponse]]&lt;br /&gt;
*[[beforePermissionSetSave]]&lt;br /&gt;
*[[beforePluginManagerMenuRender]]{{NewIn|v=4.0.0}}&lt;br /&gt;
*[[beforeQuestionRender]]{{NewIn|v=2.05|b=140922}}&lt;br /&gt;
*[[beforeRegister]]{{NewIn|v=2.06}}&lt;br /&gt;
*[[beforeRegisterForm]]{{NewIn|v=2.06}}&lt;br /&gt;
*[[beforeSideMenuRender]]{{NewIn|v=2.51.0}}&lt;br /&gt;
*[[beforeSurveyAdminView]]&lt;br /&gt;
*[[beforeSurveyActivate]] {{NewIn|v=3.15|b=181017}}&lt;br /&gt;
*[[beforeSurveyBarRender]] {{NewIn|v=3.15|b=181017}}&lt;br /&gt;
*[[beforeSurveyDeactivate]]{{NewIn|v=2.5}}&lt;br /&gt;
*[[beforeSurveyEmail]]{{NewIn|v=4.0.0}}&lt;br /&gt;
*[[beforeSurveyPage]]{{NewIn|v=2.05|b=140109}}&lt;br /&gt;
*[[beforeSurveySettings]]&lt;br /&gt;
*[[beforeSurveysStartpageRender]]{{DeprecatedIn|v=3.0.0}}&lt;br /&gt;
*[[beforeTokenEmail]]{{NewIn|v=2.05|b=140404}}&lt;br /&gt;
*[[beforeToolsMenuRender]]&lt;br /&gt;
*[[beforeUrlCheck]]{{NewIn|v=3.12.2}}&lt;br /&gt;
*[[createNewUser]]&lt;br /&gt;
*[[createRandomPassword]]{{NewIn|v=4.0.0|b=190523}}&lt;br /&gt;
*[[checkPasswordRequirement]]{{NewIn|v=4.0.0|b=190523}}&lt;br /&gt;
*[[ExpressionManagerStart]] WIP {{NewIn|v=4.0.0-dev}}&lt;br /&gt;
*[[getGlobalBasePermissions]]]{{NewIn|v=3.0.0}}&lt;br /&gt;
*[[getPluginTwigPath]]{{NewIn|v=3.10.0}}&lt;br /&gt;
*[[listExportOptions]]&lt;br /&gt;
*[[listExportPlugins]]&lt;br /&gt;
*[[listQuestionPlugins]]&lt;br /&gt;
*[[newDirectRequest]]&lt;br /&gt;
*[[newExport]]&lt;br /&gt;
*[[NewQuestionAttributes|newQuestionAttributes]]{{NewIn|v=2.50|b=160731}}&lt;br /&gt;
*[[newSurveySettings]]&lt;br /&gt;
*[[newUnsecureRequest|NewUnsecureRequest]]&lt;br /&gt;
*[[onSurveyDenied]]{{NewIn|v=3.0.0}}&lt;br /&gt;
*[[setVariableExpressionEnd]]{{NewIn|v=4.0.0}}&lt;br /&gt;
&lt;br /&gt;
== CLI Events ==&lt;br /&gt;
&lt;br /&gt;
This events needs to be called with php cli command.&lt;br /&gt;
&lt;br /&gt;
*[[cron (command)|cron]]{{NewIn|v=2.05|b=140404}}&lt;br /&gt;
*[[direct (command)|direct]]{{NewIn|v=2.63.0|b=170304}}&lt;br /&gt;
&lt;br /&gt;
== Authentification related events ==&lt;br /&gt;
&lt;br /&gt;
*[[newLoginForm]]&lt;br /&gt;
*[[Authentication plugin development#afterLoginFormSubmit|afterLoginFormSubmit]]&lt;br /&gt;
*[[afterSuccessfulLogin]]&lt;br /&gt;
*[[newUserLogin]]&lt;br /&gt;
*[[newUserSession]]&lt;br /&gt;
*[[Authentication plugin development#afterLogout|afterLogout]]&lt;br /&gt;
*[[afterFailedLoginAttempt]]&lt;br /&gt;
*[[Authentication plugin development#remoteControlLogin|remoteControlLogin]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Model Events ==&lt;br /&gt;
&lt;br /&gt;
All models (Survey, Question, etc.) support a series of before &amp;amp; after events.&lt;br /&gt;
&lt;br /&gt;
=== [[Specific model events|Specific Model events]] ===&lt;br /&gt;
&lt;br /&gt;
These include model-specific events (example for Survey model):&lt;br /&gt;
&lt;br /&gt;
* beforeSurveyDelete&lt;br /&gt;
* beforeSurveySave&lt;br /&gt;
* afterSurveyDelete&lt;br /&gt;
* afterSurveySave&lt;br /&gt;
&lt;br /&gt;
=== [[Dynamic model events]]{{NewIn|v=3.15.1}}===&lt;br /&gt;
&lt;br /&gt;
* beforeTokenDelete&lt;br /&gt;
* beforeTokenSave&lt;br /&gt;
* afterTokenDelete&lt;br /&gt;
* afterTokenSave&lt;br /&gt;
* beforeResponseDelete&lt;br /&gt;
* beforeResponseSave&lt;br /&gt;
* afterResponseDelete&lt;br /&gt;
* afterResponseSave&lt;br /&gt;
* beforeTokenDynamicDelete&lt;br /&gt;
* beforeTokenDynamicSave&lt;br /&gt;
* afterTokenDynamicDelete&lt;br /&gt;
* afterTokenDynamicSave&lt;br /&gt;
* beforeSurveyDynamicDelete&lt;br /&gt;
* beforeSurveyDynamicSave&lt;br /&gt;
* afterSurveyDynamicDelete&lt;br /&gt;
* afterSurveyDynamicSave&lt;br /&gt;
&lt;br /&gt;
=== Generic events ===&lt;br /&gt;
&lt;br /&gt;
As well as generic events independent of the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
* [[beforeModelDelete]]&lt;br /&gt;
* [[beforeModelSave]]&lt;br /&gt;
* [[afterModelDelete]]&lt;br /&gt;
* [[afterModelSave]]&lt;br /&gt;
* [[beforeModelDeleteMany]]&lt;br /&gt;
&lt;br /&gt;
In all of the above events, the associated model object is available as part of event data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$model = $this-&amp;gt;event-&amp;gt;get(&#039;model&#039;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=BeforeAdminMenuRender&amp;diff=144283</id>
		<title>BeforeAdminMenuRender</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=BeforeAdminMenuRender&amp;diff=144283"/>
		<updated>2019-10-03T08:06:36Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Added documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Used as an extension point to add menus to top menu. Check [https://manual.limesurvey.org/Extra_menus_event Extra menus event] for more details.&lt;br /&gt;
Available for 2.50_plus_160426 and later.&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Workarounds:_Survey_behaviour&amp;diff=137709</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=137709"/>
		<updated>2019-03-14T08:38:29Z</updated>

		<summary type="html">&lt;p&gt;Mazi: /* Randomization */  Added note about outdated workarounds&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;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Most of the workarounds outlined below are pretty outdated. The new Limesurvey versions (&amp;gt;= 3.x) support various randomization features out of the box. These are outlined in more detail at https://survey-consulting.com/how-to-randomize-items-at-limesurvey. &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;
&lt;br /&gt;
==Randomly show X out of Y question groups==&lt;br /&gt;
This workaround allows you to randomly show X out of Y question groups&lt;br /&gt;
&lt;br /&gt;
Tested with: Version 2.06+ Build 150612 Default template&lt;br /&gt;
&lt;br /&gt;
Workaround created by user &amp;quot;OMdev&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Set up your survey to use JavaScript.&lt;br /&gt;
*Create a multi question with y number of answer options. Randomize this question from question settings.&lt;br /&gt;
*Select top X number of check boxes by add the following script to the source of this question.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
$(function(){&lt;br /&gt;
$(&#039;body&#039;).hide() //Hiding multi select question using JavaScript . You can also hide it with CSS.&lt;br /&gt;
var showNumberOfGroups = 2; //enter number of check box to select from top ie number of groups to show randomly.&lt;br /&gt;
var $cboxs = $(&#039;input:checkbox&#039;);&lt;br /&gt;
	for(var i=0;i&amp;lt;showNumberOfGroups;i++){&lt;br /&gt;
		$cboxs.eq(i).prop(&#039;checked&#039;,true);&lt;br /&gt;
	}&lt;br /&gt;
document.getElementById(&#039;movenextbtn&#039;).click();//auto submitting page.&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*Add group relevance from the multi select question.&lt;br /&gt;
&lt;br /&gt;
*You can download lss from below link.&lt;br /&gt;
https://www.limesurvey.org/en/forum/can-i-do-this-with-limesurvey/102176-show-x-out-of-y-question-groups#126288&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;
===Pre 2.0===&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 script (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;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;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;
			// Create an array to hold question IDs&lt;br /&gt;
			var qArray = new Array();&lt;br /&gt;
&lt;br /&gt;
			// Find the group ID of the page&lt;br /&gt;
			var fieldNames = $( &#039;input#fieldnames&#039; ).attr(&#039;value&#039;);&lt;br /&gt;
			var tmp = fieldNames.split(&#039;X&#039;);&lt;br /&gt;
			var sID = tmp[0];&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;
			function getCookie ( cookieName ) {&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;
				if ( results ) {&lt;br /&gt;
					return ( unescape ( results[2] ) );&lt;br /&gt;
				}&lt;br /&gt;
				else {&lt;br /&gt;
					return null;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Get the session name&lt;br /&gt;
			var sessionName = getCookie ( &#039;PHPSESSID&#039; );&lt;br /&gt;
			// Check to see if the question order has already been shuffled in this session&lt;br /&gt;
			var cookieArray = getCookie ( &#039;sArray&#039; + gID + &#039;_&#039; + sessionName );&lt;br /&gt;
			// If already shuffled, use that question order&lt;br /&gt;
			if ( cookieArray ) {&lt;br /&gt;
				//qArray = $.trim(cookieArray);&lt;br /&gt;
				qArray = cookieArray.split(&#039;,&#039;);&lt;br /&gt;
			}&lt;br /&gt;
			// If not, go ahead and shuffle&lt;br /&gt;
			else {&lt;br /&gt;
				// Load the IDs of all questions on the page into the array&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;
					qArray.push($( this ).attr(&#039;id&#039;));&lt;br /&gt;
				});&lt;br /&gt;
				// Shuffle the questions array&lt;br /&gt;
				function shuffle(o){&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;
					return o;&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;
				var today = new Date();&lt;br /&gt;
				today.setTime( today.getTime() );&lt;br /&gt;
				var expires = 2 * 1000 * 60 * 60 * 24; // Expire the cookie in 2 days&lt;br /&gt;
				var expiresDate = new Date( today.getTime() + (expires) );&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;
			// Wrap the questions in a div&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;
			$( &#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;
			$( &#039;div#qWrapper&#039; ).css({&lt;br /&gt;
				&#039;padding&#039;:0,&lt;br /&gt;
				&#039;margin&#039;:0&lt;br /&gt;
			});&lt;br /&gt;
&lt;br /&gt;
			// Insert the questions into the wrapper in the shuffled order&lt;br /&gt;
			$.each(qArray, function(i, val){&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;
		shuffleQuestions();&lt;br /&gt;
&lt;br /&gt;
		function hideQuestions(numberToHide, mandatoryMsg) {&lt;br /&gt;
			// Create an array of the IDs of all questions on the page&lt;br /&gt;
			var questions = new Array();&lt;br /&gt;
			$( &#039;div[id&amp;lt;/div&amp;gt;=&amp;quot;question&amp;quot;]&#039; ).each(function(i) {&lt;br /&gt;
				questions.push($( this ).attr(&#039;id&#039;));&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;
			var questionsLength = questions.length;&lt;br /&gt;
			var shownQuestions = questions.splice(numberToHide,questionsLength-numberToHide);&lt;br /&gt;
&lt;br /&gt;
			// Hide the remaining questions&lt;br /&gt;
			$.each(questions, function(i, val){&lt;br /&gt;
				$( &#039;div#&#039; + val + &#039;&#039; ).hide();&lt;br /&gt;
			});&lt;br /&gt;
&lt;br /&gt;
			// Add an asterisk to the &amp;quot;shown&amp;quot; questions&lt;br /&gt;
			// NOTE: Comment this section out if questions are not mandatory&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;
			// NOTE: Comment this section out if questions are not mandatory&lt;br /&gt;
			$(&#039;form#limesurvey&#039;).submit(function(){&lt;br /&gt;
				// Override the built-in &amp;quot;disable navigation buttons&amp;quot; feature&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;
				var answered = 0;&lt;br /&gt;
				$.each(shownQuestions, function(i, val){&lt;br /&gt;
					if ( $( &#039;div#&#039; + val + &#039; input.radio:checked&#039; ).length == 0 ) {&lt;br /&gt;
						$( &#039;div#&#039; + val + &#039;&#039; ).css(&#039;color&#039;, &#039;red&#039;);&lt;br /&gt;
						answered = 1;&lt;br /&gt;
					}&lt;br /&gt;
					else {&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;
				if ( answered == 1 ) {&lt;br /&gt;
					alert ( mandatoryMsg );&lt;br /&gt;
					return false;&lt;br /&gt;
				}&lt;br /&gt;
				else {&lt;br /&gt;
					return true;&lt;br /&gt;
				}&lt;br /&gt;
			});&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Call the hide function&lt;br /&gt;
		// Edit here for number of question to hide and mandatory message&lt;br /&gt;
		hideQuestions(2, &#039;Please complete all questions&#039;);&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;
===Version 2.0 And Newer===&lt;br /&gt;
Here is a link to a sample survey showing how to do this with Relevance - [[Expression Manager Sample Surveys#Randomly Ask A Specific Number Of Questions In A Group (a sub-set of the questions)]]&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.com/index.php/survey/index/sid/712544/newtest/Y?712544X99X2151=gelb&amp;amp;712544X99X2152=12345 &amp;lt;br&amp;gt; And if your question code is QCODE and CODE2, you can use it like that : http://www.example.com/index.php/survey/index/sid/712544/newtest/Y?QCODE=gelb&amp;amp;CODE2=12345 &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.example.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;Reference&#039;&#039;&#039;&lt;br /&gt;
*You can find the code provided by user &amp;quot;janokary&amp;quot; and a short explanation at the LimeSurvey Bug &amp;amp; Feature Tracker: [http://bugs.limesurvey.org/view.php?id=2982]&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Prevent accidentially closing the survey=&lt;br /&gt;
&lt;br /&gt;
Sometimes you want to ask the user to confirm that they want to close an incomplete survey and/or use the back/reload buttons (which might break LimeSurvey).&lt;br /&gt;
&lt;br /&gt;
A solution can be done in javascript, as discussed in the forum: https://www.limesurvey.org/en/community-services/forums/can-i-do-this-with-limesurvey/96384-prevent-accidentially-closing-the-survey&lt;br /&gt;
&lt;br /&gt;
You can add this functionality in the template.js file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//FEATURES: (2015-03-27) Now with fix for iframes (e.g. file uploader) and the template editor &lt;br /&gt;
function goodbye(e) {&lt;br /&gt;
    if(!$(&#039;body&#039;, top.document).hasClass(&#039;submitted&#039;) &amp;amp;&amp;amp; !$(&#039;#completed&#039;).length &amp;amp;&amp;amp; !$(&#039;.templateeditor&#039;, top.document).length) { //check if a button was used to navigate OR the survey is completed OR the template is displayed in the template editor&lt;br /&gt;
&lt;br /&gt;
		if(!e) e = window.event;&lt;br /&gt;
		//e.cancelBubble is supported by IE - this will kill the bubbling process.&lt;br /&gt;
		e.cancelBubble = true;&lt;br /&gt;
		e.returnValue = &#039;Are you sure you want to quit this survey?&#039;; //This is displayed on the dialog for IE&lt;br /&gt;
 &lt;br /&gt;
		//e.stopPropagation works in Firefox.&lt;br /&gt;
		if (e.stopPropagation) {&lt;br /&gt;
			e.stopPropagation();&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return &#039;Are you sure you want to quit this survey?&#039;; // For chrome&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
window.onbeforeunload = goodbye;&lt;br /&gt;
&lt;br /&gt;
$(document).on(&#039;click&#039;, &#039;.button, .changelang, [name=&amp;quot;move&amp;quot;]&#039;, function(event){ //added .changelang here, please add other classes if you know which should be allowed to navigate&lt;br /&gt;
	$(&#039;body&#039;, top.document).addClass(&#039;submitted&#039;);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Alternate system for Ranking=&lt;br /&gt;
&lt;br /&gt;
Sometimes default ranking are not usable for your survey. But Expression manager unique function can easily be used for other question type.&lt;br /&gt;
&lt;br /&gt;
* With an &#039;Array&#039; question where answer are number from 1 to X (X is the max number of choice to rank). &lt;br /&gt;
** &#039;Question validation equation&#039;: &amp;lt;code&amp;gt;unique(self)&amp;lt;/code&amp;gt;&lt;br /&gt;
* With a &#039;Multiple numerical input&#039; question :  &lt;br /&gt;
** &#039;Question validation equation&#039;: &amp;lt;code&amp;gt;unique(self) and count(self)==max(self) &amp;lt;/code&amp;gt;&lt;br /&gt;
** &#039;Sub-question validation equation&#039;: &amp;lt;code&amp;gt;(is_empty(NUMBER_SQ001) or is_int(NUMBER_SQ001)) and (is_empty(NUMBER_SQ002) or is_int(NUMBER_SQ002)) ...&amp;lt;/code&amp;gt; to have only integer value set&lt;br /&gt;
* With a &#039;Array (Numbers) &#039; question :&lt;br /&gt;
** &#039;Question validation equation&#039;: &amp;lt;code&amp;gt;unique(self) and count(self)==max(self) &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Demonstration can be found here : [http://limesurvey.sondages.pro/714997.html Demonstration of alternate ranking solution] , lss file : [[media:Limesurvey_survey_lotofranking.lss]]&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=QS:Random_order&amp;diff=137708</id>
		<title>QS:Random order</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=QS:Random_order&amp;diff=137708"/>
		<updated>2019-03-14T08:32:23Z</updated>

		<summary type="html">&lt;p&gt;Mazi: Added link to additional details&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;
===Random answer order (random_order)=== &amp;lt;!--T:544--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:545--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:546--&amp;gt;&lt;br /&gt;
This attribute causes LimeSurvey to ignore the existing order of answer options/subquestions, and instead it orders them randomly. This option permits the survey creator to diminish the survey bias. Please note that if a question has subquestions, the order of subquestions will be randomized, not the order of the answer options.&lt;br /&gt;
Check https://survey-consulting.com/how-to-randomize-items-at-limesurvey/#Randomizing_the_order_of_answersitems for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:547--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Available options&#039;&#039;&#039;&lt;br /&gt;
*Yes - Randomize when participant enters survey&lt;br /&gt;
*No (default)&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:549--&amp;gt;&lt;br /&gt;
[[Category:Question Settings]][[Category:Question Display Options]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazi</name></author>
	</entry>
</feed>