We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37377
    • 64 Posts
    Hi,

    I've made a custom database with a CMP and now I'm trying to develop a front-end for it. Everything is going great except I'm trying to create a search for it like this:

    <form name="searchform" action="[[++site_url]][[~[[*id]]]]" method="get"/>
    <input type="text" name="searchvalue"/>
    </form>

    This form should redirect me to the same page I'm but it always sends me to /index.php?searchvalue=test instead of /index.php?id=3&searchvalue=test

    Does anyone know how I can pull this off?

    Thanks
      • 4172
      • 5,888 Posts
      Quote from: culd at Dec 07, 2011, 02:53 AM
      Hi,

      I've made a custom database with a CMP and now I'm trying to develop a front-end for it. Everything is going great except I'm trying to create a search for it like this:

      <form name="searchform" action="[[++site_url]][[~[[*id]]]]" method="get"/>
      <input type="text" name="searchvalue"/>
      </form>


      This form should redirect me to the same page I'm but it always sends me to /index.php?searchvalue=test instead of /index.php?id=3&searchvalue=test

      Does anyone know how I can pull this off?

      Thanks

      try without action:

      <form name="searchform" method="get"/>
      <input type="text" name="searchvalue"/>
      </form>

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 37377
        • 64 Posts
        This redirects me to the wrong page as well, but I've found a package called SimpleSearch which should do the trick.
          • 33983 ☆ A M B ☆
          • 181 Posts
          Do this:
              <input name="id" type="hidden" value="[[*id]]" />