This seems like more of a Dojo question - the ZF component seems fairly easy,
just a matter of getting the table columns from a given table name.

I think you want a dojo.Data-Enabled ComboBox and a
dojox.data.QueryReadStore - the relevant bits of the Dojo manual are:
http://www.dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/form-validation-specialized-input/auto-completer
http://www.dojotoolkit.org/book/book-dojo/part-3-javascript-programming-dojo-and-dijit/using-dojo-data/available-stores/dojox-d

The classic example of this is generating a drop-down list of States from a
drop-down list of countries - when the USA is selected, you get Alabama &
Alaska, but when the UK is selected you get Norfolk & Northamptonshire.  You
can probably find some sample code for this exact thing with a bit of
judicious googling.

Cheers,
Mark



-cab wrote:
> 
> Hello everyone,
> 
> i'm trying to make a database-driven advanced search system with ajax.
> 
> The final form should work like this:
> 
> 
> 1) The user selects from a ComboBox the table of the database in which he
> wants to search.
> 
> 2) Based on the table chosen, different sets of columns will be available.
> In a second Combo, the users selects the column in which he wants to apply
> a filter
> 
> 3) Finally, the user specifies an operator (<, >, =) and the value.
> 
> 
> Points number 1 and 3 are quite easy, even banal i would say. But i cant
> develop number 2.
> 
> I need to run a dynamically real-time generated query, based on what the
> user has chosen, and then use it to populate the ComboBox...
> 
> Any help?
> 
> Thanks!!
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dynamic-form-taking-data-from-a-database-tp23027088p23035195.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to