PDA

View Full Version : add new item at formPanel



beita
11 Sep 2008, 7:17 AM
Hello,

I have a problem with a formPanel, I have a formPanel empty, without items. When i request the data from the server (the fields) i want add the new fields to the formPanel, but i can do it and i don't know why?

The source to mi function:

var campoTexto = new Ext.form.TextField({
fieldLabel: "a",
allowBlank: true,
id: "b",
name: "b",
inputType: 'text',
width: 100
})
//this.formulario is my formPanel
this.formulario.add(campoTexto)

Thanks for all.

Bea.

devnull
11 Sep 2008, 7:19 AM
You would have alot better luck if you waited and created the whole formPanel once you have the data from the server.

evant
11 Sep 2008, 7:22 AM
See this thread:

http://extjs.com/forum/showthread.php?t=41093