We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41833
    • 3 Posts
    Hi, I'm new to these forums and having a problem with the FormIt emailTpl chunk. If I remove the emailTpl from the FormIt snippet call altogether I get the values from my form as default output, but if I include any chunk with the needed placeholders I only get the placeholder's text like [[+name]] instead of the form data. I have checked my code over and run tests with the sample form and I'm at a loss for why this is happening. Using latest version of FormIt and Modx Revo 2.2.5.

    Any help is greatly appreciated.
      • 41833
      • 3 Posts
      Sorry my placeholder text example didn't show up. If I put
      [[+name]]
      in the email chunk
      [[+name]]
      is what is returned in the email instead of the form data. I am sure the form is correct for the
      value="fi.name"
      .
      • Can you post all your code please? The formIt form, the call, the email chunk, etc. The problem will be in those pieces, somewhere.
          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • 9572
          • 56 Posts
          Make sure you specify the "name" attribute for each input element. e.g:

          <input type="text" name="comments" value="[[!+fi.comments]]"/>


          I was having the same issue as you and then I smacked myself once I saw it. Once I made sure that the name attribute matched the value element, the placeholders worked fine.

          Only thing is that if you have checkboxes and a user submits a form without selecting a checkbox, you'll see its placeholder returned in the email. Not sure if that's supposed to happen or not but my form seems to be working now. [ed. note: fegul last edited this post 11 years, 6 months ago.]
            • 41833
            • 3 Posts
            Thank you so much for the responses folks. Sorry for the late reply, busy week as work.

            It was indeed the absence of the name attribute in my form causing the problem. Can't believe took posting here to figure that out. Lol.

            Thanks again to all all the response posts. I appreciate it.