How to collapse certain inputs depending on the value of a dropdown?

Hi, i don’t have much coding knowledge. Could someone help me with this. I have a dropdown with 5 values (1,2,3,4,5) and depending which value is selected, I want to hide some of the text inputs.

For example: if users choose 2 in the dropdown, I want to collapse #input3 and #input4

Here is the example you asked for.

$w('#myDropdown').onChange((event)=>{
    if($w('#myDropdown').value == "2"){
        $w('#input3').collapse();
        $w('#input4').collapse();
    }
})

Change the name from #myDropdown into whatever you’ve called it. The onChange function is called when the dropdown changes it’s value, you can read more about it here