PDA

View Full Version : When i add element into form manual how can i setvalue to him later



intro
29 Aug 2010, 3:18 AM
Hi i add tynimce into formpanel like this:
prikaz_formHTML.add({
xtype : "tinymce",
stateful : false,
hideLabel : false,
fieldLabel : "HTMLHR ",height : "600",
id : "HTMLHR ",
name : "HTMLHR ",
autoRef : "HTMLHR ",.....

I define HTMLHR=this.HTMLHR;

And i try to setvalue with

if (obj.results[0].HTMLHR!="") HTMLHR.setValue(obj.results[0].HTMLHR);


And i get error HTMLHR is undefined.. can you tell me how can i normali setvalue if field is added manualy


Thanks in advance~o)

ashaihullin
29 Aug 2010, 10:01 AM
Get your component by id, or save the reference to it by creating it outside your container.