We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6310
    • 16 Posts
    Quote from: sottwell at Jan 28, 2011, 12:32 PM

    Put it wherever you want; just make sure that it’s linked to correctly. Relative paths or URLs will be relative to the index.php file.

    So then I would want to make sure the file path is correct in the action="contact.php" part of the code?

    <div id="ContactForm">
    
    				<div id="message"></div>
    
    				<form method="post" action="contact.php" id="contactform">  
    				<fieldset>                      
    				<legend>ContactForm</legend>


    If I put it in the assets folder, it would then look like this:

    <div id="ContactForm">
    
    				<div id="message"></div>
    
    				<form method="post" action="/assets/contact.php" id="contactform">  
    				<fieldset>                      
    				<legend>ContactForm</legend>


    Correct?


      • 3749
      • 24,544 Posts
      I’m afraid you can’t do that in MODx. Any PHP code will have to go in a snippet.

      If you’re just looking for a simple contact form, you might checkout the SPForm snippet, which will create one for you.

      If you need a more complex form, eForm in MODx Evolution and FormIt in MODx Revolution are good tools to build a form with.
        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
        • 6310
        • 16 Posts
        so I totally over thought the contact form, and it’s kind of working now. It’s sending the mail, but I’m getting an error:

        Here’s a screenshot of the error I’m getting:



        Any ideas?

          • 3749
          • 24,544 Posts
          This might be the issue: http://modxcms.com/forums/index.php/topic,54348.msg314110.html#msg314110

          What Version of Modx are you using?
            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
            • 6310
            • 16 Posts
            Quote from: BobRay at Jan 31, 2011, 01:13 PM

            This might be the issue: http://modxcms.com/forums/index.php/topic,54348.msg314110.html#msg314110

            What Version of Modx are you using?

            I’m using MODx Revolution 2.0.6-pl2 (traditional)

            So I logged into GoDaddy and updated a field in their content tabs titled "Form Mail" which stated:

            "Verify the E-mail Address for Your Form-Mailer (Linux)

            Please verify the e-mail address that you want to use with the form-mailer.

            To use this e-mail address, click Update.

            To change this e-mail address, click Edit."

            Hopefully this will do the trick. But I’m assuming what you’re telling me is the problem is on the hosting side - correct? I’ll post back and let you know if this did the trick.

            Thanks again for all your help. .

            K
              • 3749
              • 24,544 Posts
              It may be the host, or it may be a problem with your code.

              The best way to check is to download the QuickEmail package through Package Manager. It’s *very* simple to use and will quickly tell you if there’s a problem with the host regarding email.

              If QuickEmail works, you could also try the SPForm package which provides a simple contact form that should work as soon as it’s installed.
                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
                • 6310
                • 16 Posts
                Quote from: BobRay at Jan 31, 2011, 11:05 PM

                It may be the host, or it may be a problem with your code.

                The best way to check is to download the QuickEmail package through Package Manager. It’s *very* simple to use and will quickly tell you if there’s a problem with the host regarding email.

                If QuickEmail works, you could also try the SPForm package which provides a simple contact form that should work as soon as it’s installed.

                It must be the hosting company (GoDaddy) and it’s the last site I’ll be using them for. I actually used the SPForm. I just followed your tutorial, created it and tossed in the snippet. This is why I think it has to do with the hosting. I know the contact form should be good, and I’ve seen other people having the same issue. When I Googled the error and Go Daddy I got a ton threads but no real answers.

                I’m going to email them (Go Daddy) and see what they say.

                K
                  • 3749
                  • 24,544 Posts
                  You can always use the MODx SMTP system settings with an account somewhere else (e.g. Gmail). That way the host is pretty much out of the picture.
                    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
                    • 6310
                    • 16 Posts
                    I would prefer that way. Is there any documentation on how to do that?

                    K

                    *update*

                    reading your tutorial right now on how to do this. . .

                    *update*

                    put in my gmail settings and got this error:



                    Here are the settings I used:



                    I’m quickly running out of ideas on how to get this done.


                    Thanks,

                    K
                      • 3749
                      • 24,544 Posts
                      Try clearing the site cache and your browser cache and cookies -- then clear all sessions and log back in. The old system settings are stored in the site cache.

                      If that doesn’t work, try manually deleting the files in the core/cache directory (except .gitignore, if it’s there).
                        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