Seems like a really simple question but I can't find anything about how to add labels to InfoPath fields?

I just want a text label beside a checkbox for example.

I know I can just type the text in beside the checkbox, but I would prefer to have an assigned label.

Surely this functionality exists?



If I remember correctly, you are forced to manually type the value next to the checkbox. However, you can then select the check box / radio button, and modify the properties of the input, and select the value when selected. One of the reasons this behaves this way, is that this allows you to create multiple views, which could be "translated" into multiple languages, without hard-coding the value that pairs with the input.

SharePoint Stack Exchange: Example


You can use a calculated value for this (expression box in InfoPath 2007). A calculated value can be a string value or it can be a formula comprised functions and / or fields.

For a dynamic label, you could bind the calculated value to a field in an XML data source (like the main data source in your form, or a secondary XML you add for this purpose), and use form logic to set the value.

Your Answer

