[[!FormIt?
&hooks=`formit2db,redirect`
&prefix=`xyzinvite_`
&packagename=`inviterequester`
&tablename=`requests`
&autoPackage=`1`
&emailTpl=`irequestEmailChunk`
&emailTo=`[email protected]`
&redirectTo=`20`
&validate=`email:required:email`
]]
<div id="inviteFormContainer" class="fullWidth">
<div class="center width600px height160p centerText inviteWraper">
[[!+fi.validation_error_message:notempty=`<p class="textGlow">[[!+fi.validation_error_message]]</p>`]]
[[+fi.error.error_message]]
<form name="form" action="[[~[[*id]]]]" method="post" class="form">
<input type="hidden" name="nospam:blank" value="[[+fi.nospam]]" />
[[!+formit.recaptcha_html]]
[[!+fi.error.recaptcha]]
<li class="fieldOuterBox">
<input placeholder="Enter your email..." type="text" class="css-input" name="email" id="email" value="[[!+fi.email]]">
<a type="submit" name="submit" class="btn" onclick="form.submit();">Request Invitation</a>
</li>
</form>
<p class="textGlow">
[[*content]]
</p>
</div>
</div>
This question has been answered by multiple community members. See the first response.
return array( 'Your post cannot be saved because only one post is allowed per month', );
Just thinking out loud, but....
If the return is false, I think the save aborts silently. If it's an array, the members of the array are treated as error messages:
return array( 'Your post cannot be saved because only one post is allowed per month', );
I've never actually tried this, but it's supposed to work. I'm not sure if the error message is displayed or sent to the error log, or what.