I have 2 forms on one page of my MODx Revo, I have put both of them in their own CHUNK. Each of these chunks includes the form, and the specific FormIt call with the &SubmitVar included as well as other validators, etc.
However, for whatever reason, when I hit Submit on my second form, it processes it as though I were still using the first form, causing it to use the wrong Template chunk, and email the wrong Email subject, etc. When I remove the first form / FormIt Call, the second form uses the proper Redirect page, Subject, and Template chunk (as specified in its FormIt call). If however I re-add the first form, it continues to break again.
Below is the code for the 2 specific Form Chunks, does anyone see something wrong in this that I am missing? Cuz I’m at a loss :/
First Chunk: Request-a-Quote-Form:
[[!FormIt?
&hooks=`spam,email,redirect`
&emailTpl=`QuoteEmailChunk`
&emailTo=`[email protected]`
&emailSubject=`Request a Quote`
&SubmitVar=`quotesubmit`
&redirectTo=`16`
&validate=`name:required,
email:required,
phone:required,
text:required:stripTags,
nospam:blank`
]]
[[!+fi.error.error_message:notempty=`<p>[[!+fi.error.error_message]]</p>`]]
<form action="[[~[[*id]]]]" method="post" name="quotesubmit" class="form">
<input type="hidden" name="nospam" value="" />
<div style="display:block;">
<label for="name">
Name:
<span class="error">[[+fi.error.name]]</span>
</label>
<input type="text" name="name" id="name" value="[[+fi.name]]" size="30" />
</div>
<div style="display:block;">
<label for="email">
Email:
<span class="error">[[+fi.error.email]]</span>
</label>
<input type="text" name="email" id="email" value="[[+fi.email]]" size="30" />
</div>
<div style="display:block;">
<label for="phone">
Phone:
<span class="error">[[+fi.error.subject]]</span>
</label>
<input type="text" name="phone" id="phone" value="[[+fi.phone]]" size="30" />
</div>
<div style="display:block;">
<label for="text">
Message:
<span class="error">[[+fi.error.text]]</span>
</label>
</div>
<textarea name="text" id="text" rows="6" cols="30" value="[[+fi.text]]">[[+fi.text]]</textarea>
<br class="clear" />
<div class="form-buttons">
<input type="submit" name="quotesubmit" value="Submit" />
</div>
</form>
Second Chunk: Newsletter Form:
[[!FormIt?
&hooks=`email,redirect`
&emailTpl=`NewsletterEmailChunk`
&emailTo=`[email protected]`
&emailSubject=`Newsletter Sign-Up`
&SubmitVar=`newslettersubmit`
&redirectTo=`18`
]]
[[!+fi.error.error_message:notempty=`<p>[[!+fi.error.error_message]]</p>`]]
<form action="[[~[[*id]]]]" method="post" name="newslettersubmit" class="form" style="position:relative;top:12px;left:35px;">
<div style="display:block;">
<label for="newsletter">
Email:
<span class="error">[[+fi.error.email]]</span>
</label>
<input type="text" name="newsletter" id="newsletter" value="[[+fi.newsletter]]" size="30" />
<input type="submit" name="newslettersubmit" value="Join" />
</div>
</form>
Anyone have any thoughts?