<?php
/* reject email addresses containing noreply, donotreply */
$email = $value;
if (strpos($email, 'noreply') !== false || strpos($email, 'donotreply') !== false)
{
return false;
}
else {
return true;
}
<?php
/* reject email addresses unconditionally as a test */
return false;
[[!FormIt?
&hooks=`hook.checkResubmission,email,FormItAutoResponder,hook.SetResubmission`
&emailTpl=`join_our_network_report`
&emailTo=`[email protected]`
&emailSubject=`Request To Join Our Network Form`
&customValidators=`filterNoreply`
&validate=`nospam:blank,name:required,email:email:required:filterNoreply`
&successMessage=`<style>#joinournetwork{display:none;}</style><h3>THANK YOU!</h3><p>Your information was successfully submitted.</p>`
&emailFrom=`[email protected]`
&emailFromName=`Our Company`
&fiarTpl=`join_our_network_thanks`
&fiarSubject=`Thank you for signing up to receive emails from Our Company`
&fiarToField=`email`
&fiarFrom=`[email protected]`
&fiarFromName=`Our Company`
&fiarHtml=`1`
&fiarReplyTo=`[email protected]`
&fiarReplyToName=`Our Company`
&fiarBCC=`[email protected]`
]]
[[!+fi.resubmit:empty=`
[[!+fi.successMessage]]
[[!+fi.validation_error_message:notempty=`
<div style="margin-top: -10px; margin-bottom: -2px; font-family: Verdana, Arial, sans-serif; font-size: 11px" class="errors">
<p><strong>Some errors were detected:
[[!+fi.error.name:notempty=`<span style="font-size: 10px">Name is required</span>
`]]
[[!+fi.error.email:notempty=`<span style="font-size: 10px">Your email is not a valid email address</span>
`]]
<strong></p></div>
`]]
<form id="joinournetwork" action="[[~[[*id]]]]#jonbegin" method="post">
fieldset>
<input tabindex="-1" style="position: absolute !important;height: 1px; width: 1px;border: 0; padding: 0;overflow:
hidden;clip: rect(1px, 1px, 1px, 1px);" name="nospam" id="nospam" type="text" value="" autocomplete="off" />
<p>
<input name="name" id="name" class="text" type="text" value="
[[!+fi.name]]" placeholder="Name (Required)"
onfocus="if (this.defaultValue==this.value) this.value = ''" />
<span style="font-size: 11px; font-weight:bold">Name
[[!+fi.error.name]]</span>
</p>
<p>
<input name="company" id="company" class="text" type="text" value="[[!+fi.company]]" placeholder="Your Organization" onfocus="if (this.defaultValue==this.value) this.value = ''" /> <span style="font-size: 11px; font-weight:bold">Org.[[!+fi.error.company]]</span>
</p>
<p>
<input name="email" id="email" class="text" type="text" value="[[!+fi.email]]" placeholder="Email (Required)"
onfocus="if (this.defaultValue==this.value) this.value = ''" />
<span style="font-size: 11px; font-weight:bold">Email[[!+fi.error.email]]</span>
</p>
<p>
<input type="submit" name="join" id="cfJoin" class="button" value="Submit" />
</p>
</fieldset>
</form>
`]]
This question has been answered by samg. See the first response.
Please don't double post.
The version you are currently running, 2.5.0, is confirmed by me to have this problem of certain snippets being ignored. 2.5.2 fixes it, whatever the origin is.I appreciate your feedback but I don't think it can help me. Turns out I'm using ModX 2.5.1-pl which you've indicated doesn't have the problem of ignoring snippets.
Quote from: BobRay at Dec 01, 2016, 11:34 PMPlease don't double post.BobRay, what are you referring to?