I'm struggling to get a formit contact form on the website I'm working on and need help. I'm new to modx and php. I have the latest version of both revo and formit installed. I also found a form example that I like and am trying to use, but have no idea how to use snippets or chunks and think my code might be off for that reason. Can someone look at my code below and steer me in the right direction? Also, I think I'm supposed to have an email chunk in there somewhere, but don't know where to put it. Thanks in advance!
<div id="main-content">
[[!FormIt?
&hooks=`spam,email,redirect`
&emailTpl=`MyEmailChunk`
&emailSubject=`High Priority: Contact Form Submission from AmmoniaGauges.com`
&emailTo=`[email protected]`
&redirectTo=`2`
&validate=`name:required,
email:email:required,
phone:required,
subject:required,
text:required:stripTags`
]]
<h1>Contact Us Today!</h1>
</br>
[[!+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: <input type="text" name="name" id="name" value="[[!+fi.name]]" />
<span class="error">[[!+fi.error.name]]</span>
</label>
</br>
<label for="phone">
Phone:
<input type="text" name="phone number" id="phone" value="[[!+fi.phone]]" />
<span class="error">[[!+fi.error.phone]]</span>
</label>
</br>
<label for="email">
Email:
<input type="text" name="email" id="email" value="[[!+fi.email]]" />
<span class="error">[[!+fi.error.email]]</span>
</label>
</br>
<label for="text">
Questions/Comments: </br> <textarea name="text" id="text" cols="55" rows="7" value="[[!+fi.text]]">[[!+fi.text]]</textarea>
<span class="error">[[!+fi.error.text]]</span>
</label>
<div class="form-buttons">
<input type="submit" value="Send Inquiry" />
</div>
</form>
</div>