It is not showing any errors nor rendering any UI. I want to add number field dynamically.
var numberField= Ext.create('Ext.form.Panel', {
cls: 'questionRows',
hidden: show,
itemId: item.HealthNeedsDetailsGuid,
id: item.HealthNeedsDetailsGuid,
items: [{
xtype: 'field',
html: item_index + ') ' + item.HealthNeedsQuestion
}, {
xtype: 'numberfield',
anchor: '100%',
name: 'bottles',
clearIcon: false,
width: 400,
value: 99,
maxValue: 99,
minValue: 0
}]
});
In sencha touch,
Ext.form.Panelis a scrollable item, so it will not be shown untill you specify a height or makescrollableproperty asnull.To show the number field on the entire screen, you can give
fullscreen:trueproperty inExt.form.Panel. Like this:OR
To add it to an existing component call
add()from existing component and givenumberFieldas its parametermainPanel.add(numberField);. InnumberFieldeither giveheightproperty orscrollable:nullproperty to theExt.form.Panel. Like this: