Table of Contents

Class FormFieldService

Namespace
Dynamicweb.Forms
Assembly
Dynamicweb.Forms.dll
public abstract class FormFieldService
Inheritance
FormFieldService
Derived
Inherited Members

Methods

Copy(Field, int, bool)

Copies the specified field to a destination form identifier.

public virtual void Copy(Field field, int destinationFormId, bool keepFieldName)

Parameters

field Field

The field to copy.

destinationFormId int

To form identifier.

keepFieldName bool

if set to true [keep name].

Delete(Field)

Deletes the specified field.

public virtual void Delete(Field field)

Parameters

field Field

The field to delete.

Delete(IEnumerable<int>)

Deletes the fields matching the specified IDs.

public virtual void Delete(IEnumerable<int> fieldIds)

Parameters

fieldIds IEnumerable<int>

The IDs of the fields to delete.

Delete(int)

Deletes the field matching the specified ID.

public virtual void Delete(int fieldId)

Parameters

fieldId int

The ID of the field to delete.

GetAll()

Get the all fields.

public virtual IEnumerable<Field> GetAll()

Returns

IEnumerable<Field>

GetById(int)

Get a form field by ID.

public virtual Field GetById(int fieldId)

Parameters

fieldId int

The ID of the form field.

Returns

Field

GetFormFields(Form)

Get fields for a given form.

public virtual IEnumerable<Field> GetFormFields(Form form)

Parameters

form Form

The form.

Returns

IEnumerable<Field>

GetFormFields(int)

Get fields for the form with the specified ID.

public virtual IEnumerable<Field> GetFormFields(int formId)

Parameters

formId int

The ID of the form.

Returns

IEnumerable<Field>

MoveFieldsUp(int, int)

Moves the fields up.

public virtual void MoveFieldsUp(int formId, int fromSort)

Parameters

formId int

The form identifier.

fromSort int

From sort.

Save(Field)

Saves the specified field.

public virtual void Save(Field field)

Parameters

field Field

The field to save.

SortDown(Field)

Sorts the field down.

public virtual void SortDown(Field field)

Parameters

field Field

The field to sort down.

SortOptions(Field, bool, Func<Option, string>)

Sorts the options of the field by the given method.

public virtual void SortOptions(Field field, bool descending, Func<Option, string> methodDelegate)

Parameters

field Field

The field.

descending bool

Provide true if sorting should be descending, otherwise it will be sorted ascending.

methodDelegate Func<Option, string>

The method selector to indicate what property it should sort by.

SortOptions(int, bool, Func<Option, string>)

Sorts the options of the field by the given method.

public virtual void SortOptions(int fieldId, bool descending, Func<Option, string> methodDelegate)

Parameters

fieldId int

The field identifier.

descending bool

Provide true if sorting should be descending, otherwise it will be sorted ascending.

methodDelegate Func<Option, string>

The method selector to indicate what property it should sort by.

SortUp(Field)

Sorts the field up.

public virtual void SortUp(Field field)

Parameters

field Field

The field to sort up.

ToggleActive(int)

Toggles the active.

public virtual void ToggleActive(int fieldId)

Parameters

fieldId int

The field identifier.

ToggleRequired(int)

Toggles the required.

public virtual void ToggleRequired(int fieldId)

Parameters

fieldId int

The field identifier.

To top