We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    I'm completely baffled, nothing will display on the page if I put an address in the &emailTp=`` attribute, if I leave it blank the form displays [doesn't work, but displays]

    Here is the complete code for the page:





    [[!FormIt?
    &hooks=`spam,email`
    &emailTpl=`ContactFormEmailTpl`
    &emailTo=`[email protected]`
    &emailSubject=`Contact Form Submission`
    &emailReplyTo=`[email protected]`
    &successMessage=`success`
    &validate=`contactname:required,
    	companyname:required,
    	email:email:required,
    	subject:required,
    	instructions:required:stripTags,
    	address:required,
    	city:required,
    	province:required,
    	telephone:required`
    &clearFieldsOnSuccess=`1`
    ]]
    
    
    
    
    
    <h2>For Emergency Service Please Call 000-000-1000</h2>
     
    [[!+fi.error_message:notempty=`<div class="error">[[!+fi.error_message]]</div>`]]
    
    [[!+fi.successMessage:notempty=`<div class="success">[[!+fi.successMessage]]</div>`]]
    
    
     
    <form action="[[~[[*id]]]]" method="post" class="form">
    	<input type="hidden" name="nospam:blank" value="" />
    	
    	<label for="companyname">
    		Company Name:
    		<span class="error">[[!+fi.error.companyname]]</span>
    	</label>
    	<input type="text" name="companyname" id="companyname" value="[[!+fi.companyname]]" />
    
    
    
    	<label for="contactname">
    		Contact Name:
    		<span class="error">[[!+fi.error.contactname]]</span>
    	</label>
    	<input type="text" name="contactname" id="contactname" value="[[!+fi.contactname]]" />
    
    
    
    	<label for="address">
    		Address:
    		<span class="error">[[!+fi.error.address]]</span>
    	</label>
    	<input type="text" name="address" id="address" value="[[!+fi.address]]" />
    
    
    
    	<label for="city">
    		City:
    		<span class="error">[[!+fi.error.city]]</span>
    	</label>
    	<input type="text" name="city" id="city" value="[[!+fi.city]]" />
    
    
    
    	<label for="province">
    		Province:
    		<span class="error">[[!+fi.error.province]]</span>
    	</label>
    	<input type="text" name="province" id="province" value="[[!+fi.province]]" />
    
    
    
    	<label for="telephone">
    		Telephone:
    		<span class="error">[[!+fi.error.telephone]]</span>
    	</label>
    	<input type="text" name="telephone" id="telephone" value="[[!+fi.telephone]]" />
    	
    	
    	
    	<label for="fax">
    		Fax:
    		<span class="error">[[!+fi.error.fax]]</span>
    	</label>
    	<input type="text" name="fax" id="fax" value="[[!+fi.fax]]" />
    	
    	
    	
    	<label for="email">
    		Email:
    		<span class="error">[[!+fi.error.email]]</span>
    	</label>
    	<input type="text" name="email" id="email" value="[[!+fi.email]]" />
    	
    	
    	
    	<label for="instructions">
    		Special Instructions/Comments:
    		<span class="error">[[!+fi.error.instructions]]</span>
    	</label>
    	<textarea name="instructions" id="instructions" cols="55" rows="7" value="[[!+fi.instructions]]">[[!+fi.instructions]]</textarea>
    	
    	
    	
    	<div class="form-buttons">
    		<input type="submit" name="submit" id="submit" value="Submit">
    	</div>
    	
    </form>





    My first thought was that there was an issue with php mail on the server - so I ran a test using mod mail in a snippet & could send mail no problem.

    the ContactFormEmailTpl chunk is there, spelled correctly, case checked ...


    I'm stumped!


    ***UPDATE***

    Since I posted that, I found if I removed the "@" from any email addresses in the formIt call, the form would at least display & validate etc, though it would not actually email anything, still no idea how to fix [even reinsatlled formit]


















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

    [ed. note: sean69 last edited this post 13 years, 3 months ago.]
      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

      Sean Kimball CLP, CLS.
      Technical Director / Sr. Developer | BigBlock Studios
      ._______________________________________________.
      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
      phone/fax: 905-426-5525
    • discuss.answer
      • 26503
      • 620 Posts
      why on earth would this be screwing up my formit calls ... huh

      [[*id:eq=`1`:then=`[[$IndexTemplate]]`:else=`[[*content]]`]]

      just [[*content]] works ...
        *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

        Sean Kimball CLP, CLS.
        Technical Director / Sr. Developer | BigBlock Studios
        ._______________________________________________.
        Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
        27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
        phone/fax: 905-426-5525
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It's possible that the modifier code is choking on the @

        I have found from years of hard experience that while it's clever to shoehorn a whole site into one template, using chunks, TVs and modifiers to adjust content and styling, it's seldom convenient. I usually end up with from 3 - 6 templates, depending on the complexity of the site.
          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
          • 26503
          • 620 Posts
          Quote from: sottwell at Jul 06, 2013, 09:32 PM
          It's possible that the modifier code is choking on the @

          I have found from years of hard experience that while it's clever to shoehorn a whole site into one template, using chunks, TVs and modifiers to adjust content and styling, it's seldom convenient. I usually end up with from 3 - 6 templates, depending on the complexity of the site.


          I also take a similar approach [most of the time] but for a simple 5 page site where there is only the one minor difference in layout I usually like to use just the one to avoid maintaining more templates.

          Frankly, I try to keep all markup [not always successfully] OUT of the templates, markup belongs in chunks. smiley
            *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

            Sean Kimball CLP, CLS.
            Technical Director / Sr. Developer | BigBlock Studios
            ._______________________________________________.
            Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
            27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
            phone/fax: 905-426-5525
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            And there we will have to agree to disagree. My practice is that as much markup as possible is in the template itself. Only HTML that will be used across templates or resources gets put in chunks. Why load up the server with caching, fetching and processing chunks unnecessarily? Besides, I prefer being able to look at the template and see what the structure is, rather than having to dig through a stack of chunks and try to visualize what the end result is supposed to be.
              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
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              I'm starting to see the wisdom of your method Susan, even if I prefer a nicely chunked out template's clean look and feel. Aside from unnecessary db requests for chunks, locating that pesky extra or missing closing div when it's chunked out is far easier if most of the markup is in the template.

              That being said, for the purposes of getting this form to work, what happens if you use a TV for the email address instead of placing it directly into the FormIt call?
                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
                • 26503
                • 620 Posts
                I actually tried to use a system variable [[++contact_form_email]] - still no dice. But it is working now once I got it out of that little conditional statement.

                Since TVs get processed the same way I wouldn't imagine it would make a difference [though I didn't try]

                Quote from: frogabog at Jul 07, 2013, 03:54 PM
                I'm starting to see the wisdom of your method Susan, even if I prefer a nicely chunked out template's clean look and feel. Aside from unnecessary db requests for chunks, locating that pesky extra or missing closing div when it's chunked out is far easier if most of the markup is in the template.

                That being said, for the purposes of getting this form to work, what happens if you use a TV for the email address instead of placing it directly into the FormIt call?
                  *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

                  Sean Kimball CLP, CLS.
                  Technical Director / Sr. Developer | BigBlock Studios
                  ._______________________________________________.
                  Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
                  27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
                  phone/fax: 905-426-5525