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

    Working on my first MODX-site I'm trying to implement a FormIt-form. In the form I use a datepicker as well (from sekFormTools). After submitting the form, It doesn't send the information to my mailbox.

    The HTML-form looks like this: (note: normally the '&emailTo-address' is my real email-adress)

    [[!FormIt?
    &hooks=`email`
    &emailTpl=`sentEmailTpl`
    &emailSubject=`Message from your Website`
    &emailTo=`[email protected]`
    ]]
    
    <form id="contactForm" class="cmxform" method="post" action="[[~[[*id]]]]">
    
    <table border="0" bordercolor="" style="background-color:" width="276" cellpadding="0" cellspacing="0">
    
    <div>
    <tr>
    <td><input id="contact_name" name="contact_name" class="required" minlength="2" value="[[!+fi.contact_name]]" /></td>
    <td><label for="contact_name">Naam</label></td>
    </tr>
    </div>
    
    <div>
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    </div>
    
    <div>
    <tr>
    <td><input id="contact_email" name="contact_email" class="required email" value="[[!+fi.contact_email]]" /></td>
    <td><label for="contact_email">E-mail</label></td>
    </tr>
    </div>
    
    <div>
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    </div>
    
    <div>	
    <tr>
    <td><input id="contact_phone" name="contact_phone" class="phone" value="[[!+fi.contact_phone]]" /></td>
    <td><label for="contact_phone">Telefoon</label></td>
    </tr>
    </div>
    
    <div>
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    </div>
    
    <div>
    <tr>
    <td>[[input.datepicker? &input_id=`contact_arrival` &name=`contact_arrival` &animation=`slideDown` &date_format=`dd-mm-yy`]]</td>
    <td><label for="contact_arrival">Aankomst</label></td>
    </tr>
    </div>
    
    <div>
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    </div>
    
    <div>	
    <tr>
    <td>[[input.datepicker? &input_id=`contact_departure` &name=`contact_departure` &animation=`slideDown` &date_format=`dd-mm-yy`]]</td>
    <td><label for="contact_departure">Vertrek</label></td>
    </tr>
    </div>
    
    </table>
    
    <br /><br /><br />
    <div>
    <label for="contact_message"><em>Uw vraag:</em></label><br /><br /><br />
    <textarea id="contact_message" name="contact_message" rows="8" class="required">[[!+fi.contact_message]]</textarea>
    </div>
    <br /><br />
    <div>
    <input name="submit" class="submit" type="submit" value="Verzend"/>
    </div>
    </form>
    



    The chunk which is called 'sentEmailTpl' looks like this:

    [[+contact_name]] left you the message below on your website: <br />
    <strong>[[+contact_message]]</strong><br />
    You can respond to [[+contact_name]] by email at <a href="mailto:[[+contact_email]]">[[+contact_email]]</a> or by phone at [[+contact_phone]]
    


    Can somebody please help me. Thanks in advance!
      • 3109 ☆ A M B ☆
      • 894 Posts
      It seems like your datefields are missing the value parameter.

      I've never used sekFormTools so i could be wrong but looking at it that's the first thing I saw.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 41286
        • 9 Posts
        I just tried to submit the form data, with the datefields removed, but it still doesn't work.
          • 41286
          • 9 Posts
          Hello everyone,

          As an absolute beginner I read that the modx-community is a very active one ;-)
          But till now only benmarte (thanks) gave me a suggestion on how to solve the problem.
          Anyone else?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Does your site send email at all? You can test this by installing the QuickEmail package.
              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
              • 3109 ☆ A M B ☆
              • 894 Posts
              This might sound stupid but did you install FormIt?

              Are there any errors in your log? Are you on a localhost or on a live site?
                Benjamin Marte
                Interactive Media Developer
                Follow Me on Twitter | Visit my site | Learn MODX
                • 41286
                • 9 Posts
                @sottwell: because I was experiencing problems with modx I decided to upgrade the install. I just finished but when I select documents in the document tree, empty pages are being displayed. So I first have to solve this problem. After this I will start testing with the QuickEmail package.

                @benmarte: I installed FormIt through the packet manager, working on a local host (MAMP, OSX). Since I just upgraded, only recent errors can be viewed in the log.

                I will keep you informed.
                  • 3109 ☆ A M B ☆
                  • 894 Posts
                  If your working on local you won't be able to send emails unless you do something like this.

                  That's why it's not working.

                  Good Luck
                    Benjamin Marte
                    Interactive Media Developer
                    Follow Me on Twitter | Visit my site | Learn MODX
                    • 41286
                    • 9 Posts
                    benmarte, this must be the solution, I only couldn't try it because I'm still in the process of making modx work like I want to. The reason why I did an upgrade is that modx kept on referring to the wrong template. So if I create a new document in the document tree and attach a newly created template to this document, it always takes the template which is attached to another (the Home) page.