APIs & Integrations

bharadwajbb
Member

Automatically saving name field in contacts

I have a custom form with name and email field on my website. I am only sending the email to hubspot, but the name field is also automatically stored (even though not sending in json). and when I send a default string in the json, it still saves the text entered by user and not the default string that I am passing

I have also checked the HTTP responses recieved, and the data contains my default string for firstname field, but I don't understand how it is storing the name entered by visitor

4 Replies 4
tominal
Guide | Partner
Guide | Partner

Automatically saving name field in contacts

Hey again @bharadwajbb,

How are you passing the firstname property into your POST request? Is it within the properties object per the documentation?

Hope that helps.


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com
bharadwajbb
Member

Automatically saving name field in contacts

yes, in the properties object as per the documentation

tominal
Guide | Partner
Guide | Partner

Automatically saving name field in contacts

So just for a bit of clarification, this custom form on your website is with a website hosted by HubSpot correct? If so, I am not totally versed in HubSpot forms. I do however remember that if you set the first and last name fields in your form, it will save to the contact properties.

If you aren't, then it may be something in your code overwriting the string you are trying to pass into the API request. Are you able to post an example of your code?

 

Hope that helps.


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com
bharadwajbb
Member

Automatically saving name field in contacts

i use the HubSpot tracking code script in my footer. When I remove this and try, there are no issues with first name and Lastname. So does the tracking code automatically stores name field ?

0 Upvotes