Class FormFieldViewModel
- Namespace
- Dynamicweb.Forms
- Assembly
- Dynamicweb.Forms.dll
Represents a view model for rendering form fields.
public class FormFieldViewModel : ViewModelBase
- Inheritance
-
FormFieldViewModel
- Inherited Members
- Extension Methods
Properties
Active
Gets or sets a value indicating whether the form field is active.
public bool Active { get; set; }
Property Value
Append
Gets or sets the string to append to the form field value.
public string? Append { get; set; }
Property Value
AutoValue
Gets or sets the auto value of the form field.
public string? AutoValue { get; set; }
Property Value
Color
Gets or sets the color of the form field.
public string? Color { get; set; }
Property Value
CssClass
Gets or sets the CSS class of the form field.
public string? CssClass { get; set; }
Property Value
DefaultValue
Gets or sets the default value of the form field.
public string? DefaultValue { get; set; }
Property Value
Description
Gets or sets the description of the form field.
public string? Description { get; set; }
Property Value
FieldOptions
Gets the collection of form field options.
public IEnumerable<FormFieldOptionViewModel> FieldOptions { get; }
Property Value
GroupId
Gets or sets the group ID of the form field.
public int GroupId { get; set; }
Property Value
HideInReceipt
Gets or sets a value indicating whether the form field should be hidden in the receipt.
public bool HideInReceipt { get; set; }
Property Value
HtmlId
Gets or sets the HTML ID of the form field.
public string? HtmlId { get; set; }
Property Value
ID
Gets or sets the ID of the form field.
public int ID { get; set; }
Property Value
Image
Gets or sets the image of the form field.
public string? Image { get; set; }
Property Value
InputPattern
Gets or sets the input pattern of the form field.
public string? InputPattern { get; set; }
Property Value
InputType
Gets or sets the input type of the form field. For input fields this is the HTML input type, but the casing is not consistent, so normalize it before comparing or emitting it.
public string? InputType { get; set; }
Property Value
IsButton
Gets or sets a value indicating whether the form field is a button.
public bool IsButton { get; set; }
Property Value
IsInput
Gets or sets a value indicating whether the form field is an input field.
public bool IsInput { get; set; }
Property Value
IsList
Gets or sets a value indicating whether the form field is a list field.
public bool IsList { get; set; }
Property Value
IsOther
Gets or sets a value indicating whether the form field is an "Other" field.
public bool IsOther { get; set; }
Property Value
IsTextArea
Gets or sets a value indicating whether the form field is a textarea field.
public bool IsTextArea { get; set; }
Property Value
MaxLength
Gets or sets the maximum length of the form field value.
public int MaxLength { get; set; }
Property Value
Name
Gets or sets the name of the form field.
public string? Name { get; set; }
Property Value
Placeholder
Gets or sets the placeholder text of the form field.
public string? Placeholder { get; set; }
Property Value
Prepend
Gets or sets the string to prepend to the form field value.
public string? Prepend { get; set; }
Property Value
Required
Gets or sets a value indicating whether the form field is required.
public bool Required { get; set; }
Property Value
Size
Gets or sets the size of the form field.
public int Size { get; set; }
Property Value
Sort
Gets or sets the sort order of the form field.
public int Sort { get; set; }
Property Value
SystemName
Gets or sets the system name of the form field.
public string? SystemName { get; set; }
Property Value
Text
Gets or sets the text of the form field.
public string? Text { get; set; }
Property Value
TextAreaHeight
Gets or sets the height of the textarea form field.
public int TextAreaHeight { get; set; }
Property Value
Title
Gets or sets the title of the form field.
public string? Title { get; set; }
Property Value
Type
Gets or sets the type of the form field, e.g. Text, Textarea, Select, Radio, Checkbox, Checkboxlist, File, Hidden or Submit.
public string? Type { get; set; }
Property Value
Methods
GetOptions()
Retrieves the options for the form field.
public IEnumerable<FormFieldOptionViewModel> GetOptions()
Returns
- IEnumerable<FormFieldOptionViewModel>
The collection of form field options.
GetValue()
Retrieves the value to pre-fill the form field with: the auto value (e.g. current user data) if set, otherwise the default value.
public string GetValue()
Returns
- string
The value to pre-fill the form field with.