PDA

View Full Version : New Form Tutorial



slacker775
22 May 2007, 12:03 PM
I just noticed the new form tutorial and wonder if it may not be making things harder than they need to be. It seems that it's creating the data store and using to load the data and manually populating the form fields with it. What I've done with my forms is just call the forms load() method, passing the params necessary to select the appropriate record and it populates my fields for me:



client_list.on('click', function(view, selections) {
Ext.get('client-form').show();
var data = client_list.getNodeData(selections);
clientid = data.clientid;
client_form.load({
params: { action: 'get', clientid: clientid }
});
delete_btn.enable();
}, this);

var client_form = new Ext.form.Form({
labelAlign: 'right',
labelWidth: 75,
buttonAlign: 'center',
url: 'doClient.php'
});


For a typical form usage, wouldn't this be the preferred method, if not certainly the easiest?

davidd
1 Jul 2007, 1:02 PM
Have you got an example you cold show?
Or at least a screen shot of the form being built dynamically from the results from the server?

Thanks

David...