TransWikia.com

How can we add placeholder for lightning:InputField?

Salesforce Asked by aakash poudel on February 6, 2021

standard html or lightning input has a attribute "placehodler" that allows us to enter a place holder value for the input field, but
lightning:inputField does not have that attribute supported. Is there a work around to achieve this or am i missing something here ?
<lightning:inputField name="Phone" placeholder = "enter phone number" />

One Answer

According to the documentation, the same attribute is available for lightning-input.

<lightning-input type="email"
                 label="Email"
                 pattern="[email protected]"
                 placeholder="[email protected]">
</lightning-input>

Answered by Renato Oliveira on February 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP