Field.CssClass

Version: - string  

Summary

Returns the css class for the form field.

Settings

The value is based on the Css class field in the Layout settings for the field.

(Modules > Forms for editors > Form > Edit field > Layout > Layout > Css Class)

Examples

Outputting the template tag

@GetString("Field.CssClass")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetString("Field.CssClass"); }

Outputting the template tag

<!--@Field.CssClass-->

Check if string has a value

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