Hello to all. I have some questions for users with ModX, I have already checked the answers on forum, but no luck till now.
I have a form which is using recaptchav2. The keys for recaptcha are configured in system settings. If I fill out all the fields without checking the recaptcha checkbox and press submit button, it gives me error on the form, that recaptcha was not checked. If I check the recaptcha and press the submit button, the situation is the same, at both situations I don't get an email. If I remove the hook recaptcha or place it before redirect hook, the emails are sent to me and saved in CMS.
So I want that my form requires all the fields and checking the recaptcha to make the form working. I'm not sure what is wrong in the code?
Are there any new ways of changing theme to dark besides this solution:
https://forums.modx.com/thread/99538/recaptcha-v2-how-to-change-it-s-theme ?
[[!FormIt?
&hooks=`recaptchav2, spam, email, FormItSaveForm, FormItAutoResponder, redirect`
&recaptchaTheme=`dark`
&formName=`NameOfForm`
&emailTpl=`quoteFormEmailTmpl`
&emailTo=`
[email protected]`
&emailSubject=`Subject`
&fiarTpl=`quoteFormEmailRspTempl`
&fiarSubject=`Subject`
&fiarReplyTo=`
[email protected]`
&validate=`nospam:blank,
name:required,
email:email:required,
place_dep:required,
place_arr:required,
date_dep:required`
&redirectTo=`5`
]]
[[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p>`]]
<form action="[[~[[*id]]]]" method="post">
<input type="hidden" name="nospam" value="" />
<div class="form_wrap">
<div class="field">
<label>Name</label>
<input class="solid" type="text" name="name" required="" value="[[!+fi.name]]">
</div> <span class="error">[[!+fi.error.name]]</span>
<div class="field">
<label>e-mail</label>
<input class="solid" type="email" id="email" class="floatLabel" name="email" value="[[!+fi.email]]">
</div> <span class="error">[[!+fi.error.email]]</span>
<div class="field">
<label>Location 1</label>
<input class="solid" id="searchTextField" type="text" name="place_dep" placeholder="" value="[[!+fi.place_dep]]">
</div> <span class="error">[[!+fi.error.place_dep]]</span>
<div class="field">
<label>Location 2</label>
<input class="solid" id="searchTextField2" type="text" name="place_arr" placeholder="" value="[[!+fi.place_arr]]">
</div> <span class="error">[[!+fi.error.place_arr]]</span>
<div class="field">
<label>Arrival</label>
<input class="solid" id="datepicker" name="date_dep" value="[[!+fi.date_dep]]">
</div> <span class="error">[[!+fi.error.date_dep]]</span>
<div class="field back_date">
<label>Departure</label>
<input class="solid" id="datepicker2" name="date_arr" value="[[!+fi.date_arr]]">
</div> <span class="error">[[!+fi.error.date_arr]]</span>
<div class="checkbox_form"> <span>Add return date</span>
<div class="checkboxFour">
<input type="checkbox" value="1" id="checkboxFourInput" />
<label for="checkboxFourInput"></label>
</div>
</div>
<textarea placeholder="Comment..." name="query" value="[[!+fi.query]]"></textarea>
<div class="space_btw" style="margin-top:20px;"></div>
[[!recaptchav2_render]]
<span class="error">[[!+fi.error.recaptchav2_error]]</span>
<input type="submit" value="SEND">
</div>
</form>
[ed. note: unforgiven666 last edited this post 6 years, 6 months ago.]