Designer API
Control the Webflow Designer
FormForm.setSettings(settings)
Sets the settings of the form.
1form.setSettings(2 settings:{3 state: {{FORM_STATE}},4 name: string,5 redirect: string,6 action: string,7 method: {{FORM_METHOD}},8 }9): Promise<null>
settings
FormSettings
FormSettings Properties
Promise<null>
null
A Promise that resolves to null.
1const selectedElement = await webflow.getSelectedElement()23if (selectedElement?.type === 'FormForm' || selectedElement?.type === 'FormWrapper'){45 await selectedElement.setSettings({6 state: "success",7 name: "My Form",8 redirect: "https://www.my-site.com/thank-you",9 action: "https://{dc}.api.mailchimp.com/3.0/lists/{list_id}/members",10 method: "post"11 })1213} else {14 console.log("Selected Element is not a Form Element")15}