Form name not getting when I submitting form with API


Form name not getting when I submitting from with API from last 2-3 week.Before 2-3 weeks ago its working perfectly but now a days without make any changes in code form name not fetching in contact detail.Below image we show that we got the from name with contact detail.

and in below screenshot we cant get from name in contact detil.


Hi @kartik,

Just to make sure that we’re on the same page, are you seeing an incorrect page name when contacts submit a form on a particular page? When you submit a form via the forms API, the form name will populate based on the form you sent your submission to. The page name will populate based on the pageName value included in the hs_context parameter included with the form submission.


Hi @Derek_Gervais ,

I need “Form Name” in list of contact which already working in my code. I mentioned it in below screenshot.

here I mentioned my form submit code.

/hubspot marketing key/
$portalId = “”;
$formGuid = “”;
/hubspot marketing key/

            $hubspotutk      = $_COOKIE['hubspotutk']; 
            $ip_addr         = $_SERVER['REMOTE_ADDR']; 
            $hs_context      = array(
                'hutk' => $hubspotutk,
                'ipAddress' => $ip_addr,
            $hs_context_json = json_encode($hs_context);
            //Need to populate these variable with values from the form.
            $str_post = "firstname=" . urlencode($nl_name) 
                . "&email=" . urlencode($nl_email)
                . "&lifecyclestage=" . urlencode('subscriber')/*need*/
                . "&hs_context=" . urlencode($hs_context_json); //Leave this one be
            //replace the values in this URL with your portal ID and your form GUID
            $endpoint = ''.$portalId.'/'.$formGuid;

Is it possible that hubspot update version affect this functionality?

please guide me for perfect result which i want to shown in my hubspot.


Hi @kartik,

The ‘Form Name’ property you’re referring to is a custom property, so it needs to be updated just like any other property you want to update via form submission. In the code you’ve included in your last reply, i can see that you include values for email and lifecyclestage, but not for the form_name property. The value in your very first screenshot (the image of a contact timeline) isn’t pulled from this custom property, it’s instead included based on which form the submission was sent to.

If you’d like to populate the ‘Form Name’ property with the value of the form, you’ll need to add that as a field to your form submission code. Otherwise, the default ‘Recent Conversion’ property already tracks the last form a contact has submitted, so you might consider using that property instead.


No you are not getting me.
The form name being custom property was being pulled from the Form ID. Automatically. But then post update to Hubspot it’s not pulling.
The Form name is just a identification of where people subscribed to us. For any lead we get to know they came in from this form. Not the page. Form can be used on multiple page.