Hello,
I would like to be able to have a specify other text prompt/question follow after a select multiple question, in which many choices are selected including the "other" option. I currently have the following in my XLSform:
Type Name label:: portugese Label::english Constraint
text B14_other Especifique outro Specify other ${B14} = 96
Where the previous question(question B14) is a select multiple question with other (aka 96) coded as an answer choice. This does not allow me to type in and specify what other means after I have selected it as part of my select multiple choices in the previous question. This method does work for select_one type questions. Is there a different method to use for select_multiple type questions?
Any help or ideas on how to do this in an XLSform would be greatly appreciated.
Hi Gregorz,
Thank you for the recommendation. This did not work for me. I am still having the same problem where i can not specify other using text when other is selected as part of a select multiple answer choice. Do you have any other ideas? Thank you for your time and help.
Best,
Sarah
So I think I don't understand your case. I thought you need to display an extra question (text box) when one of selected options in previous question (multi select) is "other". Am I wrong? You can also attach your form maybe I missed something.
Yes, that is my problem. To clarify, if a person only selects other in response to a select multiple question then it will display an extra question (text box) to specify what they mean by other. However, if they pick many choices in the multi select question as well as picking the other option choice, then the extra question (text box) for them to specify what they mean by other is not displayed.
I have attached my form here and have changed the text to red for the 3 questions that have this problem in my form. Any suggestions would be very appreciate. I have no idea what I am missing and am very new to this/ not a programmer.
Wouldn't this only allow the text box to be visible if the person selected other and no other answer choices? That is what currently happens.
I would like them to be able to select many answers in addition to selecting other. For example they choose A and C and Other and then the next question is a text box to type in the other. Im pretty lost.
I think I don't understand again The first form displays an additional question if you select other or other + something else.
The second form displays that question if you select only other option. What's wrong?
I need the first case. I tried what you suggested but for some reason it is not working for me. Maybe I am doing something wrong with using the first case.
I'm not able to covert your form using http://opendatakit.org/xiframe/ but you should add selected(${B14},'96') instead of ${B14} = 96 in L51 and it should work. Did you try it?
@Chinedu_Arinze is exactly correct, but I wanted to add a clarifier for @Sarah_Pfeil because the or_other construct does have limitations if you need to support multiple languages or code other as a different value.
In this example below, favorite_colors uses the or_other construct, while favorite_numbers does this manually using relevance.
You'll note that favorite_numbers question lets you specify the wording of the other question, the label of the option in whatever language, and what value/name is saved to the database (e.g., -1). You can also specify whatever data type you want. For example, you can have an other that is a GPS coordinate or a picture.
One limitation you should be aware of is that you cannot put favorite_numbers and other_number on the same screen (e.g., in a group with a field-list). They have to appear on different screens.
The or_other is an interesting option that I overlooked, but upon testing it, I realized that the value is stored in yet another column. Is there a way to store the "other" value in the same column as the original question? Cause after all, it's an answer to the same question.
P.S. Please let me know if this should go into a new question.
As @dicksonsamwel indicates, no there is no way to get the 'other' value added into the original select_multi result. But what you could do is add a calculation that appends the 'other' question's (string) value to the select_multi's (string) value, and use that result everywhere instead of the select_multi. eg