Form.Field.[FieldSystemName].MaxLength
Version: - integerSummary
Returns the maximum number of characters that the field allows.
Settings
The value is based on the Max. lenght field in the Values settings for the field.
(Modules > Forms for editors > Form > Edit field > Values > Values > Max. lenght)
Examples
Outputting the template tag
@GetInteger("Form.Field.[FieldSystemName].MaxLength")
Check if tag has a value
@if(!int.IsNullOrWhiteSpace(GetInteger("Form.Field.[FieldSystemName].MaxLength"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
int storedTag = GetInteger("Form.Field.[FieldSystemName].MaxLength");
}
Outputting the template tag
<!--@Form.Field.[FieldSystemName].MaxLength-->
Check if integer has a value
<!--@If Defined(@Form.Field.[FieldSystemName].MaxLength)-->
Let's output this tag here: <strong><!--@Form.Field.[FieldSystemName].MaxLength--></strong>
<!--@EndIf(@Form.Field.[FieldSystemName].MaxLength)-->