Skip to main content

Field hierarchy in the Web Forms for Marketers module

Abstract

Knowing the field hierarchy in the module to create your own control.

If the predefined controls do not meet your specific needs, you can create your own control, for example, to modify the behavior or special UI elements of a form.

There are two types of fields in the Web Forms for Marketers module:

  • User control fields – They inherit the System.Web.UI.UserControl class. You can use the markup of these fields in a separate .ascx file. You can change the appearance of these fields without recompiling assemblies.

  • Web control fields – They inherit the System.Web.UI.WebControls.WebControl class. Usually, these fields have a simple structure that does not require any modifications after compiling the assemblies. These types of fields are easier to reuse.

In the Sitecore.Form.UI.UserControls namespace, the following fields inherit the UserControl class.

  • Captcha

  • CreditCard

  • PasswordConfirmation

The following diagram shows the inheritance chart for user controls.

291145A1519749FCA06CBDBB44AA04CF.png

The following list of web control fields are stored in the Sitecore.Form.Web.UI.Controls namespace:

  • Checkbox

  • CheckboxList

  • DatePicker

  • DateSelector

  • DropList

  • Email

  • Label

  • List

  • MultipleLineText

  • Number

  • Password

  • RadioList

  • SingleLineText

  • SmsTelephone

  • Telephone

  • UploadFile

The following class diagram shows the inheritance chart for web controls.

E6A522DD04684FDD8FE425C18A1D7C7D.png