Form.Field.[FieldSystemName].Prepend

Version: - string  

Summary

Returns prepended HTML for the field.

Settings

The value is based on the Prepend field in the Layout section.

(Modules > Forms for editors > Form > Edit field > Layout > Fields > Prepend)

Remarks

Prepend is e.g. used in Bootstrap for adding e.g. fixed decimals after a number field like this: [number field].00, where .00 is the prepend.

Examples

Outputting the template tag

@GetString("Form.Field.[FieldSystemName].Prepend")

Check if tag has a value

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

Assign tag to a value for later use

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

Outputting the template tag

<!--@Form.Field.[FieldSystemName].Prepend-->

Check if string has a value

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