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

Answered FormIt help

  • We're just trying to find a way to handle two forms on the same page. It appears that your two FormIt calls were conflicting, so it was worth a try just having the forms themselves on page 1, with each having a different action attribute submitting to a different page with just the FormIt snippet for that form (pages 2 and 3).
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 40088
      • 708 Posts
      Quote from: sottwell at Sep 20, 2012, 09:02 PM
      We're just trying to find a way to handle two forms on the same page. It appears that your two FormIt calls were conflicting, so it was worth a try just having the forms themselves on page 1, with each having a different action attribute submitting to a different page with just the FormIt snippet for that form (pages 2 and 3).

      Ah, ok. Thank you.

      Has anyone gotten 2 or more forms on the same page to work? If so could you post the code (Snippet call and form)? Clearly my Snippets are conflicting in some way and since no one has spotted any code errors (yet) I would really like to get this sorted by any means.

      Thanks
        Todd
      • discuss.answer
        Have you tried to make the second form work by itself? I did, copy/pasted from your first post, and found that while in the snippet validate property you have "email:email:required", there is no "email" field in the form. The mailAd field also is mis-named; in the form it's just "mailing".

        As it says in the official documentation,

        A common error here is with validation. Try removing the &validation portion of the Snippet to see if that fixes the form. If it does, then you know that's where your problem is. A common error occurs when the validation rules reference the incorrect field names. For example, if you've changed the field names from what they were in the example, you must also change the field names used in the validation rules.

        http://rtfm.modx.com/display/ADDON/FormIt.Tutorials+and+Examples
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
        • discuss.answer
          • 40088
          • 708 Posts
          Quote from: sottwell at Sep 21, 2012, 05:28 AM
          Have you tried to make the second form work by itself? I did, copy/pasted from your first post, and found that while in the snippet validate property you have "email:email:required", there is no "email" field in the form. The mailAd field also is mis-named; in the form it's just "mailing".

          Well-spotted Susan. Aside from some issues with the received email both forms now appear to be working. [crosses fingers it stays that way]

          Thank you.
            Todd