Hi there,
Need Placeholder for text field
Thanks
Hi there,
Need Placeholder for text field
Thanks
Hi,
Could you provide a little bit more details regarding what you are trying to do and where would the placeholder be?
Thanks
Like a prompt?
Hi,
Thanks for bringing this up! It’s a feature that has been requested by many users. I can’t give you time estimates, but it’s on our roadmap.
Note that you can implement this on your own fairly easily. Here are two options:
If it’s unlikely the user will ever type your placeholder text as a valid value, you can just pre-populate the field with your placeholder text and use simple string comparison to know when you are in this mode. As soon as you get a Focus event from the TextField’s internal Input element, you change the value back to nothing. Then, on the Blur event, you check if the TextField’s current value is nothing and if so, you replace it with the placeholder string.
More complicated but a bit more robust, you use a Label that sits on top of the TextField. You make sure the Label does not receive events by setting the pickingMode attribute to Ignore. Once again, when the TextField gets focus, you hid this Label with Label.style.display = DisplayStyle.None; and show it again on the Blur event if the field is empty.