APIs & Integrations

OSid
Membro

Javascript Redirect Based on a Form Selection (Before Submitting)

resolver

I am looking to redirect users to a different page (for an academic account) based on them making that selection in a Hubspot from field.

This ideally would happen onchange and occur as soon as it is selected instead of happening on a form submission.

ID: license_type_of_interest-cb1da23a-da50-42f8-b281-b8845c18b0a6
value: Academic License

Attempted to get it by Id, match the values to "Academic License" and if that is the value to redirect to a new url immediately. Also, unfortunately using Wordpress and Hubspot forms.

Select Snippet: Website

 

<select id="license_type_of_interest-cb1da23a-da50-42f8-b281-b8845c18b0a6" required="" class="hs-input" name="license_type_of_interest">
  <option disabled="" value="">Please Select</option>
  <option value="Silver License">Silver</option>
  <option value="Gold License">Gold</option>
  <option value="Enterprise License">Enterprise</option>
  <option value="Academic License">Academic</option>
  <option value="Researcher License">Researcher</option>
</select>
0 Avaliação positiva
1 Solução aceita
Kevin-C
Solução
Especialista reconhecido(a) | Parceiro
Especialista reconhecido(a) | Parceiro

Javascript Redirect Based on a Form Selection (Before Submitting)

resolver

Hey @OSid 

 

take a look at the global form events. 
what you could do is when the for is ready attach your change event listeners. 

Kevin Cornett - Sr. Solutions Architect @ BridgeRev

Exibir solução no post original

0 Avaliação positiva
2 Respostas 2
Kevin-C
Solução
Especialista reconhecido(a) | Parceiro
Especialista reconhecido(a) | Parceiro

Javascript Redirect Based on a Form Selection (Before Submitting)

resolver

Hey @OSid 

 

take a look at the global form events. 
what you could do is when the for is ready attach your change event listeners. 

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
0 Avaliação positiva
Jaycee_Lewis
Gerente da Comunidade
Gerente da Comunidade

Javascript Redirect Based on a Form Selection (Before Submitting)

resolver

Hi, @OSid 👋 Welcome to the community! Let's see if we can get the converstaion going. Hey, @Kevin-C @LeeBartelme, do you have any thoughts here?

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Avaliação positiva