Click or drag to resize
BasicForm Class
Basic form engine independent on CMS. It displays the specified form.
Inheritance Hierarchy

Namespace: CMS.FormEngine.Web.UI
Assembly: CMS.FormEngine.Web.UI (in CMS.FormEngine.Web.UI.dll) Version: 10.0.0
Syntax
C#
public class BasicForm : AbstractBasicForm, IFormStyleConfiguration

The BasicForm type exposes the following members.

Constructors
Fields
  NameDescription
Protected fieldcategoryListPanel
Category list panel, may be displayed above formPanel.
Protected fieldcategoryListPlaceholder
Placeholder for category list.
Protected fieldmShowPrivateFields
Nonpublic fields are shown if true.
Protected fieldmSubmitButton
Form submit button.
Protected fieldmSubmitImageButton
Form submit image button.
Top
Properties
  NameDescription
Public propertyAdditionalData
Gets a dictionary that provides additional context data for form controls.
Public propertyAllowEditVisibility
Indicates if field visibility could be edited.
Public propertyAllowExternalEditing
Indicates if external editing should be allowed for the controls.
Public propertyAllowMacroEditing
Determines whether to display the "Edit value" button in EditingFormControls.
Public propertyAllowModeSwitch
Determines whether to allow mode switching (simple <-> advanced).
Public propertyAllowSpellCheck
Indicates if spell check is allowed. Not allowed by default.
(Inherited from AbstractBasicForm.)
Public propertyAltFormInformation
Alternative form information.
Public propertyApplyVisibility
Indicates if field visibility should be applied.
Public propertyAssociatedControls
Controls associated with FormItems.
Public propertyAutomaticLabelWidth
Set width of all labels according to the widest label. This property is applied only if DefaultFormLayout is set to Divs.
Protected propertyClassInfo
DataClassInfo of edited object.
Public propertyCollapseCategoryImageUrl
Image URL for collapsing a category.
Public propertyContextResolver
Form context resolver.
Public propertyControlContext
Gets the current control context.
(Inherited from AbstractBasicForm.)
Public propertyCustomTimeZone
Gets or sets custom time zone info. This time zone is used when TimeZoneType is 'custom'.
(Inherited from AbstractBasicForm.)
Public propertyData
Data to be edited.
(Inherited from AbstractBasicForm.)
Public propertyDataRow
Data to be edited.
(Inherited from AbstractBasicForm.)
Public propertyDefaultCategoryName
Default category name.
Public propertyDefaultFieldLayout
Default field layout.
Public propertyDefaultFormLayout
Form layout.
Protected propertyDefaultValidationErrorMessage
Default validation error message. Shown when ValidationErrorMessage is not set manually.
Public propertyDialogParameters
Additional parameters for the dialog windows.
Public propertyDisplayContext
Gets or sets the current display context which is used if control contains DisplayIn value.
Public propertyEditedObject
Edited object. TreeNode in CMSForm, IDataClass in BizForm and CustomTableForm, AbstractInfo or DataClassInfo in DataForm.
Public propertyEnabled
Indicates if the form control is enabled.
(Overrides WebControlEnabled.)
Public propertyEnsureFirstLetterUpperCase
If true, labels of the controls are processed to have the first letter upper case.
Public propertyErrorLabel
Label for the errors.
Public propertyExpandCategoryImageUrl
Image URL for expanding a category.
Public propertyExplanationTextCssClass
CSS class that is added to container that is wrapping content after text (only if content before text is empty). Default value is "ExplanationText".
Public propertyFieldActionsControls
Contains FieldActions controls if the form is in design mode (BasicForm.IsDesignMode property).
(Inherited from AbstractBasicForm.)
Public propertyFieldCaptionCellCssClass
CSS class for the individual field label cell.
Public propertyFieldCaptionCssClass
CSS class for the individual field label.
Public propertyFieldControls
Dictionary with FormEngineUserControl objects.
(Inherited from AbstractBasicForm.)
Public propertyFieldCssClass
CSS class for the whole field (usually row).
Public propertyFieldEditingControls
Dictionary with EditingFormControl objects.
(Inherited from AbstractBasicForm.)
Public propertyFieldErrorCellCssClass
CSS class for the individual field error label cell.
Public propertyFieldErrorCssClass
CSS class that is added to editing form control after its validation failed. Default value is "Error".
Public propertyFieldErrorLabelCssClass
CSS class for the individual field error label.
Public propertyFieldErrorLabels
FieldErrorLabels.
(Inherited from AbstractBasicForm.)
Public propertyFieldGroupCaptionCssClass
CSS class for the field group caption.
Public propertyFieldGroupCssClass
CSS class for the whole field group.
Public propertyFieldGroupHeadingIsAnchor
Gets or sets a value indicating whether heading for the field group caption is anchor.
Public propertyFieldGroupHeadingLevel
Heading level for the field group caption.
Public propertyFieldLabels
FieldLabels.
(Inherited from AbstractBasicForm.)
Public propertyFields
List of field names in order they appear in the form.
(Inherited from AbstractBasicForm.)
Public propertyFieldsToHide
List of fields to hide (empty by default).
Public propertyFieldUpdatePanels
Contains update panels which surround the fields (whole rows including labels) if the form is in design mode (BasicForm.IsDesignMode property).
(Inherited from AbstractBasicForm.)
Public propertyFieldValueCellCssClass
CSS class for the individual field control cell.
Public propertyFieldVisibilityCellCssClass
CSS class for the individual field visibility cell.
Public propertyFieldVisibilityControls
Visibility controls hashtable.
(Inherited from AbstractBasicForm.)
Public propertyFieldVisibilityCssClass
CSS class for the individual field visibility control.
Public propertyFirstField
First field element.
Public propertyForceReloadCategories
Forces categories to get to default collapsed state.
Public propertyFormButtonCssClass
CSS class for the form button.
Public propertyFormButtonPanel
Returns panel surrounding submit button if generated by automatic layouts, otherwise returns null.
Public propertyFormButtonPanelCssClass
CSS class for the form button panel.
Public propertyFormCssClass
CSS class which will be used to wrap form control.
Protected propertyFormDefaultStyle
Default form-specific style configuration.
Public propertyFormGUID
Identifies the instance of form.
Public propertyFormInformation
Form information.
(Overrides AbstractBasicFormFormInformation.)
Public propertyFormLayout
Definition of the form layout.
Public propertyFormLayoutType
Form layout type.
Public propertyFormPanel
Returns form outer panel.
Public propertyFormType
Indicates in what control is this basic form used.
Public propertyGroupCssClass
CSS class for the whole field group with heading.
Public propertyHideSystemFields
If true, system fields are hidden.
Public propertyHtmlAreaToolbar
HTML editor toolbar set name.
Public propertyHtmlAreaToolbarLocation
HTML editor toolbar location.
Public propertyCheckFieldEmptiness
Indicates that field should be checked on emptiness in validation step by BasicForm. Default TRUE. It is preferable to set to FALSE for controls with complex input such as filter form.
Public propertyInfoLabel
Information label.
Public propertyInitCompleted
If true, the initialization of the control has already completed and won't repeat. Set to true in your initialization code.
(Inherited from CMSDynamicWebControl.)
Protected propertyInitEarly
If true, the control initializes on BeforeInitComplete, otherwise on InitComplete event.
(Inherited from CMSDynamicWebControl.)
Public propertyIsDesignMode
Determines whether the form is in design mode.
Public propertyIsFirstLoad
Indicates if inner controls are loaded for the first time (the form may be initialized on a postback).
Public propertyIsInsertMode
Indicates if the control is used for inserting a new object.
(Inherited from AbstractBasicForm.)
Public propertyIsLiveSite
Indicates if control is used on live site.
(Inherited from CMSWebControl.)
Public propertyIsSimpleMode
Returns if the form is in simple or advanced mode. Depends on AllowModeSwitch property.
Public propertyLastField
Last field element.
Public propertyLayout
Layout of the form
Public propertyLayoutTemplate
Layout template, if set, the given layout is used.
Public propertyMacroTable
Hashtable with IsMacro flags.
Public propertyMarkRequiredFields
If true, required field labels are marked with resource string.
Public propertyMessagesPlaceHolder
Messages placeholder
Public propertyMode
Gets or sets the mode of the form.
(Inherited from AbstractBasicForm.)
Public propertyParentObject
Parent object. Setup in CMSFrom in insert mode, contains TreeNode.
Public propertyProcessDisabledFields
Indicates if disabled fields should be processed (validated and saved). Default value is true in insert mode and false in edit mode.
(Inherited from AbstractBasicForm.)
Public propertyRedirectUrlAfterSave
URL to which the form redirects after successful save.
Public propertyResolverName
Gets or sets macro resolver name.
Public propertySetDefaultValuesToDisabledFields
If true, default values will be set to the disabled fields. Default value is true in insert mode and false in edit mode.
Public propertyShortID
Short ID of the control.
(Inherited from CMSWebControl.)
Public propertyShowImageButton
Show image button flag.
Public propertyShowPrivateFields
Indicates whether to show private fields or not.
Public propertyShowValidationErrorMessage
Indicates if error message should be displayed after validation failed.
Public propertySiteName
Current SiteName.
Public propertySpellCheckFields
List with client Ids of fields that should be spell checked.
(Inherited from AbstractBasicForm.)
Public propertyStopProcessing
Indicates if processing of the code of this control should continue. It can be used after raising an event.
(Inherited from CMSDynamicWebControl.)
Public propertySubmitButton
Form submit button.
Public propertySubmitImageButton
Form submit image button.
Protected propertyTagKey
Overrides the generation of the SPAN tag with custom tag.
(Overrides WebControlTagKey.)
Public propertyTimeZoneType
Gets or sets time zone type for child controls. Default value is TimeZoneTypeEnum.Inherit.
(Inherited from AbstractBasicForm.)
Public propertyUIContext
Control's UI Context
Public propertyUseColonBehindLabel
If true, colon(:) is placed behind field label.
Public propertyValidationErrorMessage
Optional error message displayed after validation failed.
Public propertyVisibilityFormName
This name is used if ApplyVisibility is 'true' to get visibility definition of current user.
Top
Methods
  NameDescription
Public methodAddConfirmation
Adds confirmation text to existing message on the page, optionally with a tooltip text.
Protected methodAddControlsAfterInternal
Internal method to add components after the form from inherited forms.
Protected methodAddControlsBeforeInternal
Internal method to add components before the form from inherited forms.
Public methodAddError
Adds error text to existing message on the page.
Public methodAddInformation
Adds information text to existing message on the page.
Public methodAddWarning
Adds warning text to existing message on the page.
Protected methodAfterSaveActionsInternal
Performs additional actions after save (redirecting or displaying info message).
Protected methodConnectAssociatedControls
Connects associated controls (labels and inputs) together, for accessibility and other reasons.
Protected methodCreateChildControls
Renders the control at run-time.
(Inherited from CMSDynamicWebControl.)
Protected methodCreateMessagesPlaceHolder
Creates local messages placeholder.
Public methodDisplayErrorLabel
Displays error label.
Protected methodEnsureInitialization
Initializes the control. Is called within InitComplete or
(Inherited from CMSDynamicWebControl.)
Protected methodEnsureLabels
Ensures the general labels on the form.
Public methodEnsureMessagesPlaceholder
Ensures correct set the messages placeholder.
Public methodStatic memberFormTypeEnumToString
Returns the string representation of the form type.
Public methodGetDataValue
Returns DataRow value for the specified column.
(Inherited from AbstractBasicForm.)
Public methodGetFieldValue
Gets the value of a specified field.
Public methodGetMultifieldValues
Gets the multi-field values of a specified field.
Public methodGetWhereCondition
Gets where condition from all form engine user controls.
Protected methodHandleFieldsValues
Initializes values for invisible fields.
Protected methodInitFormInternal
Internal method to initialize the form.
Protected methodInitializeControl
Initializes the form.
(Overrides CMSDynamicWebControlInitializeControl.)
Protected methodInitializeMainPanel
Initializes main form container.
Protected methodInitResolver
Initializes macro resolver data sources.
Protected methodInitSpellCheck
Initializes the spell checker.
(Inherited from AbstractBasicForm.)
Public methodIsAnyFieldVisible
Returns TRUE if basic form displays any control.
Public methodIsCategoryCollapsed
Returns true if the given category is collapsed
Public methodIsFieldAvailable
Checks if control is included in editing controls hashtable.
Public methodIsFieldVisible
Checks if the given field is evaluated as visible.
Public methodItemChanged
Checks if item has changed.
(Inherited from AbstractBasicForm.)
Protected methodlayout_OnAfterRegisterFormControl
Event after control has been registered in template layout.
Public methodLoadControlValues
Loads the values from the data container to the form controls.
(Inherited from AbstractBasicForm.)
Public methodLoadData(DataRow)
Renders form and sets field values.
Public methodLoadData(IDataContainer)
Renders form and sets field values.
Protected methodLoadDefaultLayout
Loads default layout.
Protected methodLoadFormLayout
Loads form layout.
Protected methodLoadLayout
Loads the form layout.
Protected methodLoadTemplateLayout
Loads the layout template.
Protected methodLoadViewState
Customized LoadViewState.
(Inherited from CMSDynamicWebControl.)
Protected methodOnInit
Init event handler.
(Inherited from CMSDynamicWebControl.)
Protected methodOnLoad
Load event handler.
(Inherited from CMSDynamicWebControl.)
Protected methodOnPreRender
Pre-render event handler.
(Overrides ControlOnPreRender(EventArgs).)
Protected methodPage_InitComplete
Event handler of page's init complete.
(Inherited from CMSDynamicWebControl.)
Public methodPrependError
Prepends error text to existing message on the page.
Protected methodProcessContextVisibility
Changes fields' visible attribute according to display context.
Protected methodProcessUserVisibility
Changes fields' visible attribute according to user visibility settings or changes form definition if visibility can be edited.
Protected methodProcessVisibility
Changes fields' visible attribute according to visibility.
Public methodRaiseOnAfterSave
Raises the OnAfterSave event.
Public methodRaiseOnBeforeRedirect
Raises the OnBeforeRedirect event.
Public methodRaiseOnDeleteFile
Raises the OnDeleteFile event.
Protected methodRaiseOnCheckPermissions
Invokes OnCheckPermissions event.
Public methodRaiseOnSaveFailed
Raises the OnSaveFailed event.
Public methodRaiseOnUploadFile
Raises the OnUploadFile event.
Public methodReloadData
Reloads the form data.
Protected methodRender
Renders the control at design-time.
(Overrides AbstractBasicFormRender(HtmlTextWriter).)
Public methodResolveMacros
Resolves the macros within current WebPart context.
Protected methodSaveControlValue
Saves the control value to the data.
(Inherited from AbstractBasicForm.)
Public methodSaveData
Saves data and optionally redirects user to specified URL.
Protected methodSaveDataClick
Saves form data into Data container after the submit button is clicked.
Protected methodSaveDataInternal
Internal method to save data to the database.
Protected methodSaveViewState
Customized SaveViewState.
(Inherited from CMSDynamicWebControl.)
Protected methodSetDataValue
Sets value of the given column in the data.
(Inherited from AbstractBasicForm.)
Public methodShowConfirmation
Shows the general changes saved message.
Public methodShowError
Shows the specified error message, optionally with a tooltip text.
Public methodShowChangesSaved
Shows the general changes saved message.
Public methodShowInformation
Shows the given information on the page, optionally with a tooltip text.
Public methodShowWarning
Shows the specified warning message, optionally with a tooltip text.
Public methodStatic memberStringToFormTypeEnum
Returns the enumeration representation of the form type.
Public methodValidateData
Validates the data, returns true if succeeded.
Top
Extension Methods
  NameDescription
Public Extension MethodAddCssClass
Adds CSS class to control. If class is already present, than adding is skipped. Class names are case sensitive.
(Defined by ControlsExtensions.)
Public Extension MethodCallHandled
Calls the method handled by the exception handler. If the call doesn't succeed, the problem is reported through parent IExceptionHandler control instead of throwing unhandled exception for the entire page. Returns true, if the call succeeded, otherwise returns false.
(Defined by ControlsExtensions.)
Public Extension MethodGetCssClasses
Returns all CSS classes of control.
(Defined by ControlsExtensions.)
Public Extension MethodGetRenderedHTML
Returns HTML which would be rendered by control to page.
(Defined by ControlsExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by ControlsExtensions.)
Public Extension MethodHasCssClass
Checks whether the control has given CSS class. Class names are case sensitive.
(Defined by ControlsExtensions.)
Public Extension MethodRemoveCssClass
Removes all occurrences. Class names are case sensitive.
(Defined by ControlsExtensions.)
Public Extension MethodSetCssClasses
Sets CSS classes to the control. Current classes will be overridden.
(Defined by ControlsExtensions.)
Top
Events
  NameDescription
Public eventOnAfterDataLoad
After data load event.
Public eventOnAfterSave
After form data save event. It is called during saving process when the form content is successfully saved.
Public eventOnAfterValidate
After validation event.
Public eventOnBeforeDataLoad
Before data load event.
Public eventOnBeforeDataRetrieval
Before form data retrieval event. It is called during saving process after successful validation and before data are retrieved from form controls.
Public eventOnBeforeRedirect
Before redirect event (after successful save).
Public eventOnBeforeSave
Before form data save event. It is called during saving process after data are retrieved from form controls and can be processed further (e.g. saved to DB).
Public eventOnBeforeValidate
Before validation event.
Public eventOnDeleteFile
Occurs when the file is deleted.
Public eventOnGetControlValue
Occurs when a value is being extracted from a form control.
(Inherited from AbstractBasicForm.)
Public eventOnCheckPermissions
Occurs when permission can be checked. It is called at the beginning of the saving process.
Public eventOnItemValidation
Occurs when a field is validated.
Public eventOnSaveFailed
Occurs when saving data to the database fails.
Public eventOnUploadFile
Occurs when the file is uploaded.
Public eventOnValidationFailed
Occurs when validation of the form fails.
Top
See Also
Inheritance Hierarchy
SystemObject
  System.Web.UIControl
    System.Web.UI.WebControlsWebControl
      CMS.Base.Web.UICMSWebControl
        CMS.Base.Web.UICMSDynamicWebControl
          CMS.FormEngine.Web.UIAbstractBasicForm
            CMS.FormEngine.Web.UIBasicForm
              CMS.DataCom.Web.UIDataComForm
              CMS.FormEngine.Web.UICMSForm
              CMS.FormEngine.Web.UICustomTableForm
              CMS.FormEngine.Web.UIDataForm
              CMS.FormEngine.Web.UIFilterForm
              CMS.OnlineForms.Web.UIBizForm
              CMS.PortalEngine.Web.UIUIForm