Table of Contents

Class FormViewModel

Namespace
Dynamicweb.Forms
Assembly
Dynamicweb.Forms.dll

Represents a view model for rendering a form with its fields and field options in a razor template.

public class FormViewModel : ViewModelBase
Inheritance
FormViewModel
Inherited Members
Extension Methods

Constructors

FormViewModel()

Initializes a new instance of the FormViewModel class without fields and submits.

public FormViewModel()

Properties

CssClass

Gets or sets the CSS class of the form.

public string? CssClass { get; set; }

Property Value

string

Fields

Gets the collection of form fields, including inactive fields. Check Active before rendering a field.

public IEnumerable<FormFieldViewModel> Fields { get; }

Property Value

IEnumerable<FormFieldViewModel>

ID

Gets or sets the ID of the form.

public int ID { get; set; }

Property Value

int

MaxSubmits

Gets or sets the maximum number of submits for the form. Zero means no limit.

public int MaxSubmits { get; set; }

Property Value

int

Name

Gets or sets the name of the form.

public string? Name { get; set; }

Property Value

string

Methods

GetSubmits()

Retrieves the submits already made to the form.

public IEnumerable<FormSubmitViewModel> GetSubmits()

Returns

IEnumerable<FormSubmitViewModel>

The collection of form submits.

To top