Can I have a disabled option in a dropdown?
1 Like
Hello!
As far as I can see - you can disable only the whole dropdown element:
Maybe this would suit your needs more:
I solved my issue by using an if else statement in Corvid. I started with an empty array for the drop down options, then pushed options based on the condition set in the if else.
` $w( “#dropDown” ).options = [];
let opts = $w( “#dropDown” ).options;
if (conditionalValue < value) {
opts.push({ “label”: “your label” , “value” : “your value” });
$w( “#dropDown” ).options = opts;
} **else** {
console.log( "placeholder side effect, whatever text you want" );
}
if (conditionalValue < value) {
opts.push({ “label”: “your label 2” , “value” : “your value2” });
$w( “#dropDown” ).options = opts;
} **else** {
console.log( "placeholder side effect, whatever text you want" );
}
`