Adding spaces between field references in labels

SurveyCTO has a known limitation where if you add spaces between field references in a form, that space won't appear when you run the form.

Example of one field reference immediately following another in field's label.

The same form design from above running in SurveyCTO Collect on Android - note the absence of spaces between dynamic text.

The good news is that there are a few workarounds to include spaces between field references:

1. Use HTML entities

You can use Unicode hexadecimal or decimal code in "entities" that represent the character. For example, the entity   represents a space, and you can use that instead of a space in your labels.

See the decimal code entity placed between the field references.

Note that the dynamic text now has a space.

Non-breaking spaces

Something cool you can include in your form is called a "non-breaking space". This is when a space is treated like a normal character, so it does not break up the word across multiple lines. In the image below, see how "SurveyCTO by Dobility" is all on one row instead of "Dobility" being by on the row below?

With regular spaces.

With non-breaking spaces. See how "SurveyCTO by Dobility" is all on the same line.

To use a non-breaking space, use the character entity &nbps;.


2. Use the concat() function

If you are not comfortable using HTML entities, or if you would simply prefer a different method, you can also use the concat() function to add in the spaces. Check out the calculation for the calculate field "full_name" below:


It uses the expression:

concat(${first_name}, ' ', ${middle_name}, ' ', ${last_name})

This expression adds spaces between the contents of these three fields, stored in a new field. This also gives you the advantage of simply using the field reference ${full_name} instead of typing out all three names each time you would like to display the full name.

Do you have thoughts on this support article? We'd love to hear them! Feel free to fill out this feedback form.


Please sign in to leave a comment.