Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Apr 2010
    Posts
    4
    Vote Rating
    0
    Sumanth is on a distinguished road

      0  

    Default How to get the fields values in form panel

    How to get the fields values in form panel


    Hi,

    I have a form panel , inside i have some filds , can you please help me in getting the values of all tyhe fields by using their Ids .. I want to validate them in an user defined function.


    Code:
    var simple = new Ext.FormPanel({
            labelWidth:  85,
    
    renderTo:'suman',
            region: 'center',
            frame:true,    
            // monitorValid:true,
            title: 'Tes  Form',
            bodyStyle:'padding:10px 10px 0',
            width: 500,
            height:300,
            defaults: {width: 250},
            defaultType: 'textfield',
    
            items: [{
                    fieldLabel: 'First Name',
                    name: 'first',
                    allowBlank:false
                },
                {
                fieldLabel:'Last Name',
                name:'last',
                
                },
                {
                    fieldLabel: 'Customer Last Name',
                    name: 'last'
                },{
                    fieldLabel: 'Address',
                    name: 'company'
                }, {
                    fieldLabel: 'Email',
                    name: 'email',
                    vtype:'email'
                }, new Ext.form.TimeField({
                    fieldLabel: 'Time',
                    name: 'time',
                    minValue: '8:00am',
                    maxValue: '6:00pm'
                }),{
                xtype: 'datefield',
                fieldLabel: 'Released',
                name: 'released'
                }
            ],
    
            buttons: [{
                text: 'Submit',
                id:'Save'   ,  
    handler : doSwitch,
              
    
            name:'Save'
            },{
                text: 'Cancel'
            },
            {
            text:'Reset',
        handler: function(){simple.getForm().reset()}
            }]
             
        
        });

    Any help much appreciated

  2. #2
    Sencha User ryanyoungsma's Avatar
    Join Date
    Oct 2008
    Location
    Indialantic, FL
    Posts
    66
    Vote Rating
    0
    ryanyoungsma is on a distinguished road

      0  

    Default getForm()

    getForm()


    Use the getForm() method to get the form, then use findField('name') to get the field.

    Code:
    var f = simple.getForm();
    var name = f.findField('name');
    This way does not require you to assign ID's to each form element.
    _____________________________________________
    Ryan Youngsma

  3. #3
    Sencha User tomalex0's Avatar
    Join Date
    Apr 2009
    Location
    San Jose, CA
    Posts
    589
    Vote Rating
    16
    tomalex0 will become famous soon enough

      0  

    Default


    Code:
    simple.getForm().getValues();
    Returns the fields in this form as an object with key/value pairs as they would be submitted using a standard form submit.
    If multiple fields exist with the same name they are returned as an array.

  4. #4
    Ext User
    Join Date
    Apr 2010
    Posts
    4
    Vote Rating
    0
    Sumanth is on a distinguished road

      0  

    Default


    Thanks you very mucg guys appreciate your work and time ... do you have any idea of why my page is not showing ext js components in IE 6

Thread Participants: 2