AllFields
Summary
Alias to the Fields loop (does the same thing).
Examples
Basic usage
Notice the use of @item.GetValue to get data from the loop variable.
If you just write @GetValue, the data will be taken from outside the loop.
Similarly, you have to use @item.GetLoop to use loops inside a loop.
Check if the loop exists
Example of usage
The following general example illustrates how to use a loop construct.
Check if the loop exists
Available tags
Field.Active
Returns True if the field is active - otherwise False.
@GetBoolean("Field.Active")
Field.AutoValue
Returns the system name of the field that is selected as automatic value for the field, e.g. AccessUserName if Name is selected as automatic value.
@GetString("Field.AutoValue")
Field.Color
The color tag is used in old Forms module (same database tables and fields) - but is obsolete in Forms for editors.
@GetString("Field.Color")
Field.GroupID
An ID of the group with the field (functionality not fully implemented yet).
@GetInteger("Field.GroupID")
Field.IsButton
Returns True if the field is a button (Send or Reset) - otherwise False.
@GetBoolean("Field.IsButton")
Field.IsInput
Returns True if the field is an input field - otherwise False.
@GetBoolean("Field.IsInput")
Field.IsList
Returns True if the field is a list - otherwise False.
@GetBoolean("Field.IsList")
Field.IsOther
Returns True if the field is an element (e.g. an image) - otherwise False.
@GetBoolean("Field.IsOther")
Field.IsTextarea
Returns True if the field is a text area - otherwise False.
@GetBoolean("Field.IsTextarea")
Field.MaxLength
Returns the maximum number of characters that the field allows.
@GetInteger("Field.MaxLength")
Field.Placeholder
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
@GetString("Field.Placeholder")
Field.TextareaHeigh
Returns the height (lines) of the field of type text area.
@GetInteger("Field.TextareaHeigh")
Field.Type
Returns the type of the field.
Possible values: TextInput, CheckBoxList, Select, Textarea, Submit
@GetString("Field.Type")
Available loops
Options
The Options
loop lets you display various information about option for form field type of list.
@foreach (LoopItem item in GetLoop("Options")){ <p>@item.GetValue("TagName")</p> }