We are using an external app to fill some fields in an ODK form. Some of those fields are uuid's which are important for our process, but all this additional data can be confusing for the user.
I've tried hiding the fields using a relevant constraint but this leaves the answer always empty, and the external app can't fill the data.
I've also tried using calculate, but this always writes whatever is set in the calculate column, and the data is also not filled by the external app.
Is there a way to hide a question/answer pair, but still let the external app fill the data?
You can use the (not adequately documented) hidden
type which adds an instance node with no bind or body.
Thank you for the response. I haven't been able to make it work yet. I tried inserting a couple of variables as type hidden
, but the info is not being sent to our server. I'm not sure if I'm writing something wrong in the form, or if I should send the data from the external app in a specific type, and that's why it's not being filled. My form looks something like this.
type |
name |
label |
body::intent |
calculation |
begin_group |
preba1 |
Click on the button |
my.org.app( some='data') |
|
hidden |
var_1 |
Var 1 |
|
|
hidden |
var_2 |
Var 2 |
|
1+3 |
end_group |
|
|
|
|
I read that hidden types are used as constants, but maybe I'm missing something else. In the previous case, the var_2
calculated variable sends a 4 correctly, but not the var_1
filled by the external app.