HTMLAttributes & AutoComplete

3 posts, 0 answers
  1. Nick
    Nick avatar
    11 posts
    Member since:
    Jan 2013

    Posted 21 Oct 2015 Link to this post

    It seems that the default behavior of the control is to set autocomplete="off" which is fine except Chrome does not like to adhere to this standard.

     Developers should be allowed to override the this default behavior if need be to set the autocomplete type of the textbox, however, setting this via the htmlattributes does not do anything.


    Example using the MVC Wrappers:

    html.Kendo().MaskedTextBoxFor(e).Mask(mask).HtmlAttributes(new { @class = "form-control", autocomplete = "tel-national" })


  2. Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 23 Oct 2015 Link to this post

    Hello Nick,

    Indeed, the widget will set the autocomplete="off" attribute explicitly. In order to accomplish your goal, you will need to set the autocomplete attribute after widget initialization:
    @* MVC wrapper is defined here *@
      $(function() {
          var id = "@Html.IdFor(your model)";
          $("#" + id").attr("autocomplete", "tel-national");

    I would suggest you share your request in our Feedback for further consideration.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Nick
    Nick avatar
    11 posts
    Member since:
    Jan 2013

    Posted 23 Oct 2015 in reply to Georgi Krustev Link to this post

    Thanks Georgi - this is the work around that I came up with as well and am using.  I'll share this request via feedback as it feels like it is bug.  Thanks again!
Back to Top