#Nr. 49 - Erste Option in einer Auswahleingabe deaktivieren

Verhindern Sie, dass Benutzer die Platzhalteroption in Ihren Auswahleingaben auswählen.

Video Tutorial

tutorial.mov

Watch the video for step-by-step implementation instructions

The Code

8 lines
Paste this into Webflow
<!-- 💙 MEMBERSCRIPT #49 v0.1 💙 DISABLE FIRST OPTION IN SELECT INPUT -->
<script>
    let selects = document.querySelectorAll("select[ms-code=hide-first-option]");
    selects.forEach((select) => { 
        let options = select.getElementsByTagName("option");
        options[0].hidden = true;
    });
</script>

Data Attributes

1 attribute
Attribut
Value
Beschreibung
wahr
No description

How to use attributes

Add these data attributes to your HTML elements in Webflow. For example: <div data-attribute="value">

Script Info

Versionv0.1
PublishedNov 11, 2025
Last UpdatedNov 11, 2025

Need Help?

Join our Slack community for support, questions, and script requests.

Join Slack Community
Back to All Scripts

Related Scripts

More scripts in Custom Fields