We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19646
    • 31 Posts
    Hi there

    I hope someone can help me with my automessage issue.

    I have an eForm snippet call which we have been using for ages and it works just fine.

    Then the client changed the spec (don’t you just hate that but a hazard of the job ...) they now want a message to go to the user as well as the redirect to the thanks page.

    eForm v 1.4.4supports this with &automessage - great I thought I’ll use that and it’d be fine.

    I have created the text chunk and put the extra code into the snippet call but it fails to send the user a message. huh

    Please advise what I am doing wrong and a solution to help me make it work as my deadline is Christmas Eve......


    Here’s the snippet call

    [!eForm?&formid=`[*form_id_list*]` &tpl=`[*forms_list*]` &gotoid=`[*thankyou_page_id*]` &eFormOnMailSent=`eForm2DB`  &gotoid=`[*thankyou_page_id*]` &eFormOnMailSent=`eForm2DB` &to=`[*form_email_to*]` &subject=`[*email_subject*]` &report=`[*form_reports_list*]` &eFormOnValidate=`[*form_validation_function*]` &automessage=`formAutoreply` &eFormOnBeforeFormParse=`eFormPopulateData`!]



    the automessage text is here (just junk for testing before the client firms up the exact text)

    this is the auto text
    
    kjkj
    
    blah blah blah



    Thanks in advance for any help offered


    Steve
      • 30223
      • 1,010 Posts
      Can you show us your form template as well?
        • 7231
        • 4,205 Posts
        I think you need a filed named email for the automessage to know where to send it to:
        # &automessage (Optional)
        chunk name (non-numeric) or document id (numeric) to use as an auto-responder message Can include [+form fields+]. E.g. [+firstname+] - tags: [form_fields],[postdate] - note: eForm will send the auto-respond message to the email address specified inside the [email] form field.
          [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]
          • 19646
          • 31 Posts
          Hi TobyL

          Thanks for your reply

          the form calls different chunks depending on which form our client has selected for her page, Therefore the form call posted above does not directly call this chunk of html.



          <form method="post" action="[~[*id*]~]" id="ContactUsForm" name="ContactUsForm">
          [+validationmessage+]
          			<table width="580" border="0" cellspacing="0" cellpadding="0" bgcolor="#ECEDEE">
                      <tr><td colspan="2"><div class="form_SUBhead">Please fill this in to contact BETA</div></td></tr>
                      <tr><td colspan="2"><div class="form_mainhead_space"> </div></td></tr>
                      <tr>
                      <td><div class="form_SUBlabel">First Name</div></td>
                      <td><div class="form_SUBfield"><input type="text" id="first_name" name="first_name" size="50" eform="First Name::1" /></div></td>
                      </tr>
                      <tr>
                      <td><div class="form_SUBlabel">Last Name</div></td>
                      <td><div class="form_SUBfield"><input type="text" id="last_name" name="last_name" size="50" eform="Last Name::1" /></div></td>
                      </tr>
                      <tr>
                      <td><div class="form_SUBlabel">Company Name</div></td>
                      <td><div class="form_SUBfield"><input type="text" id="company_name" name="company_name" size="50" eform="Company Name::1" /></div></td>
                      </tr>
                      <tr>
                      <td><div class="form_SUBlabel">Phone</div></td>
                      <td><div class="form_SUBfield"><input type="text" id="phone" name="phone" size="50" eform="Phone::1" /></div></td>
                      </tr>
                      <tr>
                      <td><div class="form_SUBlabel">Email</div></td>
                      <td><div class="form_SUBfield"><input type="text" id="Email" name="Email" size="50" eform="Email:email:1" /></div></td>
                      </tr>
                      <tr>
                      <td><div class="form_SUBlabel">Message</div></td>
                      <td><div class="form_SUBfield"><textarea id="message" name="message" rows="4" cols="38" eform="Message::1"></textarea></div></td>
                      </tr>
                      <tr bgcolor="#FFFFFF"><td colspan="3"> </td></tr>
                      </table>
          	<input type="submit" name="submit" value="submit" class="form_bttn" />
          </form>



          The form then uses the report stuff and sends the email shown below


          <h2>Contact Us Form</h2>
          <p>This is the result of a form submission made to the BETA website.</p>
          
          <h3>Contact Details</h3>
          <p>
          First Name: [+first_name+]<br />
          Last Name: [+last_name+]<br />
          Company Name: [+company_name+]<br />
          Telephone: [+phone+]<br />
          Email: <a href="[+email+]">[+email+]</a><br />
          Message: [+message+]
          </p>





          It then uses the database e2db to record it to a database which our client reviews for her contacts and so on.
          (I have not included tat chunk or snippet)

          If you can advise where I am going wrong I would be most grateful

          regards

          Steve


            • 7231
            • 4,205 Posts
            <div class="form_SUBfield"><input type="text" id="Email" name="Email" size="50" eform="Email:email:1" /></div>
            Just a guess here, could it be because the field is named "Email" rather than "email". Not sure if this would make a difference but it is the only thing I noticed.

            BTW - In your original Ditto call you have &gotoid=`[*thankyou_page_id*]` twice.
              [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&#39;t know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 19646
              • 31 Posts
              Hi folks

              Thanks for the "gotoid" duplicated note, I’ve removed that

              Thanks also for the Email change into email (not the capital letter....)


              Now it is working


              laugh

              Great when it works.............