APIs & Integrations

StarringJane
Member

Hubspot form fields are not filled programatically when cookies are not accepted trough Cookiebot

SOLVE

We use Hubspot to embed forms on a WordPress website. This form includes some hidden fields, that are filled with javascript.

This approach worked really well, until we added cookiebot. It stops working if you do not accept the non essential cookies.

The form fails to detect changes made to the form with javascript.

URL to replicate: https://www.bostoen.be/project/c-shell/?projectbuildingstab=loten

Press "Download brochure" and fill in the form. It will give you an error that not all fields are filled, while they are.

The code:

$('input[name="' + key + '"]')
    .val(window.formData[key])
    .change()
    .focus()
    .blur()
;

 
I have no idea why this is happening.

0 Upvotes
1 Accepted solution
StarringJane
Solution
Member

Hubspot form fields are not filled programatically when cookies are not accepted trough Cookiebot

SOLVE

This discussion can be closed, as it was not an issue with cookiebot.

View solution in original post

0 Upvotes
2 Replies 2
StarringJane
Solution
Member

Hubspot form fields are not filled programatically when cookies are not accepted trough Cookiebot

SOLVE

This discussion can be closed, as it was not an issue with cookiebot.

0 Upvotes
StarringJane
Member

Hubspot form fields are not filled programatically when cookies are not accepted trough Cookiebot

SOLVE

The field in particular is hidden with CSS. Here is a screenshot where the display is not set to hidden. You can see that the field "Project PDF URL*" is filled in, but stills give the "required" error.

Schermafbeelding 2022-08-25 om 16.48.43.png

0 Upvotes