Table of Contents

Class DefaultFormFieldService

Namespace
Dynamicweb.Forms.Internal
Assembly
Dynamicweb.Forms.dll
public sealed class DefaultFormFieldService : FormFieldService
Inheritance
DefaultFormFieldService
Inherited Members

Constructors

DefaultFormFieldService()

public DefaultFormFieldService()

Methods

Copy(Field, int, bool)

Copies the specified field to a destination form identifier.

public override 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 override void Delete(Field field)

Parameters

field Field

The field to delete.

Delete(IEnumerable<int>)

Deletes the fields matching the specified IDs.

public override 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 override void Delete(int fieldId)

Parameters

fieldId int

The ID of the field to delete.

GetAll()

Get the all fields.

public override IEnumerable<Field> GetAll()

Returns

IEnumerable<Field>

GetById(int)

Get a form field by ID.

public override Field GetById(int fieldId)

Parameters

fieldId int

The ID of the form field.

Returns

Field

GetFormFields(Form)

Get fields for a given form.

public override 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 override IEnumerable<Field> GetFormFields(int formId)

Parameters

formId int

The ID of the form.

Returns

IEnumerable<Field>

MoveFieldsUp(int, int)

Moves the fields up.

public override void MoveFieldsUp(int formId, int fromSort)

Parameters

formId int

The form identifier.

fromSort int

From sort.

Save(Field)

Saves the specified field.

public override void Save(Field field)

Parameters

field Field

The field to save.

SortDown(Field)

Sorts the field down.

public override 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 override 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 override 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 override void SortUp(Field field)

Parameters

field Field

The field to sort up.

ToggleActive(int)

Toggles the active.

public override void ToggleActive(int fieldId)

Parameters

fieldId int

The field identifier.

ToggleRequired(int)

Toggles the required.

public override void ToggleRequired(int fieldId)

Parameters

fieldId int

The field identifier.

To top