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: Jul at Oct 17, 2009, 04:17 PM

    Thanks. That’s interesting.

    Maybe a simple approach could be updating a chunk storing the "Submit from" document id when the form is posted and read that chunk from the "Thank you" page.

    I did not check, but I think it should be possible with MODx’s API.
    Not very important for me; just an idea for future versions.

    Unfortunatly, that would store the ID of the contact form, which we can assume the user doesn’t want to go back to. wink In theory, the page before that one is stored in HTTP_REFERER.

    And it would only work if you only have one user who ever visits your site. wink
    Not so much when there are multiple users coming from different pages.
      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
      I’m using SPForm on a new site. (I love SPForm. I use it all the time!) I have limited space and would like to position the input field under the labels rather than after them on the same line.

      Where is this form layout controlled?

      Thank you!
        www.terrybarthdesign.com
        • 3749
        • 24,544 Posts
        Quote from: Terry at Nov 23, 2009, 05:03 PM

        I’m using SPForm on a new site. (I love SPForm. I use it all the time!) I have limited space and would like to position the input field under the labels rather than after them on the same line.

        Where is this form layout controlled?

        Thank you!

        I’m away from my computer so I can’t give you the exact format, but it’s basically a matter of setting display:block instead of display:inline for the input fields in the CSS file.

        In the Revolution version, you can just change "inline" to "block" in the class names in the SPForm Tpl Chunk. I can’t remember if that will work in the Evolution version.
          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
          Perfect! Exactly what I needed. Thanks!
            www.terrybarthdesign.com
            • 32393
            • 29 Posts
            My referrer url has a trailing slash, which of course causes the user to be directed back to an error page. It looks like: mysite.com/where-they-came-from\

            How do I get rid of that slash? I haven’t modified the code at all.
              • 3749
              • 24,544 Posts
              Quote from: wilcosky at Dec 06, 2009, 07:32 AM

              My referrer url has a trailing slash, which of course causes the user to be directed back to an error page. It looks like: mysite.com/where-they-came-from\

              How do I get rid of that slash? I haven’t modified the code at all.

              For the trailing slash, try changing this line in spfresponse.inc.php (in the assets/snippet/spform dir)

              from:

              $originalReferer = urldecode($_GET['OrigRef']);


              to

              $originalReferer = $_GET['OrigRef'];


              If that doesn’t work, you’ll need to play with the code at the end of spformproc.inc.php that’s supposed to strip that slash.

              Turn SPForm’s debug on and try changing the -3 to -4 and see what you get.

                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
                I’m also getting this error:
                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.


                I’ve verified my config file.
                $formProcAllowedReferers = array(
                    'http://www.lastcallproduction.com/','www.lastcallproduction.com/'
                );


                I’m using - Modx: 1.0.2 on Hostgator

                What else can I check?
                  www.terrybarthdesign.com
                  • 32393
                  • 29 Posts
                  Quote from: BobRay at Dec 06, 2009, 11:04 PM

                  Quote from: wilcosky at Dec 06, 2009, 07:32 AM

                  My referrer url has a trailing slash, which of course causes the user to be directed back to an error page. It looks like: mysite.com/where-they-came-from\

                  How do I get rid of that slash? I haven’t modified the code at all.

                  For the trailing slash, try changing this line in spfresponse.inc.php (in the assets/snippet/spform dir)

                  from:

                  $originalReferer = urldecode($_GET['OrigRef']);


                  to

                  $originalReferer = $_GET['OrigRef'];


                  If that doesn’t work, you’ll need to play with the code at the end of spformproc.inc.php that’s supposed to strip that slash.

                  Turn SPForm’s debug on and try changing the -3 to -4 and see what you get.



                  This works! Anyone using 1.0.2 you may have to change the above to remove trailing slash.
                    • 29525
                    • 388 Posts
                    Bump. Any thoughts on 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.

                    Update: Solved. It seems you cannot have a / following the domain name.

                    $formProcAllowedReferers = array(
                        'http://www.lastcallproduction.com/','www.lastcallproduction.com/'
                    );
                      www.terrybarthdesign.com
                      • 3749
                      • 24,544 Posts
                      That makes sense (since it’s not part of the domain name). Glad you got it working.
                        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