Use collection value as URL parameter

Does anyone know if it is possible to add a parameter from a collection to a URL/Link?

My scenario is that I have a collection page and on that page I have a contact us link (to a contact form). I want to be able to pass that collection page (in this case the child’s name from the collection) to the contact for to auto-fill a value on that form.

Specific Page (any child page): http://www.ndheartgallery.org/children/melissa-17-cherish-13 (Inquire about button)
Contact Us Page: Contact Us | North Dakota Heart Gallery

Share link: Webflow - ND Heart Gallery

Thanks!

Yes, should be possible using custom code.

Here is a related question Passing collection name to form field

I’m looking for this too, how to add data from CMS collection fields on a Template page to URL query parameters. For instance a field of “Name” and a value of “Mickey Mouse” might be ?name="Mickey%20Mouse"

The easy way to do this is to create a GET form with a hidden field. The browser will take care of everything else in the navigation and in the URL composition when the user clicks that button.

For example, supposed you have-

  • Collection page, which you want to navigate from
  • Contact page, which you want to navigate to, with ?name=Mickey%20Mouse on the querystring.

To build this, on your Collection page

  • Drop a form
  • Remove any text fields, etc, just keep the submit button
  • Change the button text to “Contact Us” or whatever you like, users are only going to see this button
  • Inside of the form, drop an Embed
  • In the Embed, add a hidden field like so;
    <input type="hidden" name="Name" value=" YOUR FIELD HERE ">
    You’ll use the Add Field feature to insert the Name field where I have your field here.
  • You can add others as well if you like

Now very important, people get confused with the form settings here-

  • Change your form action to /contact or whatever URL you are navigating to.
    This is not the redirect setting, that’s not used here.
  • Change the form method to GET, not POST

You now have a button that will take the CMS data you’ve provided in the form, and navigate to the specified action URL with that data appended on the querystring.