We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37619
    • 79 Posts
    I'm using Revo 2.2.6

    Hi everyone,

    I'm having several issues with FormIt. I have a template with a chunk $content.

    Within that chunk, I have an output filter *id:is=`1`:then=`$emailRegFrom:else=`$emailRegFormThankYou`.

    The $emailRegForm chunk has a FormIt call.

    Problem #1
    I've had to call the FormIt call cached, otherwise the form doesn't show up on the page. I've cleared the cache from the manager, renamed the core/cache folder to something else and created a new core/cache folder, and I also cleared my browser's cache. If I put !FormIt, nothing shows up on my page.

    Problem #2
    When the form actually shows up, it doesn't redirect nor does it send an email whenever I submit. If I refresh the page, it asks me if I want to re-submit the form; I say yes, and then it sends out an email. The redirect works whenever it wants to. I have no idea what I'm doing wrong here sad

    Here is my code:
    Template
    <!DOCTYPE html>
    <html>
    <head>
    <title>[[++site_name]] - [[*pagetitle]]</title>
    <base href="[[++site_url]]" />
    
    <link href="/assets/css/styles.css" rel="stylesheet" media="screen">
    </head>
    <body>
    [[$content]]
    </body>
    </html>
    


    $content Chunk
    [[*id:is=`1`:then=`[[$emailRegForm]]`:else=`[[$emailRegFormThankYou]]`]]
    


    $emailRegForm
    [[FormIt?
    	&hooks=`spam,email,redirect`
    	&emailTpl=`MyEmailChunk`
    	&emailTo=`[email protected]`
    	&emailSubject=`Testing Form Submission`
    	&redirectTo=`3`
    ]]
    
    <form id="email_registration" action="[[~[[*id]]]]" method="post" name="email_registration">
    	<p>Please enter your information for future updates.</p>
    
    	<label for="name">Enter your full name</label>
    	<input type="text" name="name" id="name" placeholder="Enter your full name here." />
    
    	<label for="email">Enter your email address</label>
    	<input type="email" name="email" id="email" placeholder="Enter your email address here." />
    
    	<input type="submit" name="submit" id="submit" value="Submit" />
    </form>
    


    I've never had this problem before. I've been stuck with this issue for the past 10 hours and can't figure it out. Am I doing anything wrong?

    UPDATE:
    Ben Marte: There's nothing in the error Logs. I'm using an output filter 'cause I don't want to have to create several templates. emailRegFormThankYou only has a paragraph. FormIt is installed, has been uninstalled and reinstalled.

    Bob Ray: I don't use Subscribe, SubscribeMe, or the Register snippet because I'm used to using FormIt. I'll check out my code regarding "emailRegFrom in one place and emailRegForm" later on today and let you know how that goes.

    Thanks for your help! [ed. note: jmbuytaert last edited this post 11 years, 3 months ago.]
      Jean-Marc Buytaert (@jmbuytaert)

      MODX truly is the greatest thing that's ever happened to the Internet.