We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7699
    • 16 Posts
    hiya,

    Can someone tell me what I’m doing wrong, I’m trying to get emails that get sent through the contact form to go to the email in user config in modx. this is my code, it just goes to the email you put in email:

    <p class="error">[+validationmessage+]</p>
    
    <form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm">
    
     <fieldset>
      <h3> Contact Form</h3>
    
      <input name="formid" type="hidden" value="ContactForm" />
    
      <label for="cfName">Your name:
      <input name="name" id="cfName" class="text" type="text" eform="Your Name::1:" /> </label>
    
      <label for="cfEmail">Your Email Address:
      <input name="email" id="cfEmail" class="text" type="text" eform="Email Address:email:1" /> </label>
    
    
      <label for="cfRegarding">Regarding:</label>
      <select name="subject" id="cfRegarding" eform="Form Subject::1">
       <option value="General Inquiries">General Inquiries</option>
       <option value="Treatments">Treatments</option>
       <option value="Workshops">Workshops</option>
    <option value="Products">Products</option>
      </select>
    
      <label for="cfMessage">Message: 
      <textarea name="message" id="cfMessage" rows="4" cols="20" eform="Message:textarea:1"></textarea>
      </label> <br /> <br />
    
    <img src="[+verimageurl+]" border="1" alt="verification code" /> <br /><br />
    	 
    <label for="vericode">Please input the code to verify you are human:</label> <br /> <br />
    
    <input name="vericode" size="20" type="text" /> <br /> <br />
    <label> </label><input type="submit" name="contact" id="cfContact" class="button" value="Send This Message" /> 
    
    	 
    
     </fieldset>
    
    </form>


    And my Call:

    [!eForm? &formid=`ContactForm` &subject=`[+subject+]`
    &ccsender=`1` &to=`[email protected]`
    
    &tpl=`ContactForm` &report=`ContactFormReport`
    &invalidClass=`invalidValue` &requiredClass=`requiredValue`
    &cssStyle=`ContactStyles` &gotoid=`46`
    &vericode=`1`  !]


    I can’t see why it doesnt work anyone got an idea?

    Thanks!
      • 5340
      • 1,624 Posts
      Try using &to=`[(emailsender)]`

      or

      &to=`((emailsender))` in case you have PHx installed