# AppControls

AppControls are a feature introduced in UDiTH Version 7.0. They allow regular users, power users, and administrators to extend the functionality of UDiTH. AppControls run inside an embedded browser within UDiTH, allowing them to present their own user interface directly in the application. Communication with UDiTH takes place through an API.

## Using AppControls

AppControls can be stored in the **Files** tab.

1. To create a new **AppControl**, use **Add** to add a new AppControl element in the **Files** tab.

<img src="./media/FilesAddAppControls.png" width="250" height="">

2. Choose the input source. You can provide either a URL or an offline AppControl from your files.

<img src="./media/AppControlURL.png" width="300">

3. Once it has been saved, you can open it by double-clicking it or by clicking the eye icon next to it.

4. The **AppControl** then opens in a separate window.

## Understanding AppControls

AppControls are designed to handle tasks that are not covered by standard user interface components. These customised forms can be used for data entry, information display, preference settings, and more.

They can also be tailored to match your application's specific user interface, requirements, branding, and interaction style.

## When to Use AppControls

AppControls are particularly suitable in the following scenarios:

1. **Specific Functionality:** Your application requires a user interface element that cannot be achieved with standard controls, such as complex data visualization, custom input validation, or specialized data manipulation.

2. **Branding and Aesthetics:** You want to create a consistent and unique look and feel for your application, aligning with your brand identity or user experience goals.

3. **Usability and User Experience:** Custom forms can be designed to enhance the user experience by simplifying complex tasks or streamlining workflows.

## Offline AppControls

UDiTH allows you to embed AppControls directly within the UDiTH tree. This removes the need for a separate web service to access the AppControls. However, certain restrictions still apply.

## Implementing AppControls

For guidance on creating AppControls, please visit the https://github.com/caxperts/AppControls repo, which contains samples and instructions.

## Security

An allowlist is used to ensure that only the AppControls included in that list can be displayed and access the model. This list is stored in a file named `appcontrols.json`, located in the model's `Data` folder. For more information, please visit the [AppControls security documentation](https://github.com/caxperts/AppControls/blob/main/wiki/Security.md).
