We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    This is an auto-generated topic for SPForm 3.1.5-beta1 by bobray.

    Brief Description:

    Features

    • MODx Revolution compatible
    • No email addresses on the screen or in the page source
    • Multiple, configurable, spam-proofing options
    • Full documentation on all options
    • Easily editable drop-down list of recipients
    • Relatively easy to install and configure
    • Easily ban individual spammers, domain names, or IP addresses
    • Send mail with phpMailer using mail() or authenticated SMTP
    • Multi-language support

    Options - Each can easily be turned on or off

    • Require keyboard and/or mouse activity
    • Time users and set minimum and maximum times allowed to submit the form
    • Present CAPTCHA-style image verification
    • Present a simple random math problem as an image and ask the user to solve it
    • Use an invisible (but not hidden) field that autobots will get caught filling
    • Require name, subject, email
    • Set maximum length of subject and recipient
    • Add subject prefix to message subject field
    • cc all messages to a specified address (in addition to recipient)
    • Set maximum number of http links in message
    • Restrict the use of the form to certain domains
    • Report remote host, user, address, identity, and referrer in msg headers
    • Disallow blank referrer
    • Reject messages with fake referrer set to self
    • Require messages to be sent from one's own server
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 17481
      • 5 Posts
      Hey, I installed the SPForm 3.1.5 Plugin recently on Rev 2.0.7 and was very happy with it. It’s nice and easy to install. I really like it!

      But during the tests some people don’t get the response page after submitting the form. They aren’t forwarded, the adress bar still shows the URL of the page the form was sent from while the page stays blank.

      I tried to reproduce the error and got also blank pages from time to time. I tried to get more information by using the debug mode outputs, checked the ResponseIDs, the returned ResponseURL and everything looks right. I wasn’t able to figure out the circumstances that lead to the error at all.

      So, if someone got an idea where I should start looking from here…

      Thanks in advance!
        • 3749
        • 24,544 Posts
        Quote from: LorGG at Feb 16, 2011, 10:13 AM

        Hey, I installed the SPForm 3.1.5 Plugin recently on Rev 2.0.7 and was very happy with it. It’s nice and easy to install. I really like it!

        But during the tests some people don’t get the response page after submitting the form. They aren’t forwarded, the adress bar still shows the URL of the page the form was sent from while the page stays blank.

        I tried to reproduce the error and got also blank pages from time to time. I tried to get more information by using the debug mode outputs, checked the ResponseIDs, the returned ResponseURL and everything looks right. I wasn’t able to figure out the circumstances that lead to the error at all.

        So, if someone got an idea where I should start looking from here…

        Thanks in advance!

        It seems to me that a number of people have been having trouble (me too) with makeURL() and sendForward() in MODx 2.0.7. That code has not changed in SPForm, but I’ve heard other reports similar to yours. I wonder if some issue was created with the introduction of context-sensitive URLS. I’m not sure when that happened.

        The only things I can suggest are turning off the forward to the thank you page or changing the code to forward using index.php?id=## rather than MakeURL.

        I had to use this code for the forward() function in NewsPublisher:

                    $controller = $this->modx->getOption('request_controller',null,'index.php');
                    $goToUrl = $controller . '?id=' . $postId;
                    $this->modx->sendRedirect($goToUrl);


        (in your case, $postId would be the ID of the Thank You page.)
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 17481
          • 5 Posts
          Thank you for the fast response, Bob. I tried your code snippet and got a blank page the second time I tested it. Strange.
          I replaced the sendRedirect line with a
          header('Location: '.$responseURL);
          to see if it definitely is a sendRedirect prob or not.
          Seems to work for me. But I’m still waiting for feedbacks from the guys who experienced the error every time they submitted the form.
            • 17481
            • 5 Posts
            Ok, it’s not a sendRedirect issue. The blank page still appears and the e-mail isn’t sent at all. So the error happens before the redirect.
            I tried test mode, sending by mail() as well as SMTP. So it doesn’t seem to be a mail problem.

            It weired because I get the error very randomly. The other guy gets it every time. There are to main differences between him and me: he’s testing it on Windows/IE (but I don’t think this could be a client side thing?) and me on Mac/FF&Safari. And I’m accessing the manager as an admin and he doesn’t. But as my colleagues aren‘t logged in and don’t get the error that frequently either, I guess it’s not a user rights problem.

            Any further ideas?
              • 17481
              • 5 Posts
              Ok, forget about it. I think he just filled the form faster than the userTimer allowed.
              That’s also a way to keep people from working. wink
                • 17481
                • 5 Posts
                Nope, it wasn’t the timer. Actually this one of the spam protections stops the guy:
                    if ($this->modx->getOption('useHiddenField',$this->spfconfig,true)) {
                
                        if(!(empty($_POST['Last__Name']))) {  /* probable spammer filled the hidden field */
                            if ($this->modx->getOption('logOnHidden',$this->spfconfig,false)) {
                               $this->modx->log(modX::LOG_LEVEL_ERROR,$this->modx->lexicon('last-name'));
                            }
                            if ($this->modx->getOption('warnHiddenField',$this->spfconfig,false) || $warnAll) {
                                $this->_errors[] = $this->modx->lexicon('last-name');
                            } else {
                                exit; /* die quietly  */
                            }
                        }
                    }

                No idea why the hidden field is a problem here.

                BTW: The back link generated at the Thank You page isn’t working properly on a multilingual setup using Babel. Mixes languages and pages. I added a takeMeBackTo TV passed to the snippet via an additional property to set a fix page to return to.

                My colleague is still reporting probs because of the timer thing, too. I’ve set it to 2 seconds. There’s also something not working the way it should. No idea why. I deactivated timer and hidden field and it works for now.
                  • 3749
                  • 24,544 Posts
                  The blank page is definitely an anti-spam issue. If you turn on &warnAll, they’ll get a message telling them what went wrong instead of a blank page.

                  The blank field might get filled in if they use any autofill program like RoboForm or one built in to the browser to enter their name and email. You might get around that by changing the name of the field from last__name to something else (or leaving that option off).

                  I guess the timer might goof up with certain JavaScript security options. At any rate &warnAll should tell you exactly what it is.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 8761
                    • 4 Posts
                    Hi
                    If I turn WarnAll on I have this message in return...
                    Illegal content in message:



                    Luca
                      • 3749
                      • 24,544 Posts
                      Does this happen if you send a plain text message like "Hello, this is my message" ?
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting