In codegen/Marketing/Forms/Model/HubSpotFormConfiguration.php:345 a list of allowed languages is provided through getLanguageAllowableValues(). This list does include en but when a form is configured to use "English (British)" in Hubspot the value returned for this is en-gb.
When requesting this form using the marketing API (eg. $client->marketing()->forms()->formsApi()->getById($formId)) an exception is thrown, saying the language is invalid.
Solution: Add the en-gb language to the list.
Temporary patch if anyone needs to fix this locally:
--- codegen/Marketing/Forms/Model/HubSpotFormConfiguration.php 2026-04-16 11:41:32
+++ codegen/Marketing/Forms/Model/HubSpotFormConfiguration.php 2026-04-16 11:41:47
@@ -387,6 +387,7 @@
self::LANGUAGE_ZH_CN,
self::LANGUAGE_ZH_HK,
self::LANGUAGE_ZH_TW,
+ 'en-gb', // TMP FIX
];
}
In
codegen/Marketing/Forms/Model/HubSpotFormConfiguration.php:345a list of allowed languages is provided throughgetLanguageAllowableValues(). This list does includeenbut when a form is configured to use "English (British)" in Hubspot the value returned for this isen-gb.When requesting this form using the marketing API (eg.
$client->marketing()->forms()->formsApi()->getById($formId)) an exception is thrown, saying the language is invalid.Solution: Add the
en-gblanguage to the list.Temporary patch if anyone needs to fix this locally: