We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38417
    • 92 Posts
    I Revo 2.2.0 I had a contactpage with this chunk:
    [[!FormIt?
    &hooks=`spam,email,redirect`
    &emailTpl=`MyEmailChunk`
    &emailUseFieldForSubject=`1`
    &emailTo=`[[getResources? &resources =`11` &tpl=`email_adress_tpl` &includeTVs=`1` &processTVs=`1` &limit=`1` &tvPrefix=`` ]]`
    &redirectTo=`13`
    &validate=`name:required,email:email:required,subject:required,text:required:stripTags`
    ]]
    [[!+fi.error_message:notempty=`<p>[[!+fi.error_message]]</p>`]]
    <form action="[[~[[*id]]]]" method="post" class="form">
        <input type="hidden" name="nospam:blank" value="" />
    <p>
        <label for="name">
            Je naam.
            <span class="error">[[!+fi.error.name]]</span>
        </label>
        <input type="text" name="Naam" id="name" value="[[!+fi.name]]" />
    </p>
    <p>
        <label for="email">
            Je e-mailadres.
            <span class="error">[[!+fi.error.email]]</span>
        </label>
        <input type="text" name="email" id="email" value="[[!+fi.email]]" />
    </p>
    <p>
        <label for="subject">
            Het onderwerp van je mail.
            <span class="error">[[!+fi.error.subject]]</span>
        </label>
        <input type="text" name="subject" id="subject" value="[[!+fi.subject]]" />
    </p>
    <p>
        <label for="text">
           Je boodschap of vraag.
            <span class="error">[[!+fi.error.text]]</span>
        </label>
        <textarea name="text" id="text" cols="55" rows="7" value="[[!+fi.text]]">[[!+fi.text]]</textarea>
    </p>
        <br class="clear" />
     
        <div class="form-buttons">
            <input type="submit" value="Send" class="button small" />
        </div>
    </form>

    The FormIt snippet was called uncached

    I tried to use the same chunck in Revo 2.2.4 and got a blank page. I searched several hours what I did wrong, tried a lot of different things without result. After a reinstall of FormIt the page appeared partially, header and some text but no form. Then calling the snippet cached [[FormIt? etc. the page loaded as it should be.

    Maybe this can help anybody with the same problem.

    • Calling the snippet cached will not process any POST values from the form submission (unless the resource itself is uncached). Any form-processing snippet should be called uncached. If your FormIt is failing uncached, you have some other problem.
        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
        • 38417
        • 92 Posts
        The resource is cached, I do not know if there is another problem and what it is, but I only notice that my contactpage in 2.2.0 functions with FormIt uncached, and in 2.2.4 (locally and on a server) only cached. All settings in 2.2.0 and 2.2.4 are the same. 2.2.0 I only got locally. What other problem could there be?
          • 17149
          • 19 Posts
          Has same problem.
          template has condition about empty content like this:
          [[*content:ne=``:then=`<div class="wrap">[[*content]]</div>`]]

          after remove this condition formit repairs
          sorry for my english