Table of Contents

Class FormBuilderTab

Namespace
Kentico.Xperience.Admin.DigitalMarketing.UIPages
Assembly
Kentico.Xperience.Admin.DigitalMarketing.dll

Page for the form builder.

public sealed class FormBuilderTab : Page<FormBuilderTabClientProperties>, IPage
Inheritance
object
FormBuilderTab
Implements
Inherited Members
Extension Methods

Constructors

FormBuilderTab(ISectionDefinitionProvider, IFormComponentDefinitionProvider, IFormItemCollectionProvider, IFormComponentCommandInvoker, IFormDataBinder, IHttpContextAccessor, IAuthenticatedUserAccessor, IContactMappingFieldsProvider, IUIPermissionEvaluator)

Initializes an instance of the FormBuilderTab class.

public FormBuilderTab(ISectionDefinitionProvider sectionDefinitionProvider, IFormComponentDefinitionProvider formComponentDefinitionProvider, IFormItemCollectionProvider formItemCollectionProvider, IFormComponentCommandInvoker formComponentCommandInvoker, IFormDataBinder formDataBinder, IHttpContextAccessor httpContextAccessor, IAuthenticatedUserAccessor authenticatedUserAccessor, IContactMappingFieldsProvider contactMappingOptionsProvider, IUIPermissionEvaluator permissionEvaluator)

Parameters

sectionDefinitionProvider ISectionDefinitionProvider

Provider for retrieval of registered section definitions for Form Builder.

formComponentDefinitionProvider IFormComponentDefinitionProvider

Provider for retrieval of registered component definitions for Form Builder.

formItemCollectionProvider IFormItemCollectionProvider

Provider that retrieves collection of form items based on a model object.

formComponentCommandInvoker IFormComponentCommandInvoker

Form component command invoker.

formDataBinder IFormDataBinder

Form data binder.

httpContextAccessor IHttpContextAccessor

HTTP context accessor to obtain request service provider from.

authenticatedUserAccessor IAuthenticatedUserAccessor

Currently logged in user accessor.

contactMappingOptionsProvider IContactMappingFieldsProvider

Provider for contact fields that can be used for mapping.

permissionEvaluator IUIPermissionEvaluator

UI permission evaluator.

Properties

ObjectId

ID of the edited form.

[PageParameter(typeof(IntPageModelBinder))]
public int ObjectId { get; set; }

Property Value

int

Methods

ComponentCommand(FormComponentCommandModel, CancellationToken)

Handles the form component command invocation.

public Task<object> ComponentCommand(FormComponentCommandModel commandModel, CancellationToken cancellationToken)

Parameters

commandModel FormComponentCommandModel

Form component command arguments.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task<object>

Returns the form component command result.

ConfigureTemplateProperties(FormBuilderTabClientProperties)

Gets the object representing client side template properties.

public override Task<FormBuilderTabClientProperties> ConfigureTemplateProperties(FormBuilderTabClientProperties properties)

Parameters

properties FormBuilderTabClientProperties

Initialized properties object.

Returns

Task<FormBuilderTabClientProperties>

GetFormItems(ComponentPropertiesGetFormItemsCommandArgs)

Returns a collection of editing form items for given component specified by Identifier property of arguments to feed the Form.tsx with them.

public Task<ICommandResponse<IEnumerable<IFormItemClientProperties>>> GetFormItems(ComponentPropertiesGetFormItemsCommandArgs arguments)

Parameters

arguments ComponentPropertiesGetFormItemsCommandArgs

Returns

Task<ICommandResponse<IEnumerable<IFormItemClientProperties>>>

SaveMapping(ComponentSaveMappingCommandArg)

Saves mapping options.

public Task SaveMapping(ComponentSaveMappingCommandArg arguments)

Parameters

arguments ComponentSaveMappingCommandArg

Returns

Task

ValidateComponents(ComponentPropertiesFormSubmissionCommandArgs)

Validates values of incoming collection of editing form components and returns a collection of updated form components and a flag if validation succeeded.

public Task<ICommandResponse<ComponentPropertiesFormSubmissionCommandResult>> ValidateComponents(ComponentPropertiesFormSubmissionCommandArgs arguments)

Parameters

arguments ComponentPropertiesFormSubmissionCommandArgs

Returns

Task<ICommandResponse<ComponentPropertiesFormSubmissionCommandResult>>

ValidatePage()

Validates the page state prior invocation of the ConfigurePage() method.

public override Task<PageValidationResult> ValidatePage()

Returns

Task<PageValidationResult>

ValidateSaveFormBuilderPermissions()

Checks permissions for form builder save actions.

public Task<bool> ValidateSaveFormBuilderPermissions()

Returns

Task<bool>

Remarks

Returns true if the user has permissions to perform save action in form builder. Otherwise this command will not execute and access denied message will be shown.