Is it possible to receive the ID or slug of a specific collection when receiving a form submission in Webflow?
Yes, it is possible to receive the ID or slug of a specific collection when receiving a form submission in Webflow.
When a user submits a form in Webflow, you have the option to set up a Webflow Form Submission webhook to send the form data to an external service or script. In this webhook request, you can include additional data, such as the ID or slug of the specific collection item that the form submission is related to.
To accomplish this, you can follow these steps:
- Set up a form in your Webflow project, and add necessary fields to collect data from the user.
- In the Webflow Designer, select the form and go to the "Form Settings" panel on the right.
- Scroll down to the "Actions" section and click on "Add Webflow Form Submission".
- In the modal that appears, click on "Create New Integration" and select "Webhook" as the integration type.
- Enter the URL of the external service or script that will handle the form submission data.
- Customize the payload of the webhook request to include the ID or slug of the collection item. You can use Webflow's dynamic data to fetch the ID or slug of the item on the front-end before submitting the form.
- Save your changes and publish your site.
With this setup, when a user submits the form, Webflow will send a POST request to the specified URL with all the form data, including the ID or slug of the collection item. Your external service or script can then retrieve this data from the payload and use it as needed.
By including the ID or slug of the specific collection item in the webhook request, you can easily identify and process the form submissions associated with that item, enhancing the functionality and flexibility of your Webflow projects.
Additional Questions:
- How can I send form submission data from Webflow to an external service or script?
- Can I customize the payload of the Webflow Form Submission webhook request?
- What are the benefits of including the ID or slug of a specific collection item in the form submission?