Disable Edit of visible item

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
sined34
Posts: 1
Joined: February 19th, 2019, 7:21 am

Disable Edit of visible item

Post by sined34 »

Hi,
I'm creating a CSPro capi data entry app and i have one issue since long time.
I want to disable editing of an item but this item must be visible to the interviewer for chek information.
I have tried onfocus + killfocus but this item still editable.

Thank you so much.
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Disable Edit of visible item

Post by aaronw »

Here are two simple approaches:
  • Make the item protected, but view it in the case tree
  • Remove the item from the form, but display it in a warning message
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Disable Edit of visible item

Post by josh »

In addition to the options Aaron mentioned there is a third approach which is to make it protected and display it in the question text of another item. We often do this with confirmation questions. For example if there a series of questions about births for a women (number of live male births, live female births, male children deceased, female children deceased,...) then we add a yes/no question "Confirm total births" where the question text asks "This means that %NAME% had %TOTAL_BIRTHS% births total. Is that correct?" with responses "Yes" and "No". TOTAL_BIRTHS is a dictionary variable where the field is protected or is not on the form or TOTAL_BIRTHS is a global logic variable. We calculate the value of TOTAL_BIRTHS based on the answers to the earlier fertility questions. This way TOTAL_BIRTHS is not editable but the interviewer can check the value.
Post Reply