We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11668
    • 14 Posts
    No need to say I’m a newbee to MODx - what follows should make that quite clear rolleyes

    I am trying to get a basic contact mailform to work using http://wiki.modxcms.com/index.php/EForm#eForm_Forms

    Now I don’t have any problems with the first 2 chunks and actually getting the form to appear, my problem is where the h**l do I put the following ?
    [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]` 
    &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`1`!]
    


    Something is definitely wrong, because if I put the above code in my template or on the contact page it appears as live text on the page huh

    I’ve spent the last 10 hours looking around for a basic set of instructions to put a contact form on a page, and everything I come across is complete techno-babble to me. I am quite cool with xhtml and css despite being a designer and not a developer, I’ve managed to work my way around a php form with validation (took me time though), just to discover it doesn’t work in MODx.

    I am getting really frustrated, because I don’t understand the syntax, and I am near the point where I feel like just handcoding my site and let all CMS bugger off. :’(

    Is there anybody who could provide a simple explanation on eForm or point me to some tutorial perhaps I would be eternally grateful..

    Cheers,

    Hakim

      Hakim
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Do you have eForm installed in the snippets area of the Manager? (Resources -> Manage Resources, Snippets tab) Are you sure it’s using the same name exactly as its used in the snippet call, eForm? You should be able to drop the snippet anywhere you want it to appear.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 3749
        • 24,544 Posts
        Quote from: hakim at Feb 03, 2008, 11:40 AM

        No need to say I’m a newbee to MODx - what follows should make that quite clear rolleyes

        I am trying to get a basic contact mailform to work using http://wiki.modxcms.com/index.php/EForm#eForm_Forms

        Now I don’t have any problems with the first 2 chunks and actually getting the form to appear, my problem is where the h**l do I put the following ?
        [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]` 
        &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`1`!]
        


        Something is definitely wrong, because if I put the above code in my template or on the contact page it appears as live text on the page huh

        I’ve spent the last 10 hours looking around for a basic set of instructions to put a contact form on a page, and everything I come across is complete techno-babble to me. I am quite cool with xhtml and css despite being a designer and not a developer, I’ve managed to work my way around a php form with validation (took me time though), just to discover it doesn’t work in MODx.

        I am getting really frustrated, because I don’t understand the syntax, and I am near the point where I feel like just handcoding my site and let all CMS bugger off. :’(

        Is there anybody who could provide a simple explanation on eForm or point me to some tutorial perhaps I would be eternally grateful..

        Cheers,

        Hakim



        Hakim,


        If all you need is a simple contact form and don’t need the power of eForm, you might look at SPForm: http://modxcms.com/forums/index.php/topic,19357.0.html, which is less complicated to install (IMHO).

        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
          • 11668
          • 14 Posts
          Quote from: sottwell at Feb 03, 2008, 02:35 PM

          Do you have eForm installed in the snippets area of the Manager? (Resources -> Manage Resources, Snippets tab) Are you sure it’s using the same name exactly as its used in the snippet call, eForm? You should be able to drop the snippet anywhere you want it to appear.

          Cheers sottwell,

          I basically followed the instructions to the letter, but I just ended up with the aforementioned code displaying on the page. I did try out another version by TobyL, recreating those chunks found here http://svn.modxcms.com/crucible/browse/~raw,r=9/modx-components/eform/docs/eform_examples.htm#snippetcall That one actually worked out for me! smiley So I can only presume I’ve got everything working in the Manager section.

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

          If all you need is a simple contact form and don’t need the power of eForm, you might look at SPForm: http://modxcms.com/forums/index.php/topic,19357.0.html, which is less complicated to install (IMHO).

          Bob

          Bob, this appears to be exactly the kind of stuff I’ve been looking for. I’ll give this a go smiley

          Thanks again to the both of you wink

          Hakim
            Hakim
            • 4429
            • 429 Posts
            I have exactly the same problem here.

            when calling eForm I just end up with the code printed on my page rather the form itself

            Can anyone help?

              • 28042 ☆ A M B ☆
              • 24,524 Posts
              It’s possible that your parameter list has a line break in it. Some editors will automatically insert a line break if the line extends past the right margin. That’s why I prefer snippets to have a &config=`filename` parameter so you can use a config file if there are a lot of parameters.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org