We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!

Answered FormIt Problem

    • 37638
    • 63 Posts
    When the code below is in a resource it doesn't show at all on the front end. Removing the "@" in line 2 resolves the problem, but clearly FormIt won't work correctly then.

    modSecurity is currently disabled on the site.

    [[!FormIt?
    &emailTo=`[email protected]`
       &hooks=`email,redirect` 
       &emailTpl=`askDaysRegistrationAR`
       &redirectTo=`1`
       &submitVar=`register`
       &validate=`name:required,
          email:email:required,
          address:required`
    ]]
    
    <h2>Registration Form</h2>
     
    [[!+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="name">
            Name:
            <span class="error">[[!+fi.error.name]]</span>
        </label><br />
        <input type="text" name="name" id="name" value="[[!+fi.name]]" /><br />
     
        <label for="email">
            Email:
            <span class="error">[[!+fi.error.email]]</span>
        </label><br />
        <input type="text" name="email" id="email" value="[[!+fi.email]]" /><br />
     
        <label for="address">
            Address:
            <span class="error">[[!+fi.error.text]]</span>
        </label><br />
        <textarea name="address" id="address" cols="55" rows="7" value="[[!+fi.address]]">[[!+fi.address]]</textarea><br />
    
    
        <label for="lodging">
            Lodging (if out of area):
            <span class="error">[[!+fi.error.lodging]]</span>
        </label><br />
        <input type="text" name="lodging" id="lodging" value="[[!+fi.lodging]]" /><br />
     
    
       <label for="arrival">
            Arrival Info (if out of area):
            <span class="error">[[!+fi.error.arrival]]</span>
        </label><br />
        <textarea name="arrival" id="arrival"  cols="55" rows="7" />[[!+fi.arrival]]</textarea><br />
    
     
        <br class="clear" />
     
        <div class="form-buttons">
            <input type="submit" value="Register Now!" name="register" />
        </div>
    </form>


    http://www.asknetworkusa.net/register-for-arkansas-ask-days.html has the code as shown above, http://www.asknetworkusa.net/test-registration.html has &emailTo=`jmjmaddington.com`

    This question has been answered by jmaddington2. See the first response.

      • 36561
      • 38 Posts
      I see forms on both of those URL's.

      Could it be, that the problem is not FormIt, but a bug in your HTML/CSS or JavaScript somewhere?
      • I see the Quick contact footer form but neither page is showing the registration form for me currently. Nothing in the output and I don't know why a character would hose the form unless there were issues with mod_security or a charset issue. What is the DB charset set to?
          Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
          • 37638
          • 63 Posts
          @saschame But do you see the same registration form on both pages? Each page has a search and a contact form, but only the second has the registration form.

          @Jay Charset is latin1_swedish_ci
          • Seeing the registration form on the 2nd page now. What if you try throwing a
            \ in front of the @ symbol? I wonder if Magic Quotes is on?
              Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
              • 37638
              • 63 Posts
              Jay, the \ doesn't do it. I am going to rollback to before I upgraded (which wasn't perfectly smooth) and go from there.

              I'll let you know what happens.
              • discuss.answer
                • 37638
                • 63 Posts
                BenMarte figured it out. It was an issue the strlen output modifier in the template.

                Specifically, the code list was in the resource (which I failed to mention :-( ) and the template was:

                		   [[*content:strlen:ge=`10`:then=`
                		   <div class="cols">
                		     <div class="indent">
                
                		       [[*content]]
                		       <div class="clear"></div>
                		     </div><!-- .indent -->
                		   </div><!-- .cols -->
                		   `]]
                


                Dropping the modifier fixed the problem.

                Of course, it still isn't entirely clear the "@" breaks it, but at this point I'm just happy it's working.