We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14214
    • 299 Posts
    Running 2.3.2 on Centos 6.5, multi-context multi-domain install.

    FormIt is not redirecting. Attempted everything I know to do and don't know why it is not redirecting.

    I did the below thinking it would remove every possible inhibitor - nothing, just a page reload.
    [[!FormIt? &hooks=`redirect` &redirectTo=`1553` ]] 
    [[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p>`]]
    
    <form action="[[~[[*id]]]]" class="form" method="post">
    <div class="form-buttons"><input type="submit" value="Submit" /></div>
    </form>


    No error notices in the log. Anyone have similar experiences or a possible solution?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Hm. It's not working for me either, not even the basic contact form tutorial, which has always worked before.
        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It does work on 2.3.1
          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
          • 14214
          • 299 Posts
          For me it was not working on 2.3.1 so I updated hoping that would solve it; no dice.
            • 14214
            • 299 Posts
            Is there no way to debug FormIt? I must get this working ASAP.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Ok. The sample 'simple contact form' does in fact redirect as expected. However, just a form with a redirect as above does not redirect. Add just one field, however, and it does work, even a single hidden field.

              Two things I found that did prevent redirection: I forgot to remove the recaptcha hook when I had removed the block from the form, and I also didn't have a chunk for the emailTpl.
                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
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Heh. Even giving the submit input field a name attribute causes it to redirect. So apparently FormIt needs a valid POST value (which means a named field) to do anything.
                  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