Have hit an error in Webforms that only started occurring in v1.0.1 (also occurs in v.1.0.2), it was performing as expected (and matching Collect) before this. Now it totally crashes out the in progress submission with a load error when the question is answered that affects both a calculation and a read only status in a followup question. In the process of creating an example form I found the 2nd case crashes Webforms all the time, and also causes selections not to appear in Collect.
The attached shows the error. The basic process is there is a list of existing scoped items, selecting one will then preselect the linked item in a followup question and set that question to read only to prevent accidental changes. If the scoped item is picked as 'other' then the followup question is blank and free to be selected by the user.
- Example 1: sets read only as
${field}!='other'- Works in Collect as expected
- Enketo doesn't apply read only, doesn't crash
- WF crashes unless Other is selected
- Example 2: sets read only as
if(${field}!='other' , 'yes' , 'no')- Collect: if Other selected, no selections appear at all. If anything else selected, selections appear, item prefilled, read only applied.
- Enketo doesn't apply read only, doesn't crash
- WF crashes for all selections
- non read only example - no read only applied, included for completion
- works as expected in Collect/Enketo/WF.
The crash message is of the form:
An error occurred while loading this form
Cannot write to readonly field: /data/item_ro1
example form:
WF readonly error.xlsx (84.8 KB)