4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
13 * @class Roo.form.TextItem
14 * @extends Roo.BoxComponent
15 * Base class for form fields that provides default event handling, sizing, value handling and other functionality.
17 * Creates a new TextItem
18 * @param {Object} config Configuration options
20 Roo.form.TextItem = function(config){
21 Roo.form.TextItem.superclass.constructor.call(this, config);
24 Roo.extend(Roo.form.TextItem, Roo.BoxComponent, {
26 * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to
27 * {tag: "div", type: "text", size: "20", autocomplete: "off"})
29 defaultAutoCreate : {tag: "input", type: "text", size: "20", autocomplete: "new-password"},
32 * @cfg {String} tag the tag for this item (default div)
36 * @cfg {String} html the content for this item (default empty)
40 getAutoCreate : function()
45 var cfg = typeof this.autoCreate == "object" ?
46 this.autoCreate : Roo.apply({}, this.defaultAutoCreate);
47 if(this.id && !cfg.id){