Pre-populate form fields on Hubspot page with dynamic query strings in URL

Hi, I hope one of you can help!

I have a multiple checkbox contact property that I want to use in a Hubspot form on a Hubspot landing page. I want to pre-populate the form field when this contact property already has values and have an Hubspot e-mail set-up with a link to the landing page. This link uses a dynamic personalisation token to create dynamic query strings that pre-populates the form field. For example: /?preferences={{contact.preferences}}

I’ve used this documentation: Auto-populate form fields with a query string

But when I test it, the values in the multiple checkbox property are delimited by a comma instead of a semicolon. When I manually change the comma into a semicolon in the URL, the form fields get pre-filled correctly.

Strange, because the Hubspot documentation says it should be a semicolon (but it is a comma).

I’ve already tried to use the HubL replace filter to change comma into semicolon in a mail, but I’ve discovered that HubL filters aren’t working in emails, but only on Hubspot pages. Do you know how to fix this?

Hi @JAalbers ,

personalisation tokens are ment to ‘solve’ for human readability. So it makes more sense to have them comma seperated than semicolon. So I would say this is expected behaviour.
As to how to get your desired functionality:
Please consider using a programmable email module with something like:

 <a href="https://company.com/account-form?firstname={{contact.firstname}}&lastname={{contact.lastname}}&email={{contact.email}}&propertyname={{contact.propertyname|replace(",", ";")}}" style="text-decoration: none;">
 <button style="background-color: #4CAF50; color: white; padding: 10px 20px; border: none; cursor: pointer; border-radius: 5px;">
 Text on Button
 </button>
 </a>

Styling could use some work, but I did test this and it works just fine.