Field.[FieldSystemName].OptionText

Version: - string  

Summary

Returns the label/text of the option that is submitted by the user.

Settings

The value is based on the Text field in the list options.

(Modules > Forms for editors > Form > Edit list field > Options > Edit option > Text)

Examples

Outputting the template tag

@GetString("Field.[FieldSystemName].OptionText")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("Field.[FieldSystemName].OptionText"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("Field.[FieldSystemName].OptionText"); }

Outputting the template tag

<!--@Field.[FieldSystemName].OptionText-->

Check if string has a value

<!--@If Defined(@Field.[FieldSystemName].OptionText)--> Let's output this tag here: <strong><!--@Field.[FieldSystemName].OptionText--></strong> <!--@EndIf(@Field.[FieldSystemName].OptionText)-->