Want to hide the DOB after calculating age once the forms is submitted to the server


I’m having a related issue but with date of birth instead of name. We would like to calculate age from date of birth then remove the date of birth and only retain the calculated age.

I set up the age calculation then used the above workaround to hide the date of birth. On the data entry screen the calculated age still appears after I click ‘Finished’ to hide the DOB. But after saving the form both the DOB and age are blank in the dataset. Is there a way to retain the calculated value while removing the input value (DOB)?


Welcome back to the community, @cprosperi! You could do this as outlined in the image shared below:

In the survey tab of your xlsform:

Data entry screen as seen in Enketo: you still have not triggered the submission

Data entry screen as seen in Enketo: you have now triggered the submission

Data as seen in DATA>Table: age seen but DOB has been hidden

Reference xlsform:

Age Calculation.xlsx (9.8 KB)