We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39273
    • 61 Posts
    I've searched for this but always come up with results on how to create multiple select boxes which are related to the prior selection. That is NOT what I am looking for.

    Example: When you create a ModX Resource, you have the template selectbox. When you click on the dropdown, it is dynamically populated using ajax (I assume). I have a project I am working on and instead of the overhead of loading all the data at first, I would like to do what ModX does and only provide the options for the selectbox when the user clicks on the field.

    I've somewhat looked at the source for ModX but wasn't really able to figure it out.

    Is there a tutorial somewhere on how to create dynamic dropdown boxes similar to ModX backend (like the template selection box)?
      • 18608
      • 112 Posts
      Assuming it's frontend you want the select box, you can take a look at this stackoverflow question and answer: http://stackoverflow.com/questions/17367332/using-ajax-to-populate-a-select-box

      If it's in the manager you need to be more familiar with ExtJs than I am...
        Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang