Field.Prepend

Version: - string  

Summary

Returns prepend 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("Field.Prepend")

Check if tag has a value

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

Assign tag to a value for later use

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

Outputting the template tag

<!--@Field.Prepend-->

Check if string has a value

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