Pre-populating text is not working while switching the radio buttons

Dear @keerthi,
may be the following can help. Instead of using default, use once(‘N/A’). Default is only activated one time. But once(…) can re-activate when the field becomes empty again (depending on navigation and dependencies!).
Here your example, a bit adapted for easier testing.
SAMPLEFORM 02.xlsx (12.2 KB)
I added a suffix to some labels and put the last calculate var temporarily to text type, for testing.
Take care of some limits with once(): https://docs.opendatakit.org/form-logic/?highlight=default#setting-default-responses

Side-notes:

  1. I was surprised how you made it: 3 variables with the same label, and then compiling the result with a calculate (4th) variable. Why not use one text field with a dynamic once( if(…) ) pre-set, for the cases where you allow the user to enter or change the text. And a second calculate var (which can integrate a fixed text case).
  2. You do not need false for required, this is the KoBo default? (If you want other fields as required, you would need to set them to true.)
  3. Better not use / in names? (N/A). “Names can only contain letters, digits, hyphens, underscores, and periods.” (xlsform.org)

Kind regards

1 Like