Drop-down box dependent on the option selected in another drop-down box

16 0 3

Hi all, I am very new to shopify and want to create a form with a drop down box whose items are dependent on another drop down box. Luckily, a solution to this problem has been posted online here: 


Theres a few different solutions listed..I tried the first solution by adding the code to page.contact.liquid but I couldnt get it to work.

Below is the top solution posted on that link. I added the html code as is to my page.contact.liquid file, but I didnt know where to put the JS code. 

Can someone please help make the code work for a "contact us" form on a shopify store? In case it matters, I am using the narrative theme.

Id appreciate all help! Thank you!!



<!-- Source: -->
<select id="source" name="source">

<!-- Status: -->
<select id="status" name="status">



$(document).on('ready', function () {

    $("#source").on('change', function () {
        var el = $(this);
        if (el.val() === "ONLINE") {
        } else if (el.val() === "MANUAL") {
            $("#status option:last-child").remove();









Replies 0 (0)