Customize Form - Show message based on select optionSOLVE
Sep 26, 2017 6:05 PM
In our contact us form, the user can select if they want to just chat or if they need support. If they need support we don't want them to fill out the form, but direct them to the support email, wheter in form of a message that says "please contact support" or that they are taken to the support page. I was hoping to simply solve that via the form dependencies option, but there's no such thing as "display message" or "redirect to page". So I tried to write my own script, but Hubspot is totally ignoring it. Here is what I have tried for displaying a message:
jQuery in header ( via "Edit Head"):
HTML via "Custom HTML" widget:
<div id="hidden_div"> <p>Please contact email@example.com</p> </div>
I would assume that redirecting them to another page would be very similar.
Anyone know if this should work? If so, what am I doing wrong?
Solved! Go to Solution.
Sep 28, 2017 5:35 PM - edited Sep 29, 2017 12:49 PM
ok, tried that... console didn't log anything.... and removing load wrapper didn't change anything...
Ok, did a lot of research and found this: https://developers.hubspot.com/manipulating-forms-with-jquery
So I changed:
and it worked!!!!!! 😄
UPDATE: It does NOT work in Safari!!! 😞