Option.DefaultSelected

Version: - boolean  

Summary

Returns True if the option is selected as default option - otherwise False.

Settings

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

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

Examples

Outputting the template tag

@GetBoolean("Option.DefaultSelected")

Check if tag has a value

@if(!bool.IsNullOrWhiteSpace(GetBoolean("Option.DefaultSelected"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ bool storedTag = GetBoolean("Option.DefaultSelected"); }

Outputting the template tag

<!--@Option.DefaultSelected-->

Check if boolean has a value

<!--@If Defined(@Option.DefaultSelected)--> Let's output this tag here: <strong><!--@Option.DefaultSelected--></strong> <!--@EndIf(@Option.DefaultSelected)-->