placeholder text

5 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 12 Jan 2012 Link to this post

    How do I go about getting some placeholder text inside the combo so when they click on it or start tying it disappears?

    I tried the HTML5 placeholder attribute on the input, but it doesn't seem to work.
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 13 Jan 2012 Link to this post

    Hello Steve,

     
    HTML5 placeholder attribute works perfect on my side:

    Kind regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 13 Jan 2012 Link to this post

    Hmmm, ok difference for me was I put it on the input before it was Kendo'd, not after

    That makes a difference then eh :)  Okay, I'll try thanks
  5. Adeel
    Adeel avatar
    4 posts
    Member since:
    Sep 2012

    Posted 26 Aug 2013 Link to this post

    Hi,
    Is there any way to set optionLabel on "select" element's html rather than doing it programatically from javascript ?
    Example :
    <select option-label="Please select"  otherHtmlAtrributes......    />
  6. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 29 Aug 2013 Link to this post

    Hello Charles,

     
    The optionLabel option is supported only by the DropDownList widget. The ComboBox has placeholder option. A configuration option can be defined declaratively if the widget is initialized with kendo.init or kendo.bind. In your case, the optionLabel option needs to be defined like this:

    <select data-option-label="Please select"  otherHtmlAtrributes......    />

    Regards,
    Georgi Krustev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready