Class FormBuilder
Inheritance
Namespace: Syncfusion.EJ2.FormBuilder
Assembly: Syncfusion.AspNetCore.FormBuilder.dll
Syntax
public class FormBuilder : EJTagHelper
Constructors
FormBuilder()
Declaration
public FormBuilder()
Properties
AllowExport
Enables or disables the export functionality of the Form Builder. When enabled, users can export the form schema as JSON.
Declaration
public bool AllowExport { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is true |
ContentTemplate
To get or set value for ContentTemplate.
Declaration
public MvcTemplate<object> ContentTemplate { get; set; }
Property Value
| Type |
|---|
| Syncfusion.EJ2.MvcTemplate<System.Object> |
EnablePersistence
Enables or disables persistence of the Form Builder state. When enabled, the builder state and form schema are persisted across sessions.
Declaration
public bool EnablePersistence { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is false |
EnablePreview
Enables or disables the preview mode of the Form Builder. When enabled, users can preview how the form will appear to end users.
Declaration
public bool EnablePreview { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is true |
EnableRtl
Enables or disables right-to-left (RTL) text direction rendering. Use this for languages and locales that require RTL text direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is false |
FormTemplates
Specifies custom form templates for rendering components in the builder. Allows default templates to be overridden with custom HTML and styling.
Declaration
public object FormTemplates { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | The default value is null |
HtmlAttributes
Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.
Declaration
public object HtmlAttributes { get; set; }
Property Value
| Type |
|---|
| System.Object |
Locale
Specifies the locale for the Form Builder. Supports culture-specific localization for different languages and regions.
Declaration
public string Locale { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "en-US" |
Mode
Specifies the current builder mode, which determines the interface complexity and available features. 'Simple' mode provides a simplified interface for basic form creation. 'Developer' mode provides advanced features and full control over the form schema.
Declaration
public string Mode { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "Developer" |
OnFieldDragOver
Event triggered while a drag operation is in progress over a valid drop target in the Form Builder. Useful for providing visual feedback during drag operations.
Declaration
public string OnFieldDragOver { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is null |
OnFieldDragStarted
Event triggered when a drag operation starts on a form field in the Form Builder. Provides information about the field being dragged and its drag context.
Declaration
public string OnFieldDragStarted { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is null |
OnFieldDropped
Event triggered when a form field is successfully dropped onto a target in the Form Builder. Provides information about the dropped field and its new position.
Declaration
public string OnFieldDropped { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is null |
OnFieldPropertyChanged
Event triggered when a property of a form field is successfully changed in the Form Builder. Provides information about the changed property and the affected field.
Declaration
public string OnFieldPropertyChanged { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is null |
Schema
Specifies the form schema to be loaded and edited in the Form Builder. It can be provided as a JSON string, an object, or a Schema interface instance.
Declaration
public object Schema { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | The default value is null |
ToolboxCategories
Specifies custom toolbox configuration for the Form Builder component palette. Allows customizing which components are available and how they are organized.
Declaration
public object ToolboxCategories { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | The default value is null |
ToolboxItems
Specifies the collection of toolbox items shown in the Form Builder component toolbox. Each item defines a component that can be dragged onto the form canvas. Use this property to customize the toolbox items and render custom components using templates.
Declaration
public List<ToolboxItemSetting> ToolboxItems { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<ToolboxItemSetting> | The default value is null |