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

    I created a simple submit form that takes in one test variable on one page and it is supposed to route to the proper landing page docid of 69.

    <form method="get" action="[~69~]">
    <input class="search_text" name="q" type="text" />
    <input type="submit" name="sub" value="search" />
    </form>
    


    However, everytime I submit this form it results in a 404 error. The url appears correct in the address bar. And even stranger is I can type in the url in a browser and get to the results page without going through the form process. I’m thinking something must be messed up in our SEF url set up.

    Does anyone have any thoughts?
      • 22303 MODX Staff
      • 10,725 Posts
      The problem is the name of the POST variable in your form. ’q’ is reserved in MODx, and is the parameter it looks for to find a document by alias. This is causing MODx to think you are looking for a page with an alias that matches whatever is submitted in the form field with name="q".
        • 10896
        • 76 Posts
        I changed the form field name and it’s working now.

        Thanks!!

        smiley