diff --git a/website/src/components/HubSpot.tsx b/website/src/components/HubSpot.tsx index e474b471f6d..bd08e407d99 100644 --- a/website/src/components/HubSpot.tsx +++ b/website/src/components/HubSpot.tsx @@ -35,7 +35,13 @@ export function createHubSpotForm({ portalId, formId, targetId, onFormSubmit, on } const firstSourceURLInput = form.querySelector('input[name="first_source_url"]') - if (firstSourceURLInput && firstSourceURLInput.value === '') { + const emailInput = form.querySelector('input[name="email"]') + if ( + firstSourceURLInput && + firstSourceURLInput.value === '' && + emailInput && + emailInput.value === '' + ) { // Populate the hidden first_source_url form field with the value from the sourcegraphSourceUrl cookie. firstSourceURLInput.value = firstSourceURL || '' }