Source URL: https://docs.surveycto.com/02-designing-forms/01-core-concepts/03x.field-types-username.html
Last updated: 2020-12-18
Field type: username
In the form designer, edit Form settings, then check the username meta-data field (if it isn't already).
username: record the username of the user filling out the form. In SurveyCTO Collect on mobile devices, this will be the username currently configured in Collect's settings. To help prevent fraud, the username will automatically be appended with " (not yet authenticated)" until that user successfully connects to your server. When users fill in forms with a web browser, it will either be the username they logged in with, or "anonymousUser" if they didn't log in at all. This is an automatic, hidden field type: it is filled in automatically when the form is started and never shows up in the survey's user interface.
In the spreadsheet form definition:
Please note: the username field is automatically set when the form is started, and never updates its value. If your collection process involves frequently switching the username stored in General Settings, and you want to make sure to save the current username in your form, you can use a calculate field with the username() function.