We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23299
    • 1,161 Posts
    I am just starting with eForm.

    I found a bewildering choice of options. So just to get started I followed the eForm Examples and created the basic chunks for eFeedBackForm, eFeedbackReport and eFeedBackThanks. I used the same snippet call in the example but changed the email link to my actual desired email.

    The email form works on the page. If you fill out the fields and CAPTCHA box it looks like it sends.

    But instead of the ThankYou greeting all I get is this: ’eFeedbackThanks’. The message contained within the chunk don’t show.

    When I go to my email program and retrieve my mail I get the mail from the eForm but the Name field is blank? I get the email address from the sender and I get the comments message. Also at the top box of the message the email I receive is from Sitename<[email protected]> huh

    The important thing is the email gets through but the missing name and the fact the user does not get the content of the  ’eFeedbackThanks’ chunk is a concern.

    Any idea how to fix this?

    Thanks!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      It looks like you haven’t put a real email address in the Configuration of your site yet; that’s where that From: is coming from.

      When you specified your thankyou chunk are you sure you used backticks and not single quotes?

      In the report chunk make sure your placeholders are exactly the same as the name of the form’s field, and that the field has the eform="..." added to the input tags.
        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
        • 23299
        • 1,161 Posts
        OK...

        How would I change the configuration so the email From works? Not sure what you mean by "configuration"? Something from the first install?

        This is the snippet call I am using on the contact page:
        [!eForm? &formid=`feedbackForm` &to=`[email protected],[email protected],[email protected]` &tpl=`eFeedBackForm` &report=`eFeedbackReport` &thankyou=`eFeedbackThanks` &mailselector=`department` &vericode=`1` &subject=`Web site feedback`!]


        Should I be using a simpler snippet call?

        If I try adding backticks to the name of the chunks the form does not work or there is no change with regard to the issues I am experiencing. Basically I copied the eForm Example???

        This is the code for the eFeedbackReport chunk:
        <p>This is a response sent by [+name+] using the feedback form on the website. The details of the message follow below:</p>
        <table>
        <tr valign="top"><td>Name:</td><td>[+name+]</td></tr>
        <tr valign="top"><td>Email:</td><td>[+email+]</td></tr>
        <tr valign="top"><td>comments:</td><td>[+comments+]</td></tr>
        </table>
        <p>You can use this link to reply: <a href="mailto:[+email+]?subject=RE:[+subject+]">[+email+]</a></p>



        This is the code for the eFeedbackForm chunk:
        [+validationmessage+]
        <form method="post" action="[~[*id*]~]">
            <input type="hidden" name="formid" value="feedbackForm" />
            
            <p><label accesskey="n" for="name">Your Name</label>
            <input type="text" name="Name" maxlength="60" eform="Your Name::1:Expected at least two words:#REGEX /^\w+\s\w+/i" /></p>
        
            <p><label accesskey="e" for="email">Your Email Address</label>
            <input type="text" name="email" size="40" maxlength="40" eform="Your Email Address:email:1" /></p>
            
            <p><label accesskey="s" for="department">Subject</label>
            <select name="department">
                <option value="1">Website feedback</option>
                <option value="2">Support request</option>
                <option value="3">Feature request</option>
            </select></p>
            
            <p><label accesskey="c" for="comments">Comments</label>
            <textarea cols="40" rows="10" name="comments" eform="Comments:html:1"></textarea></p>
        
            <p>
            Please enter the     anti spam code below:<br />
            <img src="[+verimageurl+]" alt="verification code" border="1"/>
            </p>
            <p>
            <label accesskey="c" for="vericode">code</label>
            <input type="text" name="vericode" size="20" />
            </p>
            
            <p><input type="submit" name="submit" value="Send Feedback"></p>
        </form>


        This is the code for the eFeedbackThanks chunk:
        <h3>Thank you for your feedback</h3>
        <p>We know how you appreciate our ongoing efforts and thank you for your praise.
        We will take any suggestions you may have made to heart and will endeavor to 
        respond to you in a timely manner.  However as all office staff is attending
        our 4 week annual company retreat, this year held in the Costa Del Sol, we ask
        for your patience.</p>
        <p>Below is a copy of your message:</p>
        <table>
        <tr><td>Your name:</td><td>[+name+]</td></tr>
        <tr><td>Your email address</td><td>[+email+]</td></tr>
        <tr valign="top"><td>Your comments</td><td>[+comments+]</td></tr>
        </table>


        Are there specific things I am supposed to change in these chunks?

        Thanks,

        Max
          • 23299
          • 1,161 Posts
          I found one post that addressed some confusion over using eFeedbackThanks or eFeedBackThanks but I tried both with no change.

          I quote from the Example page: " A fairly straight forward html form with some placeholders for error messages and the vericode (CAPTCHA)"... It does not work for me, but maybe I am missing something important with the term "placeholders": should I be replacing some generic fields with my own specific values? Maybe its just me but I always seem to be yearning for clear English when reading how to implement these snippets?

          Does anyone have a simple guide or archive post to getting eForm up and running? I am looking for just the basics here...

          Thanks!
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            "configuration of your site" = Tools -> Configuration, User tab, Email address. This is stored in the database system_settings table as the "emailsender" field, and is accessed by the [(emailsender)] tags, and in snippet and plugin code as $modx->config[’emailsender’].

            So "site configuration" refers to the Manager menu option for configuring the entire site, while snippet configuration will refer to the parameters used in the the snippet call to configure the snippet’s behavior.

            Your placeholders have to exactly match the name of the fields in the form:
            [+Name+]
              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
              • 23299
              • 1,161 Posts
              I added the email address in the Configuration (have not accessed that panel much) like you suggest.
              This takes care of the you@yourdomain issue.

              The good news is that I now get the correct eFeedbackThanks content to show after sending a message via the eForm page.

              The bad news is that I now receive the emails with nothing but ’eFeedbackReport’ in the body area of the email?

              Max
                • 23299
                • 1,161 Posts
                I notice a discrepancy with the snippet call:

                [!eForm? &formid=`feedbackForm` &to=`[email protected],[email protected],[email protected]` &tpl=`eFeedBackForm` &report=`eFeedbackReport` &thankyou=`eFeedbackThanks` &mailselector=`department` &vericode=`1` &subject=`Web site feedback`!]

                At the beginning the &formid =`feedbackForm` should this actually be `eFeedbackForm` huh as that is what the chunk name is called. I am using all the code from the examples in the downloaded eForm folder.

                Should I give up on these chunks and use the code from here: http://wiki.modxcms.com/index.php/EForm

                But this code seems like it is from 2006? I am not trying for anything fancy: just looking to get the basic eForm to function...

                I still get nothing but the line that says ’eFeedbackReport’ in the body of the emails that I receive. The name is missing from the eFeedbackThanks as well.

                Thanks...


                Update: I tried switching the `feedbackForm` to `eFeedbackForm` but it did nothing.

                Should I replace the [+name+] with [+Name+] in the Thanks and Report chunks?
                  • 23299
                  • 1,161 Posts
                  Well after a morning struggling with this I now have two different email form systems working...

                  http://modxcms.com/forums/index.php/topic,23828.0.html