Search.../

placeholder

Sets or gets the element's placeholder text.

Description

Placeholder text is typically used to provide a hint to the user of what to enter into a input element that accepts text. When the user begins to enter text, the placeholder text disappears.

Type:

stringRead & Write
Mixed in from:$w.TextInputMixin

Was this helpful?

Get an element's placeholder text

Copy Code
1let placeholdText = $w("#myElement").placeholder; // "Enter name"
Set an element's placeholder text

Copy Code
1$w("#myElement").placeholder = "Enter your name";