We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39085
    • 22 Posts
    Okay. So I have a simple form in a chunk. The chunk is called by a resource and displayed on the page. Perfectly. The form's action refers to another resource that only calls a snippet with the PHP code that processes the form. It sends an email to me and places the info into a db. When I test the form on it's own without putting it in MODX (i.e., a form page referring to a PHP page to do the processing), everything works brilliantly. But when I put it into MODX, it sends the email three times and places three entries into my db.

    ?????

    Thanks. I'm using MODX 2.1.5
      • 39085
      • 22 Posts
      I did some more testing...

      If I keep everything as is, except that I point the action of the form to an outside page with the exact same code as the snippet, it only processes once.

      So I guess I could create a PHP page in the root to do the processing and then somehow redirect the "Thank you message" back to a MODX resource so that it fits within the confines of the site.

      Does this sound right?