We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27449
    • 211 Posts
    Hello,
    I have 3 dropdown (template variable) that the first have all the continent of the table of the modx database and the second the country and the third all the region.
    What I want it’s when you select one continent, show in the second combobox all the contries of this continent and when you select the country show in the third combobox all the region for the country selected

    How I get the value selected for I update the next template variable(combobox) ?
      • 27449
      • 211 Posts
      How I update the template variable with the last value selected?
      I need to know how I get the value selected huh
      I see this API modx getTemplateVarOutput($idname=array(), $docid="", $published="1");
      but I don’t know how I made
      I have this query: @select country, id_country FROM country WHERE continent=getTemplateVarOutput($idname=array(), $docid="61", $published="1");

      I don’t know if it is correct... but doesn’t work sad

      how I update the next variable with the value selected?
        • 27449
        • 211 Posts
        I do not know if I could explain huh

        I create three template variable of the type DropDown
        The three variable contain values od the database.
        And I want that when you select one value on the first variable (continent), the next variable could show all the values that correspond of the first selection (country) and the same for the thirt variable, when you select a value of the second combobox the third show all the values that correspond of the second selection (region).

        All the values are on the different tables of the database

        How I update automatically the variables?
          • 33337
          • 3,975 Posts
          Zaigham (aka zi) Reply #4, 18 years ago
          I don’t think you can do this unless you write some clever javascript code to manipulate the TV editing screen.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link