Could some please help me figure out how should I be passing a dynamic value for the email address in this piece of code:
{% set contacts = crm_objects("contact","email=test@test.com","firstname,email,lastname,phone") %}
This line of code is a part of the following script which is being used to populate a Contact form with the known field values . I am using the email address to pull the reacord. The code is working fine when I am passing a static email address (I pass test@test.com in the form and click the button, it pulls the field values for the First Name, Last Name and the Phone Number). But I want to pass a dynamic email address instead of static. Could anyone help me figure out how?
We are using a contact form but handling a customization based on a Custom object property. We are not a Operations Hub member so could not use custom code for this purpose. It could have been easier with the custom code is what I heard from our Hubspot Rep. So, we found this approach to work on the development we want on the form. After we built the first part, we have another requirement that wants us to auto populate the form fields with the known Contact field values using the email address of the contact to fetch the record. This is where I am stuck. I am able to pull the record details when I pass a static email address in the code and pass the same email address on the form. But, ideally I should be able to pass the email address dynamically.
Hope this makes sense.
And I am new to Hubspot and do not know about the Prefill functionality that you mentioned.