We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25330
    • 14 Posts
    I have stripped down my code to just a basic form to email to try and elimate code problems. I think its a server problem but not sure what is set wrong for modx not to be able to send the mail properly. I have formit set up and on the page when I submit to send an email it doesn't redirect and then I fill the form out a second time and it submits and redirects properly sending the email.

    Checking logs no email errors show up, no errors show up in apache either.

    I moved the exact code to another server and it worked perfectly.

    Am I missing something that formit needs to process?


    Below is the formit call I am using with the exception of changing out the email address to a fake one.
    [[!FormIt?
       &hooks=`email,redirect`
       &emailTpl=`contact_formTpl`
       &emailTo=`[email protected]`
       &redirectTo=`92`
    ]]
    
    [[!+fi.error_message:notempty=`<p>[[!+fi.error_message]]</p>`]]
     
    <form action="[[~[[*id]]]]" method="post" class="form">
        <input type="hidden" name="nospam:blank" value="" />
     
        <label for="firstname">
            *First Name:
            <span class="error">[[!+fi.error.firstname]]</span>
        </label>
        <input type="text" name="firstname" id="firstname" value="[[!+fi.firstname]]" />
    
     
        <br class="clear" />
     
        <div class="form-buttons">
            <input type="submit" value="SUBMIT" />
        </div>
    </form>
    
    • Did you check your server logs? First to make sure that the form information is being sent on the first submission and then compare it to the second submission.

      Everything seems to look right.
        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
        Visit CharlesMx.com for latest news and status updates.
        • 25330
        • 14 Posts
        Figured out what it was. On the resource setting cacheable is checked by default when creating a resource. Unchecking this corrected the problem. Thanks for the reply.