You need to sign in to do that
Don't have an account?
krisstannum
How to add placeholder in force:inputField?
I need to change the standard place holder in the force:inputField to something else. Is there a way to do this since it is not part of the attributes of this field?
thank you!
thank you!
i also try to do that but there is no way to change the placeholder in force:inputField. its showing default palceholder. if you want to change placeholer then you have need to create custom lookup component for it. because of the locker service enable we also don't have access the DOM elements. by javaScript such as give class name to 'force:inputField' and then on init function set the placeholder document.getElementsByClassName("example").placeholder = 'custom placeholder' but it's also not working with secure framework :{
let me know if it helps you
thanks [sfdcmonkey.com]
All Answers
i also try to do that but there is no way to change the placeholder in force:inputField. its showing default palceholder. if you want to change placeholer then you have need to create custom lookup component for it. because of the locker service enable we also don't have access the DOM elements. by javaScript such as give class name to 'force:inputField' and then on init function set the placeholder document.getElementsByClassName("example").placeholder = 'custom placeholder' but it's also not working with secure framework :{
let me know if it helps you
thanks [sfdcmonkey.com]