We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8772
    • 13 Posts
    OK, thanks anyway. To get back on-topic, I reinstalled the snippet, uploading the files, copypasting the relevant code into the manager, and get the same results.

    I think I’m gonna take the form back to what it was when it worked (with no validation) and I’m just gona set validation on one field and start over from there.
      • 8772
      • 13 Posts
      Could this have anything to do with caching? I can’t say I ever understood MODx caching very well. Right now I have everything uncached, all documents, snippets... except for the eform snippet call.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Document cached, eForm uncached is probably the best.

        A cached document is saved to cache file once the main processing is completed; this includes snippet processing. However, uncached snippet tags [! ... !] are converted to cached tags [[ ... ]] and skipped. So the document will be cached with the cached snippet call still unprocessed.

        After this, and also after a cached page is retrieved from cache, it goes through post-processing, which among a few other things includes processing any snippet tags found. So the first time a page is generated, it gets cached with any uncached snippet calls ready for processing, then the post-processing runs the snippets. After that, every time the page is retrieved from cache (like when it’s requested because of the action attribute of the form) it does the post-processing on the page, and runs the snippet.

        That is why nested snippets (with an inner snippet as a value for the outer snippet’s parameter) need to have the outer snippet uncached (so it doesn’t get processed right away) and the inner snippet cached (so it gets processed right away). That way, by the time the post-processing runs the outer snippet, the inner snippet was already run and its value will now be in place for the outer snippet to use for its parameter.

        Of course, Revolution does this all entirely differently, so snippets are parsed and processed in a more useful way, from innermost to outermost in the case of nested snippets.
          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
          • 8772
          • 13 Posts
          OK, so I cached the document and left the snippet uncached.

          SCENARIO 1 (back to basics)
          eForm chunk: has no required fields
          eForm snippet call:
          [!eForm? &formid=`contactForm` &debug=`1` &to=`[email protected]` &from=`[+email+]` &subject=`[+asunto+]` &tpl=`feedbackForm` &report=`feedbackReport` &thankyou=`feedbackThanks`!]

          Results: It shows my thank you chunk and I get the e-mail but: "From: Nobody" and "Subject: 0". That last one is a zero.

          I’ll try with one required text field now.

          SCENARIO 2
          eform chunk: has one required field WITHOUT explicit data type
          <input id="nombre" name="nombre" class="rounded" type="text" value="" eform="Nombre::1" />

          eForm snippet call: As in scenario 1
          Results when filling in the required field and all others: As in scenario 1
          Results when not filling in any field: page reload and debug text shows form ID was sent, no empty field error notice
          Results when filling in all fields EXCEPT the required field: page reload, debug text shows form ID was sent, no empty field error notice, the filled in form inputs are shown with submitted text intact, e-mail message shows properly using report chunk

          SCENARIO 3

          eform chunk: has one required field WITH explicit data type
          <input id="nombre" name="nombre" class="rounded" type="text" value="" eform="Nombre:string:1" />

          eForm snippet call: As in scenario 1
          Results: as in scenario 2
            • 8772
            • 13 Posts
            This was the problem:

            [+validationMessage+] should be [+validationmessage+]

            No camel-casing or you’ll end up camel-chasing. Thats my bad joke for the day.

            Great thanks to zi for his extreme generosity in helping me and also to Susan O. I’m starting to understand what they say is so great about the MODx community.

            Do you two accept any donations? I’ll get ya a couple of beers with my Visa...

            I’m no MODxpert but I’ll also see if I can help anybody else out on the forum in a "Pay it forward" sort of way for the community...
              • 33337
              • 3,975 Posts
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Indeed; I do have a donation button on my site (more for the practice than out of any expectations), but a donation to MODx would make me even happier grin grin
                  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
                  • 8772
                  • 13 Posts
                  Donated. wink