I have strange problem with a form I’ve build with the FormIt add-on.
When the form is submitted I want the values of the checkboxes to be printed in the mail that is sent.
This is the code in my template that I use for it:
[[$header?]]
[[*content]]
[[!FormIt?
&hooks=`email,redirect`
&redirectTo=`13`
&emailTpl=`emailContactTpl`
&emailTo=`[email protected],[[+email]]`
&emailFrom=`[email protected]`
&emailFromName=`Reactieformulier website`
&emailSubject=`E-mail verzonden naar het Zonnecollectief`
&validate=`naam:required, email:email:required, phone:required, messageBody:required`
&submitVar=`contactSubmit`
]]
<form method="post" action="[[~[[*id]]]]" name="contact" id="contact">
<p><span>Naam*</span><input type="text" name="naam" id="naam" value="[[!+fi.naam]]" />[[!+fi.error.naam]]</p>
<p><span>Bedrijf</span><input type="text" name="bedrijf" id="bedrijf" value="[[!+fi.bedrijf]]" /></p>
<p><span>Adres</span><input type="text" name="adres" id="adres" value="[[!+fi.adres]]" /></p>
<p><span>Postcode</span><input type="text" name="postcode" id="postcode" value="[[!+fi.postcode]]" /></p>
<p><span>Plaats</span><input type="text" name="plaats" id="plaats" value="[[!+fi.plaats]]" /></p>
<p><span>Telefoonnummer*</span><input type="text" name="phone" id="phone" value="[[!+fi.phone]]" />[[!+fi.error.phone]]</p>
<p><span>E-mail*</span><input type="text" name="email" id="email" value="[[!+fi.email]]" />[[!+fi.error.email]]</p>
<p><span>Bel mij</span>
<label><input type="checkbox" name="belmij[]" id="smorgens" value="in de ochtend" [[!+fi.belmij:FormItIsChecked=`smorgens`]] />'s morgens</label>
<label><input type="checkbox" name="belmij[]" id="smiddags" value="in de middag" [[!+fi.belmij:FormItIsChecked=`smiddags`]] />'s middags</label>
<label><input type="checkbox" name="belmij[]" id="savonds" value="in de avond" [[!+fi.belmij:FormItIsChecked=`savonds`]] />'s avonds</label></p>
<p>Vraag of opmerking*<br /><textarea name="messageBody" id="messageBody">[[!+fi.messageBody]]</textarea>[[!+fi.error.messageBody]]</p>
<p><span>*VERPLICHT</span><input type="submit" value="VERSTUUR" name="contactSubmit" /></p>
</form>
[[$footer?]]
This is the code in the emailContactTpl Chunk that is used for sending the mail:
Er is een bericht verstuurd via het contactformulier van de website.<br/>
<br/>
Naam: [[+naam]]<br/>
Bedrijf: [[+bedrijf]]<br/>
Adres: [[+adres]], [[+postcode]] [[+plaats]]<br/>
Telefoon: [[+phone]]<br/>
E-mail: <a href="mailto:[[+email]]">[[+email]]</a><br/>
<br/>
Bel mij: [[+belmij]]<br/>
<br/>
Bericht:<br />
[[+messageBody]]
I am using ModX Revo 2.1.1-pl Traditional and FormIt 1.7.0.
When I submit the form on my live server the [[+belmij]] placeholder is replaced with `[[+value]]` instead of the actual value.
Odd thing is the code works on my local MAMP server!
Anyone has a clue what it could be?
Regards,
Webbiker.