---
url: https://gudhub.com/docs/ssr-ssg/website/configs/form-config/
title: "Form Config\n                #"
description: "The formConfig is an array of objects defining the settings and structure for various forms. Each form configuration specifies details such as the form's conten"
lang: uk
updated: 2026-09-11T14:07:42.715Z
---

# Form Config [#](https://gudhub.com/docs/ssr-ssg/website/configs/form-config/#form-config)

The `formConfig` is an array of objects defining the settings and structure for various forms. Each form configuration specifies details such as the form's content, behavior, input fields, and email integration.

## Structure of a Form Configuration [#](https://gudhub.com/docs/ssr-ssg/website/configs/form-config/#structure-of-a-form-configuration)

Each form object in the array contains the following fields:

### **General Properties** [#](https://gudhub.com/docs/ssr-ssg/website/configs/form-config/#general-properties)

| **Property Name** | **Type** | **Description** |
| :-- | :-- | :-- |
| `id` | `string` | Unique identifier for the form. |
| `langCode` | `string` | Language code for the form (e.g., 'uk' for Ukrainian). |
| `defaultLang` | `boolean` | Indicates whether this is the default language for the form. |
| `title` | `string` | Title of the form, supports HTML tags for formatting (e.g., `<p>` for highlighting text). |
| `subtitle` | `string` | Subtitle or description of the form. |
| `button_text` | `string` | Text displayed on the form submission button. |
| `titleSuccess` | `string` | Title displayed upon successful submission. |
| `subtitleSuccess` | `string` | Subtitle or description displayed upon successful submission. |
| `titleFail` | `string` | Title displayed when submission fails. |

---

### **Email Configuration** [#](https://gudhub.com/docs/ssr-ssg/website/configs/form-config/#email-configuration)

| **Property Name** | **Type** | **Description** |
| :-- | :-- | :-- |
| `to` | `string` | Email address to which the form data will be sent. |
| `from` | `string` | Sender's email address. |
| `subject` | `string` | Subject of the email sent from the form. |

---

### **Inputs** [#](https://gudhub.com/docs/ssr-ssg/website/configs/form-config/#inputs)

An array of input fields, each defined with the following properties:

| **Property Name** | **Type** | **Description** |
| :-- | :-- | :-- |
| `name` | `string` | Name attribute for the input field. |
| `type` | `string` | Input type (e.g., 'short', 'email', 'phone', 'textarea'). |
| `required` | `string` | Indicates whether the field is mandatory ("true" or "false"). |
| `placeholder` | `string` | Placeholder text displayed inside the input field. |
| `errorText` | `string` | Error message displayed for invalid input. |
| `width` | `number` | Width of the input field (relative to a 12-column grid). |

Copy

```javascript
export const formConfig = [
    {
        id: "string",
        langCode: "string",
        defaultLang: boolean,
        title: "string",
        subtitle: "string",
        button_text: "string",
        titleSuccess: "string",
        subtitleSuccess: "string",
        titleFail: "string",
        mailConfig: {
            to: "string",
            from: "string",
            subject: "string"
        },
        inputs: [
            {
                name: "string",
                type: "string",
                required: "string",
                placeholder: "string",
                width: number
            },
        ]
    },
];
```
