---
title: Forms configuration
related:
  - https://docs.kentico.com/documentation/business-users/digital-marketing/forms.md
  - https://docs.kentico.com/documentation/developers-and-admins/configuration/users/role-management/workspaces.md
---

> **Documentation indexes**
> The indexes below list current page URLs with titles and descriptions. Links on this page point to the Markdown versions of the linked pages.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

[Forms](https://docs.kentico.com/documentation/business-users/digital-marketing/forms.md) allow marketers to collect data from website visitors. This page covers forms configuration options you can use to customize your project.

## Set the default visibility of featured fields

[Featured fields](https://docs.kentico.com/documentation/business-users/digital-marketing/forms/create-and-edit-forms.md#add-fields) are preconfigured fields that editors can add to a form in the [Form Builder](https://docs.kentico.com/documentation/developers-and-admins/development/builders/form-builder.md), for example, _First name_ or _Email_.

By default, the visibility of featured fields in a new workspace is determined by the _system-wide settings_. Editors can then [override the settings for a workspace](https://docs.kentico.com/documentation/business-users/digital-marketing/forms/create-and-edit-forms.md#hide-featured-fields) in the administration UI and adjust the visible fields for that workspace.

The default system-wide settings make all featured fields visible, but you can change the system-wide settings in your project's code. This can be useful if some of the fields are not relevant for your project.

To change which featured fields are visible by default:

1. Open your Xperience project and edit the **Program.cs** file.

2. Call the `Configure<FormFeaturedFieldsOptions>` method of the `IServiceCollection` and call the `UpdateField` method of the options for each featured field you want to change.

   ```csharp
   using CMS.OnlineForms;

   ...

   var builder = WebApplication.CreateBuilder(args);

   builder.Services.Configure<FormFeaturedFieldsOptions>(options =>
   {
       // Hides the Job title and Business phone featured fields by default
       options.UpdateField(PredefinedFormFeaturedField.JOB_TITLE, false);
       options.UpdateField(PredefinedFormFeaturedField.BUSINESS_PHONE, false);
   });
   ```

3. Restart the application. The system reads the options when it starts, so changes take effect only after a restart.

The `UpdateField` method accepts the following parameters:

- `fieldName` – the code name of the featured field (see list below).
- `enabled` – set to `false` to hide the featured field by default. All featured fields are visible by default unless they are hidden by this configuration.

The `PredefinedFormFeaturedField` class provides the code names of the predefined featured fields:

| Featured field    | Constant            | Code name                           |
| ----------------- | ------------------- | ----------------------------------- |
| First name        | `FIRST_NAME`        | `Kentico.Featured.FirstName`        |
| Last name         | `LAST_NAME`         | `Kentico.Featured.LastName`         |
| Job title         | `JOB_TITLE`         | `Kentico.Featured.JobTitle`         |
| Company           | `COMPANY_NAME`      | `Kentico.Featured.CompanyName`      |
| Business phone    | `BUSINESS_PHONE`    | `Kentico.Featured.BusinessPhone`    |
| Email             | `EMAIL`             | `Kentico.Featured.Email`            |
| Leave a message   | `LEAVE_A_MESSAGE`   | `Kentico.Featured.LeaveAMessage`    |
| Consent agreement | `CONSENT_AGREEMENT` | `Kentico.Featured.ConsentAgreement` |

> **Note:** **Workspaces and the system-wide settings**
>
> The system-wide settings apply only to workspaces that don't use their own settings. A workspace that has [customization enabled](https://docs.kentico.com/documentation/business-users/digital-marketing/forms/create-and-edit-forms.md#hide-featured-fields) ignores changes to the system-wide settings until an editor selects **Reset to system-wide**.

> **Note:** **CI/CD and featured field settings**
>
> CI/CD doesn't serialize the system-wide settings. They are part of your project's code and are deployed together with your application. The settings of workspaces with customization enabled are stored in the database and serialized as bindings (see [Reference - CI/CD object types](https://docs.kentico.com/documentation/developers-and-admins/ci-cd/reference-ci-cd-object-types.md)).
>
> Resetting a workspace to the system-wide settings deletes its stored settings. [Continuous Deployment](https://docs.kentico.com/documentation/developers-and-admins/ci-cd/configure-ci-cd-repositories.md#configure-cd-restore-mode) applies deletions on the target instance only in the `Full` restore mode.
