{"submittedAt":"1654763483000","fields":[{"objectTypeId":"0-1","name":"firstName","value":"Robert"},{"objectTypeId":"0-1","name":"lastName","value":"Yu"},{"objectTypeId":"0-1","name":"email","value":"robert+88@interactivelabs.co"},{"objectTypeId":"0-1","name":"jobTitle","value":"test title"},{"objectTypeId":"0-2","name":"name","value":"test company name"}]}
Here is the error I got:
"errors": [
{
"message": "Error in 'fields.0-2/name'. Field '0-2/name' isn't in form definition",
"errorType": "FIELD_NOT_IN_FORM_DEFINITION"
}
]
From my understanding that "objectTypeId":"0-2" means Company object and this object should have the field "name", right?
Before, forms didn't require to add Fields (=properties) to them. If the fields were valid, the forms worked. We had a form with no Fields in it, except for the email, so we had complete flexibility in the dev side. It worked. After the change, for forms created from March 22 and onwards, you need to include all relevant fields explicitly in the form.
Forms older than March 22 should still work with the previous behavior, this is what Hubspot say.
But for some reason, it won't work with newer fields created after March 22, even if the form is older. It's like what they said about the granularity is wrong - it's about the date of the fields that are used in the form, not the the date of the form itself.
We added the Field to the old Form (marked it as not required) and it worked. All older Fields that were submitted via the Form without being added, still work. Weird.
Section two of that article has more insight into the error you are receiving. “Developers will see a...FIELD_NOT_IN_FORM_DEFINITION error message with a 400 status code in API responses for forms that do not meet the new submission validation.”
Moving forward, I'd suggest:
linking your form here, so the community can take a look
if you or your client have access to support, it may be worth filing a support ticket, but they will request a link to an example as well