# Register a new widget in the backend

In addition to the standard widgets, you can use your own widgets. Before you can use them, you must register them in the widget toolbox in Sitefinity’s backend.

You can register a widget through Sitefinity’s advanced settings UI or through Sitefinity’s configuration file.

## Register a new widget in the backend

To register a widget using Sitefinity CMS backend:

1. Click *Administration* » *Settings » Advanced*.\
   The *Advanced* *Settings* page appears.
2. In the tree view on the left, click *Toolboxes* » *Toolboxes*.
3. Depending on what kind of widget you want to add, choose one of the following:

    <table>
    <tbody>
    <tr>
    <td>

   <strong>Type of widget</strong>

    </td>
    <td>

   <strong>Procedure</strong>

    </td>
    </tr>
    <tr>
    <td>

   Page widgets<br>
   These are widgets displayed in page editing mode.

    </td>
    <td>

   Click <em>PageControls</em> » <em>Sections</em>.<ol>

    <li>In the tree view on the left, click the section where you want to add your widget.</li>
    <li>Click <em>Tools</em>.<br>
    A list of all widgets in the this section is displayed. </li>
    <li>Click <em>Create new</em> button.</li>
    </ol>
    <p>You can create a new section or add the widget to an existing one. To create a new section and add the widget to the section:</p><ol>
    <li>Above the list of all sections, click <em>Create new</em> button.</li>
    <li>Fill out the <em>Sections</em> form and click <em>Save changes</em>.<br>
    For more information about the fields in the form, see the field descriptions below each field. </li>
    <li>Click the section you have created.</li>
    <li> Click <em>Tools</em> &raquo; <em>Create new</em>. </li>
    </ol>
    <p>The widget registration form is displayed.</p>

    </td>
    </tr>
    <tr>
    <td>

   Form widgets<br>
   These are widgets displayed when you create a form with the <em>Forms</em> module.

    </td>
    <td>

    <ol>
    <li>Click <em>FormControls</em> &raquo; <em>Sections</em> &raquo; <em>Common</em> &raquo; <em>Tools</em>.<br>
    A list with all form widgets is displayed. </li>
    <li>Click <em>Create new</em> button.<br>
    The widget registration form is displayed.</li>
    </ol>

    </td>
    </tr>
    </tbody>
    </table>
4. Fill out the *Tools* form:
   1. In *Control CLR type or virtual path*, enter one of the following:
      * When registering a custom widget built into an assembly, enter the fully qualified type name of the widget.\
        For example: `SitefinityWebApp.MyFolder.MyCustomWidget, SitefinityWebApp`
      * When registering a user widget, enter the virtual URL of the user widget\
        For example: `~/MyFolder/MyUserWidget.ascx`
   2. In *Name*, enter a developer name for the widget.\
      You can use it to access the widget using the API later.
   3. For *Title*, enter the title that will appear in the toolbox.

      > info **NOTE**: Make sure you enable your widget to be displayed in the frontend. For more information, see [Enable and disable a widget](https://www.progress.com/documentation/sitefinity-cms/administration-enable-and-disable-a-widget-webforms).
5. When finished, click *Save changes*.\
   The widget is registered in the toolbox and can be used in Sitefinity.

For more information about creating widgets, see [Create a new custom widget](https://www.progress.com/documentation/sitefinity-cms/web-forms-deprecation-with-sitefinity-cms-14.1).

## Register a widget through the configuration file

When you use the advanced settings in Sitefinity CMS backend, the settings are persisted in the configuration. By default, these are stored as physical files in folder `~/App_Data/Sitefinity/Configuration` of your web project.

Instead of using the UI to register a widget, you can edit the configuration files. The toolbox configurations have their own separate file, named `ToolboxesConfig.config`.

Perform the following:

1. To register a new widget, open the `ToolboxesConfig.config` file.
2. Find the section you want to use or create a new section under the `<sections>` element.
3. Depending on the type of widget, register it using the appropriate code pattern:

   ```XML
   
   <add enabled="True" type="~/MyControls/MyUserControl.ascx" title="My User Control" visibilityMode="None" name="MyUserControl" />
   
   <add enabled="True" type="MyAssembly.MyNamespace.MyCustomWidget, MyAssembly" title="My custom widget" description="A sample custom control"name="MyCustomControl" visibilityMode="None" />
   ```
4. Save the file and restart the application.
