Exclusive option: Difference between revisions
From LimeSurvey Manual
(Created page with "<translate> <languages /> <onlyinclude> '''Description''' The exclusive option attribute takes the code of an answer in a multiple option question so that when clicked on th...") |
mNo edit summary |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<translate> | <translate> | ||
<!--T:1--> | |||
<languages /> | <languages /> | ||
<onlyinclude> | <onlyinclude> | ||
===Exclusive option (exclusive_option)=== <!--T:15--> | |||
<!--T:2--> | |||
'''Description''' | '''Description''' | ||
The exclusive option attribute takes the code of an answer in a multiple option question so that when clicked on | <!--T:3--> | ||
The exclusive option attribute takes the code of an answer in a multiple option question so that when clicked on its corresponding checkbox, all the other previously checked options will get unchecked and get marked as read-only (=disabled). This function was created to ensure the data integrity when one of the multiple options in a multiple option question implies that no other option can be selected too. Basically, this feature marks the other attributes as being irrelevant. | |||
<!--T:4--> | |||
<div class="simplebox">It is also possible to have multiple exclusive options. These must be separated by semicolons.</div> | <div class="simplebox">It is also possible to have multiple exclusive options. These must be separated by semicolons.</div> | ||
<!--T:5--> | |||
'''Example''' | '''Example''' | ||
<!--T:6--> | |||
For a short explanation on answer codes, check first the following [[Adding_answers_or_subquestions|wiki section]]. Once understood, introduce the "AnswerCode" that will trigger the function once selected. | For a short explanation on answer codes, check first the following [[Adding_answers_or_subquestions|wiki section]]. Once understood, introduce the "AnswerCode" that will trigger the function once selected. | ||
<!--T:8--> | |||
Below, you may see an example where the '''exclusive option''' attribute is used. | |||
< | <!--T:9--> | ||
You can see in the first screenshot that some non-LimeSurvey options are selected: | |||
<!--T:10--> | |||
<center>[[File:Part_1_example_exclusive_option.png]]</center> | <center>[[File:Part_1_example_exclusive_option.png]]</center> | ||
If you click on the marked option ( | <!--T:11--> | ||
If you click on the marked option (which is entered in the '''exclusive option''' box), the other options will get unmarked and disabled, being left only with the current option checked: | |||
<!--T:12--> | |||
<center>[[File:Part_2_example_exclusive_option.png]]</center> | <center>[[File:Part_2_example_exclusive_option.png]]</center> | ||
To take a closer look | <!--T:13--> | ||
To take a closer look at our example, import the .lsq file into your LimeSurvey installation: | |||
<!--T:16--> | |||
[[File:Example_exclusive_option_question.zip]]. | |||
</onlyinclude> | </onlyinclude> | ||
[[Category:Question Settings]][[Category:Logic | <!--T:14--> | ||
[[Category:Question Settings]][[Category:Question Logic Options]] | |||
</translate> | </translate> |
Latest revision as of 12:32, 8 February 2019
Exclusive option (exclusive_option)
Description
The exclusive option attribute takes the code of an answer in a multiple option question so that when clicked on its corresponding checkbox, all the other previously checked options will get unchecked and get marked as read-only (=disabled). This function was created to ensure the data integrity when one of the multiple options in a multiple option question implies that no other option can be selected too. Basically, this feature marks the other attributes as being irrelevant.
Example
For a short explanation on answer codes, check first the following wiki section. Once understood, introduce the "AnswerCode" that will trigger the function once selected.
Below, you may see an example where the exclusive option attribute is used.
You can see in the first screenshot that some non-LimeSurvey options are selected:
If you click on the marked option (which is entered in the exclusive option box), the other options will get unmarked and disabled, being left only with the current option checked:
To take a closer look at our example, import the .lsq file into your LimeSurvey installation: