Streaming live at 10am (PST)

Disabling Select Field Option

I’m trying to make one of my options within the finish select field to be disabled. I’ve looked around and tried all of the suggestions but none of them have worked.

I’ve only gotten it to work by manually inputting in ‘disabled’ next to option through inspecting the page.

The project I’ve copied the code from is by:

Thanks.

Here is my site Read-Only: https://preview.webflow.com/preview/fiksechoquer?utm_medium=preview_link&utm_source=designer&utm_content=fiksechoquer&preview=b042ac01e629e6c17903e2a625caba07&pageId=5ed87a02042ec007f87d5525&mode=preview
([how to share your site Read-Only link][2])

[1]: http://


[2]: https://university.webflow.com/article/sharing-your-sites-read-only-link

I would probably just use a bit of javascript for this, in the custom code at the bottom of your page try something like this:

<script type="text/javascript">
	$(function() {
		$("#Finish option[value="standard-plus"]").attr('disabled','disabled');
	});
</script>

You’ll need to put a value in the option options in Webflow :slight_smile:

image

Hey Sam,

I’ve tried this but seem to not work, would like mind trying it out yourself?

Thanks

Can you post your published site link with the script on that page? Also I realized that the ID selector “#Finish” was from the example I used, make sure to update that to the ID of the dropdown you want to apply this to.

Here is the published link,

https://fiksechoquer.webflow.io/wheels/fm-5

I made sure to ID matched the dropdown I wanted it on.

Try this inside of the script instead:

$('#Finish option[value=\"Custom\"]').attr('disabled','disabled');
$('#Finish').niceSelect('update');