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)
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.
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.
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
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!
I tried inserting your code for my project, however I am unable to see where the ‘Product’ info pops up… Will this field appear in form submissions?
Product is just an arbitrary name he gave it so that we can know where it came from, you can also add a field from the CMS to make it dynamic.