PDA

View Full Version : [CLOSED] placeHolder vs. placeholder



Ralph Haygood
11 Aug 2010, 1:39 PM
The documentation says Ext.form.Field has a config option "placeHolder" (uppercase H), but the code implements "placeholder" (lowercase h).

hendricd
11 Aug 2010, 2:57 PM
The documentation says Ext.form.Field has a config option "placeHolder" (uppercase H), but the code implements "placeholder" (lowercase h).

@Ralph --
Yes, the Touch component configuration options are (consistently) camelCase throughout the framework, and the rendering templates resolve those differences as needed.

cnelissen
18 Aug 2010, 9:28 AM
Doug, its actually broken in Ext.Field...



renderTpl: [
'
id="{id}" class="{baseCls} {required} {cls} {cmpCls} {uiBase}-{ui} {labelAlign}" style="{style}">',
'for="{inputId}">{label}',
'tabIndex="{tabIndex}" ',
'placeholder="{placeholder}" ', // <-- Not CamelCase
'style="{style}" ',
'maxlength="{maxlength}" ',
'autocomplete="{autoComplete}" ',
'autocapitalize="{autoCapitalize}" ',
'autocorrect="{autoCorrect}" ',
'/>',
'
',




Ext.applyIf(renderData, {
disabled: me.disabled,
fieldCls: 'x-input-' + me.inputType + (me.inputCls ? ' ' + me.inputCls : ''),
fieldEl: !me.fieldEl && me.autoCreateField,
inputId: Ext.id(),
label: me.label,
labelAlign: 'x-label-align-' + me.labelAlign,
name: me.name || me.id,
placeholder: me.placeholder, // <-- Not CamelCase
required: me.required ? 'x-field-required' : undefined,
style: me.style,
tabIndex: me.tabIndex,
maxlength : me.maxLength,
type: me.inputType,
maskField: me.maskField,
showClear: me.showClear
});

hendricd
18 Aug 2010, 9:49 AM
Sorry,

I should have said, "in the next release". ;)