Field - Placeholder Property

Text to be shown when the edit has no value

Member of Field (PRIM_MD.Input)

Data Type - String


The Placeholder property defines the caption to be shown in an edit when it is empty.
Placeholders are commonly seen on input screens and will disappear the moment a value is entered.


The example below shows 4 address fields. Rather than using showing the Label above the edit area, the Placeholder shows the desired content.
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(456) Width(864)
   Define_Com Class(#PRIM_MD.Edit) Name(#Edit1) DisplayPosition(1) Left(0) Parent(#COM_OWNER) TabPosition(1) Top(0) Width(449) Placeholder('House Number and Street') Height(49)
   Define_Com Class(#PRIM_MD.Edit) Name(#Edit2) DisplayPosition(2) Left(0) Parent(#COM_OWNER) TabPosition(2) Top(49) Width(449) Placeholder('Suburb') Height(49)
   Define_Com Class(#PRIM_MD.Edit) Name(#Edit3) DisplayPosition(3) Left(0) Parent(#COM_OWNER) TabPosition(3) Top(98) Width(449) Placeholder('City') Height(49)
   Define_Com Class(#PRIM_MD.Edit) Name(#Edit4) DisplayPosition(4) Left(0) Parent(#COM_OWNER) TabPosition(4) Top(147) Width(449) Placeholder('State and Zip') Height(49)

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020