Question on background-audio

Hello,

I am using KoboCollect, and I need clarification about background-audio metadata type in XLSForms.

I want to record an entire interview, but the recording must only start after the enumerator has completed the “Introduction” and “Consent” sections (usually the first 2-3 questions).

The Problem: I have put the background-audio row inside a Group with a relevant condition (e.g., relevant="${consent} = 'yes'"). However, in testing with KoboCollect, the microphone initializes and starts recording the moment the form is opened, regardless of whether the logic condition is met. Could you please help me with this?

Thanks in advance!

This is actually working as designed; background-audio will initiate as soon as you start the form because it is happening ‘in the background’ [sic] and therefore isn’t triggered upon reaching any particular question. However, what your relevant condition will do is that if this condition is false when it comes time to submit, the background audio will not be sent to the server, thus ostensibly achieving the same result; anything that has relevant=false is blanked upon submission.

If you want to override the form’s background-audio setting entirely and disable any recording whatsoever, then you must do so manually via the vertical ‘…’ menu settings in the form:

You could, for example, include a note in your form to tell the data collector to turn this off if the respondent refuses.

1 Like