Search.../

placeholder

Sets or gets the input element's placeholder text.

Description

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

Type:

stringRead & Write

Was this helpful?

Get an input element's placeholder text

Copy Code
1let myPlaceholder = $w('#mobileTextInput1').placeholder; // 'Enter your first name'
Set an input element's placeholder text

Copy Code
1$w('#mobileTextInput1').placeholder = 'Enter your first name';