Fill a text field with a preset value based on the selected value of a list in XLS Forms

Is this a value that needs to be user-editable or just displayed? If it doesn't need to be user-editable, you should be able to make text field readonly and put ${my-select} in the calculation column.

If it needs to be user-editable, see the tip section of https://docs.getodk.org/form-logic/#dynamic-defaults. We will hopefully soon have support for setting the value of a field when the value of another field changes in XLSForm: XLSForm proposal to calculate a value when another value changes

3 Likes