We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    I tried that exactly like you had it. (dropdown with same input-options and same tvFilters)
    It should work and it worked.
    I would try it again.
    Perhaps you had a cache-issue or something.
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 23178
      • 22 Posts
      Hmmmm... you are absolutely right. Awesome!

      Ok so one more quick question. I am trying to just make a quick form for this bit that passes values for another form on another page. I couldn’t get it working so just as a quick test I tried either separately. Is there a obvious reason I can just set up forms like normal?

      <form method="get" action="[[~7]]">
      	<input type="text" name="var" />
          <input type="submit" />
      </form>
      <form method="POST" action="[[~7]]">
      	<input type="text" name="var" />
          <input type="submit" />
      </form>

      and then a snippet on the other page
         $var = $_GET['var'];
      	echo $var;
      	$var = $_POST['var'];
      	echo $var;

      I saw in another post where it was suggested to pass the get values as:
      <form action="[[~7]]?&var=`test`">

      but that didn’t work out either. Post doesn’t seem to get passed and the get url contains none of my values.
      Ok that should be my last question wink Thanks again for the help.
        • 3749
        • 24,544 Posts
        Try using id= in addition to name=

        Also, "var" is a reserved word in PHP.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 23178
          • 22 Posts
          Ok so I feel a bit stupid.... yes changing the var name solved the post issue. Thank you. So using GET is not needed to what I am doing, but just for the sake of knowing I tried everything I could think of. I wasn’t exactly sure how or where you intended me to put the &id=7.
          <form method="get" action="&id=7&myVar=testVar">
              <input type="submit" />
          </form>
          

          gives me /&id=7&myVar=testVar
          <form method="get" action="[[~7]]&id=7&myVar=testVar">
              <input type="submit" />
          </form>
          

          gives me /index.php
          <form method="get" action="[[++site_url]]index.php?&id=7&myVar=testVar">
              <input type="submit" />
          </form>
          

          gives me /index.php
          <form method="get" action="[[~7]]">
            <input type="text" name="myVar" />
             <input type="submit" />
          </form>
          

          That redirects to the index as such /index.php?myVar=test
          <form method="get" action="[[~7]]&myVar=testVar">
              <input type="submit" />
          </form>

          gives me /index.php

            • 3749
            • 24,544 Posts
            Sorry, I meant this:

            <input type="text" name="somevar" id="somevar" />


            AFAIK, the "id" attribute is now the proper form and "name" is there for reverse compatibility and CSS references.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 22303 MODX Staff
              • 10,725 Posts
              Your action should be [[~7? &myVar=`testVar`]]
                • 23178
                • 22 Posts
                Thanks guys,

                That was the format I needed [[~7? &myVar=`testVar`]] GET correctly passes the vars now. Very helpful for future needs.Thanks again.