Search.../

updateControl( )

Updates an existing input control in the draft form.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function updateControl(identifiers: UpdateControlIdentifiers, options: UpdateControlOptions): Promise<UpdateControlResponse>

updateControl Parameters

NAME
TYPE
DESCRIPTION
identifiers
UpdateControlIdentifiers

Identifies what form to update.

options
Optional
UpdateControlOptions

Optional fields.

Returns

Return Type:

Promise<
UpdateControlResponse
>
NAME
TYPE
DESCRIPTION
form
Form

Modified draft event form.

Was this helpful?

updateControl example

Copy Code
1import { forms } from 'wix-events.v2';
2
3 async function updateControl(identifiers, options) {
4 try {
5 const result = await forms.updateControl(identifiers, options);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13