We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24624
    • 8 Posts
    Maybe this is a dumb question, but how do you put a dropdown in your page? Here’s what I need:

    A select dropdown called year, that populates from a db table, i.e. @select distinct year from table.
    Simple, but I don’t see how to do it in MODx unless I handwrite all the code. If I’m gonna do that, what’s MODx good for? I was expecting a gadget like a TV or whatever [*yearpicker*] and inside that it has the @select and there it is.

    Then, I want a table below that which displays @select * from table where year=$year. Looking at the DataGrid TV, I can’t figure out first how to pass in ANY variables like the $year...and additionally, how do I make it specifically pull the selected value from the yearpicker above, and refresh when that’s changed?

    Like I say, I can write this in raw php just fine, but you know how tedious that is. What is the MODx Way? tia