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