Hide The Form's "Finish Button" Based On Mobile User Role/Group

Dear CommCare Users,

How can I hide the form's "Finish" button based on the user role/group of a given mobile user? So ideally, I would like the users to be able to access the module, open the form and go through all questions but when they reach the end of the form, the "Finish" button should not show or be disabled.

This would mean them completing the form without saving anything. I am trying to figure out the "readonly permission" on CommCare forms! Any ideas?

Thanks and kind regards,
Chaiwa.

Hi Chaiwa,

Depending on your specific workflow, the easiest way to accomplish this is to have an 'unanswerable' question that appears at the end of your form.

If you add a label question to the form with a validation condition that is simply 'false()' the user won't be able to complete the form. You can use the user's userdata or location data to conditionally display that 'blocking' question.

If the blocking question occurs before the last screen the user sees, the Finish button will never appear to the user in the current UI. That's kind of a 'trick' around the current UI behavior more than an intentional aspect of the interface, though, so I'm not sure I'd recommend encoding too many assumptions about the form entry UI into your form structure. They may prove confusing when the form is run in other platforms like web apps.

-Clayton