We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7231
    • 4,205 Posts
    Sounds like a mod-security issue. See this for some help:
    http://wiki.modxcms.com/index.php/What_is_mod_security_and_how_does_it_affect_me
      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

      Something is happening here, but you don't know what it is.
      Do you, Mr. Jones? - [bob dylan]
      • 3749
      • 24,544 Posts
      I’ve never seen that one and I can’t imagine what would cause it unless dev_cw is right about modx_security.

      Have you tried leaving the code in the files and just putting an "include" line in the snippet as described in the SPForm readme.txt file?

      What happpens when you try to create a simple new snippet (<?php echo ’hello world’; >) ?
        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
        • 16183
        • 1,390 Posts
        Bob,

        SPForm 3.0.9 beta for Revo still has: "Features: * MODx 0.9.7 compatible" in the more info pane in the Package Retriever. wink

        cheers/k
          • 3749
          • 24,544 Posts
          Quote from: kongondo at Jul 23, 2009, 06:15 AM

          Bob,

          SPForm 3.0.9 beta for Revo still has: "Features: * MODx 0.9.7 compatible" in the more info pane in the Package Retriever. wink

          cheers/k

          Thanks for letting me know. . .

          Well, I think it IS 0.9.7 compatible. wink

          There’s no easy way for me to fix it, since I don’t have access to that repository.
            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
            • 16183
            • 1,390 Posts
            Quote from: BobRay at Jul 23, 2009, 07:28 PM

            Quote from: kongondo at Jul 23, 2009, 06:15 AM

            Bob,

            SPForm 3.0.9 beta for Revo still has: "Features: * MODx 0.9.7 compatible" in the more info pane in the Package Retriever. wink

            cheers/k

            Thanks for letting me know. . .

            Well, I think it IS 0.9.7 compatible. wink


            True laugh...no probs..

            cheers/k
              • 15001
              • 697 Posts
              Bob,

              Thanks a lot, the installation and config was really easy thanks to the well-done tutorial and the many comments in the source files. I liked the fact that useful infos are well mixed with the corresponding source code lines.

              Two questions:

              1) The drop list always starts with a blank <option>. Is there some hack to remove this blank option ?

              2) Bob, would something like [!SPForm &selectedItem=`3` !] be hard to implement for you who is the most familiar with the SPForm source code ?

              I mean it would be very useful if one could select the correct default "destination address" in each call of SPForm.

              As long as I know, SPFrom currently doesn’t accept arguments...

              Thanks for your answer.

              Jul
                • 3749
                • 24,544 Posts
                Quote from: Jul at Sep 14, 2009, 12:10 PM

                Bob,

                Thanks a lot, the installation and config was really easy thanks to the well-done tutorial and the many comments in the source files. I liked the fact that useful infos are well mixed with the corresponding source code lines.

                Two questions:

                1) The drop list always starts with a blank <option>. Is there some hack to remove this blank option ?

                2) Bob, would something like [!SPForm &selectedItem=`3` !] be hard to implement for you who is the most familiar with the SPForm source code ?

                I mean it would be very useful if one could select the correct default "destination address" in each call of SPForm.

                As long as I know, SPFrom currently doesn’t accept arguments...

                Thanks for your answer.

                Jul

                The drop-down list shouldn’t have any blank lines. It’s based on your contacts.inc.cfg file. Make sure that the only uncommented lines in that file are actual addresses and that each line is in this form:

                Webmaster: Webmaster: [email protected]


                As for the selection using a &selectedItem parameter, this should do it:

                Find this code around line 207 in spform.inc.php:

                if(strtolower($key) == $selected)
                                    print("selected ");

                Change it to:

                if(strtolower($key) == strtolower($selectedItem))
                                    print("selected ");


                Note that the &selectedItem parameter must contain the name of the default recipient (the first item in the contacts file line), not a number.

                smiley
                  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
                  OK, I redid the code to make this more flexible. SPForm 1.0.5 (for MODx Evolution and earlier) is available here: http://bobsguides.com/spform-tutorial.html

                  You can now specify the default recipient in the drop-down list in either the snippet call or the link to the contact form. Assuming that your contact form has the ID 12:

                  With Friendly URLs:
                  <a href = "[~12~]?selected=Webmaster">Contact</a>


                  Without Friendly URLs:
                  <a href = "[~12~]&selected=Webmaster">Contact</a>


                  In the snippet call:
                  [!SPForm? &selectedItem=`Webmaster`!]


                  Note that it is "selected" in the link but "&selectedItem" in the snippet call.

                    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
                    • 15001
                    • 697 Posts
                    Hi Bob,

                    Thanks a lot for the 1.0.5 version. I’m sorry to answer so late.
                    I upgraded only spfconfig.cfg.php since other files were already configured.

                    I still have a problem of blank lines, despite the contacts.cfg.php seems OK.
                    The contact.cfg.php file looks like this.
                    # Lot of lines
                    # which all are
                    # comments.
                    this:I want this: [email protected]
                    that:I want that: [email protected]
                    other:I want something else: [email protected]

                    As you can see, I there are 3 reasons to write an email but only two addresses.

                    The form looks like this.


                    Thanks in advance.

                    Julien
                      • 3749
                      • 24,544 Posts
                      I’ve never seen that. Try removing the comment lines. If that doesn’t work, try creating a new file and typing (not pasting) in the three lines you want, there may be something odd in the file itself.
                        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