PDA

View Full Version : dynamically build up form



Roderik
3 Jul 2011, 6:42 PM
Hi,

What I try to accomplish is to extend a formpanel and pass an id. Based on this id it will use a callback to fetch witch fields should be generated in the form.
I have been googling a lot to find examples. I hope someone can put me a bit into the right direction.
What I want is php to return the form configuration (the fields, field ids, xtypes) for the items. What I can not find is how I can call the php and load it into a form panel.
Any help is welcome.

Much thanks,

Roderik

skirtle
5 Jul 2011, 12:43 PM
Is it not just an Ext.Ajax.request() call to the php, then decode the JSON and add the items to the form? The code could be either inside your form class (perhaps in initComponent()) or external to it, depending on what makes sense for your app.