1 of 1 people found this helpful
This could be done with some JS only.
But I would suggest another way to handle this that requires no coding:
- Just let the email address always visible and make any other field visible only if the user does not select this industry
- if the user select this industry, then let them hit the button and have a conditional follow-up set to redirect them to the dedicated section of your web site
At least, you would have captured the leads and linked the cookie to the email address.
I agree with Greg, skipping the form completely may not be the best way to make use of the lead's visit to your site. But sometimes there are compliance and other reasons to not accept the post from the lead at all.
To redirect on dropdown change, while you can use native DOM onChange events, I don't advise it (it's better to work within the Forms API model because there's no other way to be sure events will be captured). Instead you can do it with the one line of code I have here:
Select "MN" from the State dropdown and you'll see it redirect. The backing form simply has an empty Rich Text area with a Visibility Rule, in order to trigger the Render event. You can obviously add as many other VRs as you want: