Hallo,
Please help me,
How to this example, in Q2 answer can recall Orange?
Big thanks
Recall Answer.xlsx (12.6 KB)
Hallo,
Please help me,
How to this example, in Q2 answer can recall Orange?
Big thanks
Recall Answer.xlsx (12.6 KB)
Hi @Kal_Lam , Sorry may I ask?
In other case, Is possible to recall “Orange” in Q2??
@Apry, I made a quick test and came up with the following observation. FYI, when testing your XLSForm with the online validator I had no issues with what you wish to achieve. See image below:
But when I uploaded your XLSForm on the KoboToolbox server, I got the same output as the one you shared. See image below:
But when testing the same I get this issue on the Collect Android App
. See image below:
Pinging @Xiphware to unfold this issue.
yups, online validator not have issue.
that point, I want option “Others” replace be “Orange” in Q2, is possible in Kobo?
Maybe in another way?
Others in Q2 replace according to the answer in Q1, like your input Banana
So yes indeed the difference in behavior here is due to pyxform; specifically, Kobo is currently running an earlier version whereas XLSForm Online is running the very latest. There have been a number of changes made in the interim; I cannot determine all the ones that are directly responsible here, other than 647: include all choice lists in output by lindsay-stevens · Pull Request #736 · XLSForm/pyxform · GitHub.
However, I have been able to determine how to force Kobo’s current version of pyxform to generate the equivalent XForm definition that works. Specifically, you need to:
Below is a new version of your form showing the necessary changes to accomplish this:
Recall Answer2.xlsx (12.2 KB)
Adding a choice_filter= true()
basically forces pyxform to make all choice lists into nodesets. This behavior became standard behavior starting in pyxform v3. And adding an explicit label::English
- instead of just label
- forces pyxform to make all the choice labels translatable, which appears to be necessary to correctly resolve the ${Q1_Others}
dynamic label.
Once you do this, the deployed XForm from Kobo, using the earlier pyxform version, is ostensibly equivalent to what the latest pyxform version produces. Hence the form should now behave as you observed.
I’ve deployed this to Kobo and tested against both Enketo and KoboCollect successfully:
Note, Kobo will be shortly updating pyxform so these changes may not be required for much longer, although there is also no harm leaving them in.
Addendum
I do note, however, that Enketo does not immediately refresh the second select’s options list as soon you enter a value for Other (instead you’ll have to select/deselect something to force a refresh. You may be able to switch to a paging style to workaround this. but I haven’t tried it. This doesn’t affect KoboCollect because it refreshes as soon as you swipe to Q2.
Its also worth pointing out that your form as written is somewhat misleading, because it is not actually “Others” (plural).; if you enter multiple other names of fruit - comma or spaced separated doesn’t matter - they will all appear again as one in the followup select.
[but if you do want to handle multiple others, then you are dealing with a whole different kettle of fish! ]
Thank you,
I try use your attachment (xls form), in KoboCollect is work.
But when I use browser (by mobilephone and PC), Banana do not appear??
Coz my regional country not English??
As I mentioned, you may need to deselect/select Q1 again to force a refresh of Q2.
Ohh i see, thanks is work.
But my field team possible change every day, it’ can be problem for me to always reminder this step for new surveyor.