Skip to main content
Question

Form Condition Redirect July 2024

  • 8 July 2024
  • 1 reply
  • 26 views

Forum|alt.badge.img

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>

1 reply

Md_Mahinur_Khan
Forum|alt.badge.img+1

@joshua.m.sells i’ve replied on your other topics. Please check and let me know if you have any other questions: 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings