Form.Field.[FieldSystemName].Placeholder
Version: - stringSummary
Returns the placeholder text for the field. The placeholder is used to specify a short hint that describes the expected value of an input field (e.g. a sample value or a short description of the expected format).
The short hint is displayed in the input field before the user enters a value.
Settings
The value is based on the Placeholder field in the field settings.
(Modules > Forms for editors > Form > Edit field > Settings > Placeholder)
Remarks
Works only with text fields.
Examples
Outputting the template tag
@GetString("Form.Field.[FieldSystemName].Placeholder")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("Form.Field.[FieldSystemName].Placeholder"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("Form.Field.[FieldSystemName].Placeholder");
}
Outputting the template tag
<!--@Form.Field.[FieldSystemName].Placeholder-->
Check if string has a value
<!--@If Defined(@Form.Field.[FieldSystemName].Placeholder)-->
Let's output this tag here: <strong><!--@Form.Field.[FieldSystemName].Placeholder--></strong>
<!--@EndIf(@Form.Field.[FieldSystemName].Placeholder)-->