Hello all. I am looking to set a hidden form value based on data from the page where it is submitted. Is there a way with HubL you can set hidden values that populate form fields?
This would allow us to include page information in the actual form submission. For example, if we have dynamically generated HubDB pages, and one form that appears on all of them, I would like the page ID to be included in the form submission.
@Jon_Sasala if you have control of the form’s markup, you can easily include whatever HubL variable as the value of the input. However, if you’re using a HubSpot form embed, you can pre-populate fields using 2 options: url query parameters or javascript on page load.
@Jon_Sasala yes, I’ve done that before without any issues. Just have to make sure to use inline scripts in a HubL module area or directly in the HubL html template.