Hi,
Sorry for my newbie question.

I'm using this to create a form :
Code:
    var formAdd = new Ext.form.Form({
        labelWidth: 100, // label settings here cascade unless overridden
		buttonAlign: 'left',
        url:'index.php?a='+aID+'&id='+modID
    });
      	var agenda_titre = new Ext.form.TextField({
            fieldLabel: 'Titre',
            name: 'titre',
            width:300,
            allowBlank:false // validation -> vide non permis
        });


	  	 var agenda_duree = new Ext.form.TextField({
            fieldLabel: 'Durée',
            name: 'duree',
            width:300,
			allowBlank:false
        });	
		
	var agenda_date = new Ext.form.DateField({
			fieldLabel: 'Choisissez une date',
			name: 'dateAgenda',
			width:90,
			allowBlank:false,
			format:'Y-m-d'
		});
		

		
        var agenda_cat = new Ext.form.TextField({
            fieldLabel: 'Catégories',
            name: 'cat',
            width:300,
			allowBlank:false
        });
		
        var agenda_lieu = new Ext.form.TextField({
            fieldLabel: 'Lieu',
            name: 'lieu',
            width:300,
			allowBlank:false
        });		

        var agenda_image = new Ext.form.TextField({
            fieldLabel: 'Image',
            name: 'image',
            width:300,
        });	

  	
		formAdd.fieldset(
				{legend:'Ajouter un évènement'},					 
				agenda_titre,
				agenda_date,
				agenda_duree,
				agenda_cat,
				agenda_lieu,
				agenda_image
				
		)

formAdd.render('formAdd');
It works find, but now I want to add near my agenda_image text field a button which will call a none Ext javascript function.

I try to use this code from the 4th exemple of dynamic form exemple :
Code:
  // The form elements are standard HTML elements. By assigning an id (as we did above)
    // we can manipulate them like any other element
    var photo = Ext.get('photo');
    var c = photo.createChild({
        tag:'center', 
        cn: {
            tag:'img',
            src: 'http://extjs.com/forum/image.php?u=2&dateline=1175747336',
            style:'margin-bottom:5px;'
        }
    });
    new Ext.Button(c, {
        text: 'Change Photo'
    });
But I don't undersant how to get the id of Ext/form elements

So my question is how I can put a button in an Ext Form and get his Id and the Id of my agenda_image text field, to link them to an none Ext (custom js) script

Many thanks for your help.