Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ui.Select.setPlaceholder
Stay organized with collections
Save and categorize content based on your preferences.
Sets the select's placeholder text, which is shown when no value is selected.
Returns this select.
Usage | Returns | Select.setPlaceholder(placeholder) | ui.Select |
Argument | Type | Details | this: ui.select | ui.Select | The ui.Select instance. |
placeholder | String | The select's placeholder text. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003esetPlaceholder\u003c/code\u003e method allows you to define the text displayed in a select dropdown when no option is selected.\u003c/p\u003e\n"],["\u003cp\u003eThis method accepts the placeholder text as an argument and can be chained with other ui.Select methods for a fluid coding experience.\u003c/p\u003e\n"],["\u003cp\u003eIt ultimately returns the \u003ccode\u003eui.Select\u003c/code\u003e instance, enabling further method calls if desired.\u003c/p\u003e\n"]]],["The `Select.setPlaceholder()` method sets the placeholder text for a select element, displayed when no value is chosen. It accepts a string argument (`placeholder`) representing the desired text. The method, when called on a `ui.Select` instance, modifies the instance and returns the same `ui.Select` instance, allowing for method chaining. The `ui.Select` instance is passed as the argument 'this'.\n"],null,["# ui.Select.setPlaceholder\n\n\u003cbr /\u003e\n\nSets the select's placeholder text, which is shown when no value is selected.\n\n\u003cbr /\u003e\n\nReturns this select.\n\n| Usage | Returns |\n|--------------------------------------|-----------|\n| Select.setPlaceholder`(placeholder)` | ui.Select |\n\n| Argument | Type | Details |\n|-------------------|-----------|--------------------------------|\n| this: `ui.select` | ui.Select | The ui.Select instance. |\n| `placeholder` | String | The select's placeholder text. |"]]