> 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`). > - 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. --- ## REST API ### Schema ``` Method: addControl Description: Adds an input control to the form. The applied changes trigger form publishing. 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. - 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. - name: country | type: string | description: Country input label. - name: subdivision | type: string | description: Subdivision input label. - name: city | type: string | description: City input label. - name: postalCode | type: string | description: Postal code input label. - name: streetAddress | type: string | description: Street address input label. - 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. - 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. - name: multiple | type: string | description: Input label for multiple guests. - name: namesMandatory | type: boolean | description: Whether the individual guest names are required. - name: maxGuests | type: integer | description: Maximum number of additional guests. - name: dropdown | type: DropdownControl | description: Single-choice dropdown style input control. - name: label | type: string | description: Input control label. - name: options | type: array | description: Predefined options guests can choose from. - 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. - name: placeholderText | type: string | description: Placeholder hint describing expected choices, such as "Please select". Considered an empty choice. - name: checkbox | type: CheckboxControl | description: Multiple-choice checkbox style input control. - name: label | type: string | description: Input control label. - name: mandatory | type: boolean | description: Whether at least one checkbox is required. - name: options | type: array | description: Predefined options guests can choose from. - name: text | type: TextControl | description: Free-form text input control. - name: label | type: string | description: Input control label. - name: mandatory | type: boolean | description: Whether a text input is required. - name: maxLength | type: integer | description: Maximum number of characters allowed. - 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. - name: options | type: array | description: Predefined options guests can choose from. 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 | 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 | 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. - name: options | type: array | 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. - 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. - name: placeholderText | type: string | description: Placeholder hint describing expected choices, such as "Please select". Considered an empty choice. - name: labels | type: array