Streaming live at 10am (PST)

How to know which CMS page a form was submitted from?

I’m building a website which has a CMS template page where customers order a product from a form and input relevant information for a later consultation. I would like to know how once I see the form submission, to know which CMS page they actually submitted it from? Otherwise I don’t know what kind of product they would like until I ask them personally. ( which defeats the purpose of this kind of automation)

https://preview.webflow.com/preview/flashfeedio?utm_medium=preview_link&utm_source=designer&utm_content=flashfeedio&preview=8280d80f32a0703119802b1eda6c6c99&pageId=5fda28aaddf08b1868c768e5&itemId=602115731fb7936ee036b5c7&mode=preview

That is normally handled by creating a hidden input field, in the form using custom code, whose value is set to a CMS fields value. There are examples in the forum you can find via a search.

Hey Evan!

To elaborate on what @webdev said: Basically, you’re going to want to create a hidden field within your form. You can achieve this by inserting an “Embed” element at the bottom of your form, and inserting some custom code for the input field into that.

The code you would need would be:

Once you have this code copied into the Embed element, you will want to highlight the text [insert dynamic code here] and delete it. With your cursor still within value, you will want to go to the “add Field” button in the top of the embed dialogue window, click it, and then you will see a list of all the CMS fields in your Collection.

image

From there, just select the field you want to reference in the “Product” field, and it should appear in your code. This will then dynamically update depending on which page you’re on.

There you have it! As long as that embed element is placed within your Form in the navigator, you should now be able to see the Product that a form submission is associated with whenever you pull up the submission!

Let me know if you need further assistance :slight_smile:

Ahh interesting. I had a feeling this would work but I wasn’t sure if it was the “official” way to make it happen, also didn’t know what code to even write… thanks! will try this.

This is the easiest way that I have found. Hope it works for you! :slight_smile: