2

I'm try to make a hidden field on my code with ST 1.1, but I've error in console log.

I have this code:

var hddNumClient = new Ext.form.Hidden({
xtype : 'textfield',
name : 'hddNumClient',
id : 'hddNumClient',
value : ''
})

I need to create a hidden field and run environment to pass another value response. Please help me.

hekomobile
  • 1,388
  • 1
  • 14
  • 35
  • What is the error shown in the console ? And also, what version of ST do you use (Using too many tags is kinda confusing)? – Titouan de Bailleul Jun 06 '12 at 19:37
  • 1
    May be, you should start moving your app to ST2, as it's more advanced to ST1.x and has no of useful features .. `xtype:'hiddenfield' ` – Saurabh Gokhale Jun 07 '12 at 13:02
  • You can remove the 'xtype' from there, since you are specifically creating an Ext.form.Hidden. You'll need to paste the actual error console log for more help. – Kevin Vaughan Jun 15 '12 at 16:41

3 Answers3

1
    var hddNumClient = new Ext.form.Hidden({

name : 'hddNumClient',
id : 'hddNumClient',
value : ''
})

you can not add one element into onther element so you have to remove xtype:'textfield'

Naresh Tank
  • 1,569
  • 10
  • 23
0

I am trying to add a hidden field using html code

var myvar = new Ext.Container({
items : [ 
      {
      xtype : 'component', 
      html  :'<input type="hidden" name="" value="" id="" >'
     }]
});
Sudip Pal
  • 2,041
  • 1
  • 13
  • 16
0

Sencha uses javascript so you can simply declare a global variable and use it as a hidden field...

Ram G Athreya
  • 4,892
  • 6
  • 25
  • 57