Open pbowen-oc opened 2 years ago
empty: http://localhost:8005/single/fs/i/Y7eqyLo8?ecid=1 readonly: http://localhost:8005/view/fs/i/8d428b60ddb0739744928bfddb9da8a2?ecid=1
I can reproduce in master. Something to do with setting question to readonly.
The same happens in the underlying <select>
element. It looks to be caused by an itemset widget not copying the disabled attribute. Interestingly the native selectpicker will 'select' the first non-disabled option.
I think the fix would be for itemset.js to look at whether the <select>
is disabled and if so make any dynamically added <option>
s also disabled.
Requires 2 PRs to be merged:
and after that to update enketo-express-(oc) with new Enketo Core and Enketo Transformer
@MartijnR - We deployed the PRs for Transformer and Core on top of the 2.8.0.oc branch but the issue was still present. Do you think the fix needs other changes from master or there is some other issue?
I don't know at the moment. Was Enketo Transformer updated in enketo-express-oc? It should be. I can see that may have not been so clear. Enketo Transformer is only used to run tests in Enketo Core (so doesn't actually have to be updated in Enketo Core for this fix - but fine to do so).
@MartijnR - Is this fully merged into our master branch?
Yes, confirmed.
I added the ready-for-final-review tag based on the most recent comment.
Present in 2.5.6.oc-17 and 2.8.0.oc branch. Related to OpenClinica/enketo-express-oc#503 but still not working when tested with that fix.
Steps:
Expected: The first and second groups show the item as null and the third group shows the item with a value.
Actual: All three groups show the item with a value.
Edit mode (correct):
View mode (incorrect):
The same happens if the form is viewed without the instance. For example:
Steps:
Expected: The item in the repeating group will show a null value.
Actual: The item shows a value.
In practice, the behavior is that the first choice that matches the choice filter is being displayed as the item value (instead of the expected null) when the form is viewed. Edit mode still shows the null value as expected.