1. #1
    Sencha User Phunky's Avatar
    Join Date
    Jun 2007
    Location
    West Yorkshire
    Posts
    341
    Vote Rating
    0
    Phunky is on a distinguished road

      0  

    Default [HELP] Setting Form Values Dynamicly

    [HELP] Setting Form Values Dynamicly


    I know this questions most likely been answered 1000+ times already but i cant seem to find anything about it through the forum search.

    I have a simple form and wish to change the values of the element when a certain action is triggered.

    Now if i have the following

    Code:
    new Ext.form.FormPanel({
    	id: 'form',
    	title: 'Form Test',
    	items: [{
    		xtype:'fieldset',
    		title: 'Partner Details',
    		collapsible: true,
    		autoHeight:true,
    		defaults: {width:250},
    		defaultType: 'textfield',
    		items :[{
    			fieldLabel: 'Name',
    			disabled: true
    		},{
    			fieldLabel: 'Email',
    			name: 'email'
    		}]
    	}]
    });
    How would i reference Name and Email to set the values? should i really set and ID for both of them so that i can use Ext.getCmp()? or is there a better/simpler way??

    Sorry for such a simple question - i know it terrible, you would have thought i would have caught on by now!

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Use:

    Code:
    Ext.getCmp('form').getForm().findField('email').setValue('name@server.com');

  3. #3
    Sencha User Phunky's Avatar
    Join Date
    Jun 2007
    Location
    West Yorkshire
    Posts
    341
    Vote Rating
    0
    Phunky is on a distinguished road

      0  

    Default


    Aha i thought that the would be some nice way of getting fields!

    Thanks, once again Condor saves the day for me think your going to need a donate button soon!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi