Dropdown list with buttons

Hi Rebeca you need to create separate buttons one named M, another named XL etc, set them all to be collapsed except one. connect each button to a different pdf file via a dataset then add an onChange event to your dropdown, then use code similar to this but you will need to edit it to suit your page

let key = $w( “#dropdown1” ).value;
if (key === ( ‘M’ ))$w( “#myButton1” ).expand()

else {

        $w( "#myButton1" ).collapse(), 

        console.log(key) 
    } 

if (key === ( ‘L’ ))$w( “#myButton2” ).expand()

else {

        $w( "#myButton2" ).collapse(), 

        console.log(key) 
    } 

if (key === ( ‘XL’ ))$w( “#myButton3” ).expand()

else {

        $w( "#myButton3" ).collapse(), 

        console.log(key) 
    } 

if (key === ( ‘S’ ))$w( “#myButton4” ).expand()

else {

        $w( "#myButton4" ).collapse(), 

        console.log(key) 
    } 

}