We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45676
    • 4 Posts
    Hi, I am a novice using MODx, and am using the FormIt component which works. I followed all exactly as instructed on the example page. The form works, and sends a Subjetct, multipule email addresses, name, email, and comments text.

    The issue is none of the values from the colors or numbers are sent in the email back to me? The chunk call I am using is:

    [[!FormIt?
    &hooks=`recaptcha,spam,email,redirect`
    &emailTpl=`MyEmailChunk`
    &emailTo=`NOT SHOWN IN FORUM but used in chunk`
    &emailUseFieldForSubject=`1`
    &emailMultiSeparator=`
    `
    &redirectTo=`1`
    &validate=`name:required,
    email:email:required,
    subject:required,
    text:required:stripTags,
    numbers:required,
    colors:required`
    ]]

    Any guidance on this would GREATLY help, I am sure this is a novice issue. Thanks very much.
    • I've never had a problem with this when copy/pasting directly from the tutorial example. All I can suggest is that you double-check the form and the MyEmailChunk tpl for the email.
        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
        • 45676
        • 4 Posts
        Thanks Scotwell, Here is the Chunk that I have the form inserted and using. I call the Chunk from the Resource. This is a direct copy/paste as you noted. The site is yorkvillerobotics.org/dev

        [[!FormIt?
           &hooks=`recaptcha,spam,email,redirect`
           &emailTpl=`MyEmailChunk`
           &emailTo=`xxxxxxxxxx`
           &emailUseFieldForSubject=`1`
           &emailMultiSeparator=`<br />`
           &redirectTo=`1`
           &validate=`name:required,
              email:email:required,
              subject:required,
              text:required:stripTags,
              numbers:required,
              colors:required`
        ]]
         
        
        
        
        [[!+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>
            <input type="text" name="name" id="name" value="[[!+fi.name]]" />
         
            <label for="email">
                Email:
                <span class="error">[[!+fi.error.email]]</span>
            </label>
            <input type="text" name="email" id="email" value="[[!+fi.email]]" />
         
            <label for="subject">
                Subject:
                <span class="error">[[!+fi.error.subject]]</span>
            </label>
            <input type="text" name="subject" id="subject" value="[[!+fi.subject]]" />
         
            <label for="text">
                Message:
                <span class="error">[[!+fi.error.text]]</span>
            </label>
            <textarea name="text" id="text" cols="55" rows="7" value="[[!+fi.text]]">[[!+fi.text]]</textarea>
          <br> <br>
            <label>
                Numbers:[[+fi.error.numbers]]
                <select name="numbers" value="[[!+fi.numbers]]">
                    <option value="">Select an option...</option>
                    <option value="one" [[!+fi.numbers:FormItIsSelected=`one`]]>One</option>
                    <option value="two" [[!+fi.numbers:FormItIsSelected=`two`]]>Two</option>
                    <option value="three" [[!+fi.numbers:FormItIsSelected=`three`]]>Three</option>
                </select>
            </label>
         
            <label><br>
                Colors:[[!+fi.error.colors]]
                <input type="hidden" name="colors[]" value="" />
            </label>
            <ul>
              <li>
                <label><input type="checkbox" name="colors[]" value="red" [[!+fi.colors:FormItIsChecked=`red`]] /> Red</label>
              </li>
              <li>
                <label><input type="checkbox" name="colors[]" value="blue" [[!+fi.colors:FormItIsChecked=`blue`]] /> Blue</label>
              </li>
              <li>
                <label><input type="checkbox" name="colors[]" value="green" [[!+fi.colors:FormItIsChecked=`green`]] /> Green</label>
              </li>
            </ul>
          
            <br class="clear" />
        Please enter the two codes,(space between) you see below into the gray box.
            [[!+formit.recaptcha_html]]
            [[!+fi.error.recaptcha]]
         
            <br class="clear" />
        
        <div class="form-buttons">
                <input type="submit" value="Send Contact Inquiry" />
            </div>
        </form>
         
        
        
          • 45676
          • 4 Posts
          Also on the site I did remove the html for the colors and numbers until they are working. Thanks
            • 45676
            • 4 Posts
            SOLVED.. Scotwell, Thanks for your "double-check" note above. As a novice on using MODx I realized that I have to add the the calls specificaly in the email.Tpl. I added [[+colors]] and [[+numbers]] to the template MyEmailChunk and it works great.

            Form The Foximus Prime Contact Us Form:
            <br>
             
            <br />[[+name]] ([[+email]]) Wrote: <br />
            
            [[+text]]
            <b />
            Choices are:
            [[+numbers]]
            [[+colors]]