View Full Version : Adding form fields from database

3 Aug 2009, 11:57 PM
I store a bunch of columns and their values in a database so when it's decided on what new meta data to collect, I can just add the name of a column and it's value in different tables.

I am trying to migrate a current admin panel into extjs. Say I have 3 field types, a label, text input, and a checkbox. Currently, there are 6 iterations of this combo, but if I add another entry into the db, there will be 7. I would like it to dynamically show all 7 at that point.

Is there something already built in that would create these 3 things on the fly based on the response from the db? I already have the backend worked out, just wondering how I would loop through the data creating a label, text input and checkbox.

Hope this makes sense.

4 Aug 2009, 1:31 AM
check out JorisA's autogrid : http://extjs.com/forum/showthread.php?t=10951

or write some server side functions to iterate your datasets and create appropriate config.

6 Aug 2009, 12:27 AM
Saki's Ext.ux.MetaForm