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
    Quote from: Terry at May 18, 2009, 07:00 PM

    Bob

    Wow! Impressive! Works perfectly.

    Thank you so much for the excellent and fast response!

    Terry

    I’m glad it worked for you. smiley Sorry that the "take me back" link no longer works.
      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
      • 4419
      • 2 Posts
      Quote from: tanmccuin at Dec 22, 2008, 10:33 PM

      Great tutorial, unfortunatly on submission i get this:

      There were problems with your submission.

      This may be through no fault of your own and is probably not immediately correctable.
      Please come back and try again later

      --------------------

      and no email is delivered.

      i use bluehost for hosting, do i need to configure something so my mail send works?

      I get this too, but only after hitting refresh from a 404page (with the correct url and page ID), I am on bluehost too and the $formProcAllowedReferers have my actual domain filled out - what i can add is that I get a parse error on the spformproc preview in the modx manager...

      « PHP Parse Error »

      PHP error debug
      Error: fopen() [function.fopen]: Filename cannot be empty
      Error type/ Nr.: Warning - 2
      File: /home4/mymaindomain/public_html/myre-directeddomain/assets/snippets/spform/spformproc.inc.php
      Line: 212
      Line 212 source: if($fp = @fopen($banListFile, "r")) {

      Any ideas - this has me stumped - would it have anything to do with the banlist file - I haven’t edited it and it had a default example IP address 0.0.0.0 uncommented. Or could it be that this is on a ADDON domain and I have incorrectly listed it in my refers list?

      BTW - I think this MODX snippet has the most clear and comprehensive instructions, I would feel terrible if I had missed something
        • 3749
        • 24,544 Posts
        Quote from: byword at May 23, 2009, 08:15 PM


        « PHP Parse Error »
        PHP error debug
        Error: fopen() [function.fopen]: Filename cannot be empty
        Error type/ Nr.: Warning - 2
        File: /home4/mymaindomain/public_html/myre-directeddomain/assets/snippets/spform/spformproc.inc.php
        Line: 212
        Line 212 source: if($fp = @fopen($banListFile, "r")) {

        Any ideas - this has me stumped - would it have anything to do with the banlist file - I haven’t edited it and it had a default example IP address 0.0.0.0 uncommented. Or could it be that this is on a ADDON domain and I have incorrectly listed it in my refers list?

        BTW - I think this MODX snippet has the most clear and comprehensive instructions, I would feel terrible if I had missed something

        I had this happen to me on Bluehost as well. The variable $banListFile is losing its value somehow. There are a couple of solutions:

        1. If you’re not using the banlist, just comment out the following code:

        // Get the banList
        /* if($fp = @fopen($banListFile, "r")) {
        while($inString = read_file_line($fp))
        $banList[] = $inString;
        fclose($fp);
        } */

        2. If you’re using the banlist, hardcode the path to the banlist file just after the // Get the banList line:

        // Get the banList
        $banListFile = 'path_to_banlist_file';


        3. If you want to do it right (portability wise), make $banListFile a third argument to the check_banlist() function on lines 202 and 394 and remove $banListFile from the list of globals on line 204.

        Sorry about the trouble.

          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
          • 29525
          • 388 Posts
          Working on a new site now. Have installed spform. Works great!

          How do I disable the take me back link? I’d like just a simple thank you message. Is there a parameter or config line somewhere? I’ve looked all over, haven’t found it yet.

          Thank you!
            www.terrybarthdesign.com
            • 3749
            • 24,544 Posts
            Quote from: Terry at May 30, 2009, 04:52 PM

            Working on a new site now. Have installed spform. Works great!

            How do I disable the take me back link? I’d like just a simple thank you message. Is there a parameter or config line somewhere? I’ve looked all over, haven’t found it yet.

            Thank you!

            There’s no parameter for that but just change the contents of your spfResponse document to this (or whatever you want it to say):


            	<div id="spf_response">
            	<h3>Thank you for your response!</h3>
            	</div>
              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
              • 29525
              • 388 Posts
              Got it! Thank you!
                www.terrybarthdesign.com
                • 29525
                • 388 Posts
                Using SPForm on yet another site!

                Is there any reason why this would not work with GoDaddy host? It’s not my choice to use this host but . . . SPForm isn’t sending out any email.

                Godaddy support tells me I need to add this to the contact form
                # Create a Web form, assigning unique names to your form fields.
                # In the form tag, assign /webformmailer.php to the action attribute and set the form method to post:
                
                <form action="/webformmailer.php" method="post">
                


                But I’m not sure how to apply this or if this is the correct way to address this. I tried inserting their action into spform.inc.php by replacing
                $spformProcURL = $modx->makeUrl($spformProcID,'','','full');
                echo '<form action="'.$spformProcURL.'" method="post">';

                with this
                $spformProcURL = $modx->makeUrl($spformProcID,'','','full');
                echo '<form action="/webformmailer.php" method="post">';

                no effect.

                contacts.cfg.php contains:
                #Please choose a recipient: Please choose a recipient:
                #WebMaster: Webmaster: [email protected]
                email: RedDogRun: [email protected]


                spfconfig.cfg.php contains:
                $formProcAllowedReferers = array(
                    'reddogrun.com','www.reddogrun.com',
                	'localhost'
                );
                
                $spformProcID = 57;  // Doc ID of spformproc page
                $spfResponseID = 58; // Doc ID of spfresponse page
                
                // Whom to email regarding errors and such-like?  A space-comma-delimited
                // list of email addresses.
                $errorsTo = "[email protected]";
                
                 $spfUseSMTP= false; 
                


                Thoughts?
                  www.terrybarthdesign.com
                  • 3749
                  • 24,544 Posts
                  That definitely won’t work (as you’ve found). wink

                  The data from spform has to be passed to spformproc. The modifications would have to be made to sprormproc.php which actually sends the mail.

                  My first thought, though, would be to configure SPForm to use SMTP with some SMTP account you have on any server. That should bypass everything the host is throwing in your way.

                  Bob
                    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
                    • 3749
                    • 24,544 Posts
                    SPForm Version 1.0.4 is now available (see the message at the top of this thread). It fixes a bug with $banListFile that occurs with some combinations of PHP/MySQL.

                    Bob
                      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
                      • 29673
                      • 4 Posts
                      Hi Bob. I would love to give you some feedback on the snippet, but unfortunately whenever I try to create them from spform.inc.php, spformproc.inc.php and spfresponse.inc.php and hit "Save", I get the following screen:

                      Service Temporarily Unavailable

                      The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

                      This ONLY happens when I try to copy the php code for the snippets and save them. I can edit all other snippets, templates, etc w/o a problem. Any ideas?