I’m working on adding a custom script so that depending on teh selection in a dropdown menu, the form directs to different websites. Here is what I have so far…..my drop down form field is titled a2 . . . .do I put $(“a2”).on….. in the script below? Wgat do I put for the “case” options? The actual selection? So if the choice says “Blue” . . . do I put ….. case ‘blue’: …..?
<script>
$("#your_drop_down_id").on('change', function() {
switch ($(this).val()) {
case '#your_dropdown_field_id':
window.module.lp.form.data.url= "http://www.google.com";
break;
case '#your_dropdown_field_second_id':
window.module.lp.form.data.url= "http://www.bing.com";
break;
}
});
</script>