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
FieldThe field to copy.
destinationFormId
intTo form identifier.
keepFieldName
boolif set to
true
[keep name].
Delete(Field)
Deletes the specified field.
public override void Delete(Field field)
Parameters
field
FieldThe 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
intThe ID of the field to delete.
GetAll()
Get the all fields.
public override IEnumerable<Field> GetAll()
Returns
GetById(int)
Get a form field by ID.
public override Field GetById(int fieldId)
Parameters
fieldId
intThe ID of the form field.
Returns
GetFormFields(Form)
Get fields for a given form.
public override IEnumerable<Field> GetFormFields(Form form)
Parameters
form
FormThe form.
Returns
GetFormFields(int)
Get fields for the form with the specified ID.
public override IEnumerable<Field> GetFormFields(int formId)
Parameters
formId
intThe ID of the form.
Returns
MoveFieldsUp(int, int)
Moves the fields up.
public override void MoveFieldsUp(int formId, int fromSort)
Parameters
Save(Field)
Saves the specified field.
public override void Save(Field field)
Parameters
field
FieldThe field to save.
SortDown(Field)
Sorts the field down.
public override void SortDown(Field field)
Parameters
field
FieldThe 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
FieldThe field.
descending
boolProvide
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
intThe field identifier.
descending
boolProvide
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
FieldThe field to sort up.
ToggleActive(int)
Toggles the active.
public override void ToggleActive(int fieldId)
Parameters
fieldId
intThe field identifier.
ToggleRequired(int)
Toggles the required.
public override void ToggleRequired(int fieldId)
Parameters
fieldId
intThe field identifier.