> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# AddControl

# Package: eventManagement

# Namespace: FormBuilder

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/form/add-control.md

## Permission Scopes:
Manage Events: SCOPE.DC-EVENTS.MANAGE-EVENTS

## Introduction

Adds an input control to the form. The applied changes trigger form publishing.

The change is published immediately and is visible to site visitors. You don't need to call Publish Draft.

---

## REST API

### Schema

```
 Method: addControl
 Description: Adds an input control to the form. The applied changes trigger form publishing.  The change is published immediately and is visible to site visitors. You don't need to call Publish Draft.
 URL: https://www.wixapis.com/events/v1/events/{eventId}/form/control
 Method: POST
 Method parameters:
    - ONE-OF: 
     - name: phone | type: PhoneControl | description: Phone number input control.  
        - name: label | type: string | description: Phone input label.  | validation: maxLength 100
        - name: mandatory | type: boolean | description: Whether the phone input is required.  
     - name: address | type: AddressControl | description: Single-line or full address input control.  
        - name: labels | type: Labels | description: Address control labels for each input.  
           - name: addressLine | type: string | description: Single-line address input label.  | validation: maxLength 100
           - name: country | type: string | description: Country input label.  | validation: maxLength 100
           - name: subdivision | type: string | description: Subdivision input label.  | validation: maxLength 100
           - name: city | type: string | description: City input label.  | validation: maxLength 100
           - name: postalCode | type: string | description: Postal code input label.  | validation: maxLength 100
           - name: streetAddress | type: string | description: Street address input label.  | validation: maxLength 100
        - name: full | type: boolean | description: Whether an address is multi-line (consisting of multiple fields such as country, city, postal code). When `false`, address is single-line.  
        - name: mandatory | type: boolean | description: Whether the address input is required.  
     - name: date | type: DateControl | description: Day, month, year date input control.  
        - name: label | type: string | description: Input control label.  | validation: maxLength 100
        - name: mandatory | type: boolean | description: Whether the date input is required.  
     - name: additionalGuests | type: AdditionalGuestsControl | description: Additional guests input control.  
        - name: labels | type: Labels | description: Additional guests control labels for each input.  
           - name: single | type: string | description: Input label for a single guest.  | validation: maxLength 200
           - name: multiple | type: string | description: Input label for multiple guests.  | validation: maxLength 200
        - name: namesMandatory | type: boolean | description: Whether the individual guest names are required.  
        - name: maxGuests | type: integer | description: Maximum number of additional guests.  | validation: minimum 1, maximum 10
     - name: dropdown | type: DropdownControl | description: Single-choice dropdown style input control.  
        - name: label | type: string | description: Input control label.  | validation: maxLength 200
        - name: options | type: array<string> | description: Predefined options guests can choose from.  | validation: minItems 2, maxItems 200, maxLength 200
        - name: mandatory | type: boolean | description: Whether a choice is required.  
        - name: defaultOptionSelection | type: OptionSelection | description: Default option initially selected when an input has multiple choices.  Defaults to first (0th) option, if not configured.  
           - ONE-OF: 
              - name: optionIndex | type: integer | description: 0-based index from predefined `controls.inputs.options` which is initial selection.  | validation: minimum 0, maximum 199
              - name: placeholderText | type: string | description: Placeholder hint describing expected choices, such as "Please select". Considered an empty choice.  | validation: maxLength 200
     - name: checkbox | type: CheckboxControl | description: Multiple-choice checkbox style input control.  
        - name: label | type: string | description: Input control label.  | validation: maxLength 200
        - name: mandatory | type: boolean | description: Whether at least one checkbox is required.  
        - name: options | type: array<string> | description: Predefined options guests can choose from.  | validation: minItems 1, maxItems 200, maxLength 200
     - name: text | type: TextControl | description: Free-form text input control.  
        - name: label | type: string | description: Input control label.  | validation: maxLength 200
        - name: mandatory | type: boolean | description: Whether a text input is required.  
        - name: maxLength | type: integer | description: Maximum number of characters allowed.  | validation: minimum 0, maximum 1000
        - name: multiLine | type: boolean | description: Whether the input control should allow multiple lines in text.  
        - name: comment | type: boolean | description: Whether the input control should be displayed as a comment.  
     - name: radioButton | type: RadioButtonControl | description: Single-choice radio button style input control.  
        - name: label | type: string | description: Input control label.  | validation: maxLength 200
        - name: options | type: array<string> | description: Predefined options guests can choose from.  | validation: minItems 2, maxItems 200, maxLength 200
 Return type: AddControlResponse
  - name: id | type: string | description: Generated unique input control GUID.  
  - name: form | type: Form | description: Modified event form.  
     - name: controls | type: array<InputControl> | description: Nested fields as an ordered list.  
        - name: type | type: InputControlType | description: Field control type.  
             - enum:
             -     INPUT: Single text value field.
             -     TEXTAREA: Single text value field with multiple lines.
             -     DROPDOWN: Single-choice field with predefined values.
             -     RADIO: Single-choice field with predefined values.
             -     CHECKBOX: Multiple-choice field with predefined values.
             -     NAME: Fields for entering first and last names.
             -     GUEST_CONTROL: Fields for additional guests and their respective names.
             -     ADDRESS_SHORT: Single-line address field.
             -     ADDRESS_FULL: Full address field with multiple lines.
             -     DATE: Fields for entering year, month, and day.
        - name: system | type: boolean | description: Whether the control is mandatory (such as `name` & `email`). When `true`, only the label can be changed.  
        - name: inputs | type: array<Input> | description: Child inputs.  
           - name: name | type: string | description: Field name.  
           - name: label | type: string | description: Main field label.  
           - name: additionalLabels | type: object | description: Additional labels for multi-valued fields such as address.  | validation: format map
           - name: options | type: array<string> | description: Predefined choice options for fields, such as dropdown.  
           - name: mandatory | type: boolean | description: Whether field is mandatory.  
           - name: maxLength | type: integer | description: Maximum number of accepted characters (relevant for text fields).  
           - name: type | type: ValueType | description: Type which determines field format. Used to validate submitted response.  
                 - enum: TEXT, NUMBER, TEXT_ARRAY, DATE_TIME, ADDRESS
           - name: maxSize | type: integer | description: The maximum number of accepted values for array input.  **Note:** Only applicable for `TEXT_ARRAY` input fields.  | validation: format int32
           - name: defaultOptionSelection | type: OptionSelection | description: Default option initially selected when an input has multiple choices.  Defaults to first (0th) option, if not configured. Currently only applicable for `type.dropdown`.  
              - ONE-OF: 
                 - name: optionIndex | type: integer | description: 0-based index from predefined `controls.inputs.options` which is initial selection.  | validation: minimum 0, maximum 199
                 - name: placeholderText | type: string | description: Placeholder hint describing expected choices, such as "Please select". Considered an empty choice.  | validation: maxLength 200
           - name: labels | type: array<Label> | description: Additional labels for multi-valued fields, such as address.  | read-only: true 
              - name: name | type: string | description: Field name.  
              - name: label | type: string | description: Field label.  
        - name: orderIndex | type: integer | description: Field controls are sorted by this value in ascending order.  
        - name: id | type: string | description: Unique control GUID.  
        - name: deleted | type: boolean | description: Whether the input control is deleted.  | read-only: true 
     - name: messages | type: FormMessages | description: Set of defined form messages displayed in the UI before, during, and after a registration flow. Includes the configuration of form titles, response labels, "thank you" messages, and call-to-action texts.  
        - name: rsvp | type: RsvpFormMessages | description: [RSVP form](https://dev.wix.com/docs/rest/business-solutions/events/rsvp-v2/introduction.md) messages.  
           - name: rsvpYesOption | type: string | description: Label text indicating RSVP's `status` is `"YES"`.  
           - name: rsvpNoOption | type: string | description: Label text indicating RSVP's `status` is `"NO"`.  
           - name: positiveMessages | type: Positive | description: Messages displayed when an RSVP's `status` is set to `"YES"`.  
              - name: title | type: string | description: Main form title for positive response.  
              - name: confirmation | type: ResponseConfirmation | description: Confirmation messages shown after registration.  
                 - name: title | type: string | description: Confirmation message title.  
                 - name: message | type: string | description: Confirmation message text.  
                 - name: addToCalendarActionLabel | type: string | description: "Add to calendar" call-to-action label text.  
                 - name: shareActionLabel | type: string | description: "Share event" call-to-action label text.  
           - name: waitlistMessages | type: Positive | description: Messages displayed when an RSVP's `status` is set to `"WAITLIST"`, for when the event is full and a waitlist is available).  
           - name: negativeMessages | type: Negative | description: Messages displayed when an RSVP's `status` is set to `"NO"`.  
              - name: title | type: string | description: Main form title for negative response.  
              - name: confirmation | type: ResponseConfirmation | description: Confirmation messages shown after registration.  
                 - name: title | type: string | description: Confirmation message title.  
                 - name: shareActionLabel | type: string | description: "Share event" call-to-action label text.  
           - name: submitActionLabel | type: string | description: "Submit form" call-to-action label text.  
        - name: checkout | type: CheckoutFormMessages | description: Checkout form messages.  
           - name: title | type: string | description: Main form title for response.  
           - name: submitActionLabel | type: string | description: Submit form call-to-action label text.  
           - name: confirmation | type: ResponseConfirmation | description: Confirmation messages shown after checkout.  
              - name: title | type: string | description: Confirmation message title.  
              - name: message | type: string | description: Confirmation message text.  
              - name: downloadTicketsLabel | type: string | description: "Download tickets" call-to-action label text.  
              - name: addToCalendarLabel | type: string | description: "Add to calendar" call-to-action label text.  
              - name: shareEventLabel | type: string | description: "Share event" call-to-action label text.  
        - name: registrationClosed | type: RegistrationClosedMessages | description: Messages shown when event registration is closed.  
           - name: message | type: string | description: Message shown when event registration is closed, up to 150 characters.  | validation: maxLength 150
           - name: exploreEventsActionLabel | type: string | description: "Explore other events" call-to-action label text.  
        - name: ticketsUnavailable | type: TicketsUnavailableMessages | description: Messages shown when event tickets are unavailable.  
           - name: message | type: string | description: Message shown when event tickets are unavailable, up to 150 characters.  | validation: maxLength 150
           - name: exploreEventsActionLabel | type: string | description: "Explore other events" call-to-action label text.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_EVENT_CONFIGURATION | Description: The control configuration is invalid for this event.


```

### Examples

### Add comment text area
```curl
curl -X POST 'https://www.wixapis.com/events/v1/events/ad18d12e-a6a9-4c17-abfa-6ff119479be2/form/control' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
-d '{
  "text": {
    "label": "Comment",
    "mandatory": true,
    "maxLength": 1000,
    "multiLine": true,
    "comment": true
  }
}'
```

### Add checkbox
```curl
curl -X POST 'https://www.wixapis.com/events/v1/events/ad18d12e-a6a9-4c17-abfa-6ff119479be2/form/control' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
-d '{
  "checkbox": {
    "label": "Select color preferences",
    "mandatory": true,
    "options": [
      "Red",
      "Green",
      "Blue"
    ]
  }
}'
```

### Add dropdown
```curl
curl -X POST 'https://www.wixapis.com/events/v1/events/ad18d12e-a6a9-4c17-abfa-6ff119479be2/form/control' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
-d '{
  "dropdown": {
    "label": "Choose main course",
    "options": [
      "Vegetarian",
      "Sea food",
      "Steak"
    ]
  }
}'
```

### Add multiple additional guests
```curl
curl -X POST 'https://www.wixapis.com/events/v1/events/ad18d12e-a6a9-4c17-abfa-6ff119479be2/form/control' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
-d '{
  "additionalGuests": {
    "labels": {
      "multiple": "Additional guests"
    },
    "maxGuests": 10
  }
}'
```

### Add +1 additional guest with mandatory guest name
```curl
curl -X POST 'https://www.wixapis.com/events/v1/events/ad18d12e-a6a9-4c17-abfa-6ff119479be2/form/control' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
-d '{
  "additionalGuests": {
    "labels": {
      "single": "+1"
    },
    "namesMandatory": true,
    "maxGuests": 1
  }
}'
```

### Add date
```curl
curl -X POST 'https://www.wixapis.com/events/v1/events/ad18d12e-a6a9-4c17-abfa-6ff119479be2/form/control' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
-d '{
  "date": {
    "label": "Date of birth",
    "mandatory": false
  }
}'
```

### Add single line address
```curl
curl -X POST 'https://www.wixapis.com/events/v1/events/ad18d12e-a6a9-4c17-abfa-6ff119479be2/form/control' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
-d '{
  "address": {
    "labels": {
      "addressLine": "Address Line"
    }
  }
}'
```

### Add full address
```curl
curl -X POST 'https://www.wixapis.com/events/v1/events/ad18d12e-a6a9-4c17-abfa-6ff119479be2/form/control' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
-d '{
  "address": {
    "labels": {
      "addressLine": "Address",
      "country": "Country",
      "subdivision": "State",
      "city": "City",
      "postalCode": "Postal Code",
      "streetAddress": "Street Address"
    },
    "full": true,
    "mandatory": true
  }
}'
```

### Add phone
```curl
curl -X POST 'https://www.wixapis.com/events/v1/events/ad18d12e-a6a9-4c17-abfa-6ff119479be2/form/control' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
-d '{
  "phone": {
    "mandatory": true,
    "label": "Work phone"
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.events.forms.addControl(eventId, options)
 Description: Adds an input control to the form. The applied changes trigger form publishing.  The change is published immediately and is visible to site visitors. You don't need to call Publish Draft.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  eventId
 Method parameters: 
   param name: eventId | type: string | description: Event GUID to which the form belongs. | required: true | validation: format GUID
   param name: options | type: AddControlOptions  none | required: true 
    - ONE-OF: - required: true
     - name: phone | type: PhoneControl | description: Phone number input control.  
        - name: label | type: string | description: Phone input label.  | validation: maxLength 100
        - name: mandatory | type: boolean | description: Whether the phone input is required.  
     - name: address | type: AddressControl | description: Single-line or full address input control.  
        - name: labels | type: Labels | description: Address control labels for each input.  
           - name: addressLine | type: string | description: Single-line address input label.  | validation: maxLength 100
           - name: country | type: string | description: Country input label.  | validation: maxLength 100
           - name: subdivision | type: string | description: Subdivision input label.  | validation: maxLength 100
           - name: city | type: string | description: City input label.  | validation: maxLength 100
           - name: postalCode | type: string | description: Postal code input label.  | validation: maxLength 100
           - name: streetAddress | type: string | description: Street address input label.  | validation: maxLength 100
        - name: full | type: boolean | description: Whether an address is multi-line (consisting of multiple fields such as country, city, postal code). When `false`, address is single-line.  
        - name: mandatory | type: boolean | description: Whether the address input is required.  
     - name: date | type: DateControl | description: Day, month, year date input control.  
        - name: label | type: string | description: Input control label.  | validation: maxLength 100
        - name: mandatory | type: boolean | description: Whether the date input is required.  
     - name: additionalGuests | type: AdditionalGuestsControl | description: Additional guests input control.  
        - name: labels | type: Labels | description: Additional guests control labels for each input.  
           - name: single | type: string | description: Input label for a single guest.  | validation: maxLength 200
           - name: multiple | type: string | description: Input label for multiple guests.  | validation: maxLength 200
        - name: namesMandatory | type: boolean | description: Whether the individual guest names are required.  
        - name: maxGuests | type: integer | description: Maximum number of additional guests.  | validation: minimum 1, maximum 10
     - name: dropdown | type: DropdownControl | description: Single-choice dropdown style input control.  
        - name: label | type: string | description: Input control label.  | validation: maxLength 200
        - name: options | type: array<string> | description: Predefined options guests can choose from.  | validation: minItems 2, maxItems 200, maxLength 200
        - name: mandatory | type: boolean | description: Whether a choice is required.  
        - name: defaultOptionSelection | type: OptionSelection | description: Default option initially selected when an input has multiple choices.  Defaults to first (0th) option, if not configured.  
           - ONE-OF: 
              - name: optionIndex | type: integer | description: 0-based index from predefined `controls.inputs.options` which is initial selection.  | validation: minimum 0, maximum 199
              - name: placeholderText | type: string | description: Placeholder hint describing expected choices, such as "Please select". Considered an empty choice.  | validation: maxLength 200
     - name: checkbox | type: CheckboxControl | description: Multiple-choice checkbox style input control.  
        - name: label | type: string | description: Input control label.  | validation: maxLength 200
        - name: mandatory | type: boolean | description: Whether at least one checkbox is required.  
        - name: options | type: array<string> | description: Predefined options guests can choose from.  | validation: minItems 1, maxItems 200, maxLength 200
     - name: text | type: TextControl | description: Free-form text input control.  
        - name: label | type: string | description: Input control label.  | validation: maxLength 200
        - name: mandatory | type: boolean | description: Whether a text input is required.  
        - name: maxLength | type: integer | description: Maximum number of characters allowed.  | validation: minimum 0, maximum 1000
        - name: multiLine | type: boolean | description: Whether the input control should allow multiple lines in text.  
        - name: comment | type: boolean | description: Whether the input control should be displayed as a comment.  
     - name: radioButton | type: RadioButtonControl | description: Single-choice radio button style input control.  
        - name: label | type: string | description: Input control label.  | validation: maxLength 200
        - name: options | type: array<string> | description: Predefined options guests can choose from.  | validation: minItems 2, maxItems 200, maxLength 200
 Return type: PROMISE<AddControlResponse>
  - name: _id | type: string | description: Generated unique input control GUID.  
  - name: form | type: Form | description: Modified event form.  
     - name: controls | type: array<InputControl> | description: Nested fields as an ordered list.  
        - name: type | type: InputControlType | description: Field control type.  
             - enum:
             -     INPUT: Single text value field.
             -     TEXTAREA: Single text value field with multiple lines.
             -     DROPDOWN: Single-choice field with predefined values.
             -     RADIO: Single-choice field with predefined values.
             -     CHECKBOX: Multiple-choice field with predefined values.
             -     NAME: Fields for entering first and last names.
             -     GUEST_CONTROL: Fields for additional guests and their respective names.
             -     ADDRESS_SHORT: Single-line address field.
             -     ADDRESS_FULL: Full address field with multiple lines.
             -     DATE: Fields for entering year, month, and day.
        - name: system | type: boolean | description: Whether the control is mandatory (such as `name` & `email`). When `true`, only the label can be changed.  
        - name: inputs | type: array<Input> | description: Child inputs.  
           - name: name | type: string | description: Field name.  
           - name: label | type: string | description: Main field label.  
           - name: additionalLabels | type: object | description: Additional labels for multi-valued fields such as address.  | validation: format map
           - name: options | type: array<string> | description: Predefined choice options for fields, such as dropdown.  
           - name: mandatory | type: boolean | description: Whether field is mandatory.  
           - name: maxLength | type: integer | description: Maximum number of accepted characters (relevant for text fields).  
           - name: type | type: ValueType | description: Type which determines field format. Used to validate submitted response.  
                 - enum: TEXT, NUMBER, TEXT_ARRAY, DATE_TIME, ADDRESS
           - name: maxSize | type: integer | description: The maximum number of accepted values for array input.  **Note:** Only applicable for `TEXT_ARRAY` input fields.  | validation: format int32
           - name: defaultOptionSelection | type: OptionSelection | description: Default option initially selected when an input has multiple choices.  Defaults to first (0th) option, if not configured. Currently only applicable for `type.dropdown`.  
              - ONE-OF: 
                 - name: optionIndex | type: integer | description: 0-based index from predefined `controls.inputs.options` which is initial selection.  | validation: minimum 0, maximum 199
                 - name: placeholderText | type: string | description: Placeholder hint describing expected choices, such as "Please select". Considered an empty choice.  | validation: maxLength 200
           - name: labels | type: array<Label> | description: Additional labels for multi-valued fields, such as address.  | read-only: true 
              - name: name | type: string | description: Field name.  
              - name: label | type: string | description: Field label.  
        - name: orderIndex | type: integer | description: Field controls are sorted by this value in ascending order.  
        - name: _id | type: string | description: Unique control GUID.  
        - name: deleted | type: boolean | description: Whether the input control is deleted.  | read-only: true 
     - name: messages | type: FormMessages | description: Set of defined form messages displayed in the UI before, during, and after a registration flow. Includes the configuration of form titles, response labels, "thank you" messages, and call-to-action texts.  
        - name: rsvp | type: RsvpFormMessages | description: [RSVP form](https://dev.wix.com/docs/rest/business-solutions/events/rsvp-v2/introduction.md) messages.  
           - name: rsvpYesOption | type: string | description: Label text indicating RSVP's `status` is `"YES"`.  
           - name: rsvpNoOption | type: string | description: Label text indicating RSVP's `status` is `"NO"`.  
           - name: positiveMessages | type: Positive | description: Messages displayed when an RSVP's `status` is set to `"YES"`.  
              - name: title | type: string | description: Main form title for positive response.  
              - name: confirmation | type: ResponseConfirmation | description: Confirmation messages shown after registration.  
                 - name: title | type: string | description: Confirmation message title.  
                 - name: message | type: string | description: Confirmation message text.  
                 - name: addToCalendarActionLabel | type: string | description: "Add to calendar" call-to-action label text.  
                 - name: shareActionLabel | type: string | description: "Share event" call-to-action label text.  
           - name: waitlistMessages | type: Positive | description: Messages displayed when an RSVP's `status` is set to `"WAITLIST"`, for when the event is full and a waitlist is available).  
           - name: negativeMessages | type: Negative | description: Messages displayed when an RSVP's `status` is set to `"NO"`.  
              - name: title | type: string | description: Main form title for negative response.  
              - name: confirmation | type: ResponseConfirmation | description: Confirmation messages shown after registration.  
                 - name: title | type: string | description: Confirmation message title.  
                 - name: shareActionLabel | type: string | description: "Share event" call-to-action label text.  
           - name: submitActionLabel | type: string | description: "Submit form" call-to-action label text.  
        - name: checkout | type: CheckoutFormMessages | description: Checkout form messages.  
           - name: title | type: string | description: Main form title for response.  
           - name: submitActionLabel | type: string | description: Submit form call-to-action label text.  
           - name: confirmation | type: ResponseConfirmation | description: Confirmation messages shown after checkout.  
              - name: title | type: string | description: Confirmation message title.  
              - name: message | type: string | description: Confirmation message text.  
              - name: downloadTicketsLabel | type: string | description: "Download tickets" call-to-action label text.  
              - name: addToCalendarLabel | type: string | description: "Add to calendar" call-to-action label text.  
              - name: shareEventLabel | type: string | description: "Share event" call-to-action label text.  
        - name: registrationClosed | type: RegistrationClosedMessages | description: Messages shown when event registration is closed.  
           - name: message | type: string | description: Message shown when event registration is closed, up to 150 characters.  | validation: maxLength 150
           - name: exploreEventsActionLabel | type: string | description: "Explore other events" call-to-action label text.  
        - name: ticketsUnavailable | type: TicketsUnavailableMessages | description: Messages shown when event tickets are unavailable.  
           - name: message | type: string | description: Message shown when event tickets are unavailable, up to 150 characters.  | validation: maxLength 150
           - name: exploreEventsActionLabel | type: string | description: "Explore other events" call-to-action label text.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_EVENT_CONFIGURATION | Description: The control configuration is invalid for this event.


```

### Examples

### addControl
```javascript
import { forms } from '@wix/events';

async function addControl(eventId,options) {
  const response = await forms.addControl(eventId,options);
};
```

### addControl (with elevated permissions)
```javascript
import { forms } from '@wix/events';
import { auth } from '@wix/essentials';

async function myAddControlMethod(eventId,options) {
  const elevatedAddControl = auth.elevate(forms.addControl);
  const response = await elevatedAddControl(eventId,options);
}
```

### addControl (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { forms } from '@wix/events';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { forms },
  // Include the auth strategy and host as relevant
});


async function addControl(eventId,options) {
  const response = await myWixClient.forms.addControl(eventId,options);
};
```

---