Forms, Form Processing &amp; Anti-Spam - MODX Community Forums https://forums.modx.com/board/?board=90 <![CDATA[ [JsonFormBuilder] Issue with php7 and radio elements ?]]> https://forums.modx.com/thread/104825/jsonformbuilder-issue-with-php7-and-radio-elements#dis-post-563685

I'm using this very nice JsonFormBuilder addon to build quickly complex form.
I just move a website from another server which running php7 and now there is an issue to make the form work.
On the server logs, I have found this :

[Sun Jan 20 17:41:59.476871 2019] [php7:error] [pid 19292] [client 92.xx.yy.69:43724]
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function JsonFormBuilder_elementRadioGroup::__construct(),
2 passed in /home/LSA/web/domain.fr/public_html/core/components/jsonformbuilder/model/jsonformbuilder/JsonFormBuilderFromJson.class.php on line 86
and at least 3 expected in /home/LSA/web/domain.fr/public_html/core/components/jsonformbuilder/model/jsonformbuilder/elements/JsonFormBuilder_elementRadioGroup.class.php:45
Stack trace:\n#0 /home/LSA/web/domain.fr/public_html/core/components/jsonformbuilder/model/jsonformbuilder/JsonFormBuilderFromJson.class.php(86): JsonFormBuilder_elementRadioGroup->__construct('nom_de_la_salle', 'Salle')
#1 /home/LSA/web/domain.fr/public_html/core/cache/includes/elements/modsnippet/38.include.cache.php(12): JsonFormBuilderFromJson->output()
#2 /home/LSA/web/domain.fr/public_html/core/model/modx/modscript.class.php(76): include('/home/LSA/web/l...')
#3 /home/LSA/web/domain.fr/public_html/core/model/modx/modparser.class.php in /home/LSA/web/domain.fr/public_html/core/components/jsonformbuilder/model/jsonformbuilder/elements/JsonFormBuilder_elementRadioGroup.class.php on line 45, referer: https://domain.fr/


It's look like radio element generate problem, but I'm not very competent to dig further.
A little bit help will be helpfull smiley]]>
https://forums.modx.com/thread/104825/jsonformbuilder-issue-with-php7-and-radio-elements#dis-post-563685 Sun, 20 Jan 2019 06:55:50 +0000 https://forums.modx.com/thread/104825/jsonformbuilder-issue-with-php7-and-radio-elements#dis-post-563685
<![CDATA[Invisible Recaptcha not submitting]]> https://forums.modx.com/thread/104795/invisible-recaptcha-not-submitting#dis-post-563607
I installed the ReCaptchaV2 addon and put this in my form code:

[[!FormIt?
&hooks=`recaptchav2,spam,email,redirect,FormItAutoResponder`
]]

<form id="contactForm" method="post" action="[[~[[*id]]]]">

[[!recaptchav2_render?
&tpl=`recaptchav2_invisible_html`
&form_id=`contactForm`]]
[[!+fi.error.recaptchav2_error]]

</form>

I put the credentials I got from Google in the recaptchav2.secret_key and ecaptchav2.site_key system settings.

But it's not submitting. No error, nothing. What could be wrong? As usual the instructions are really non-existing in the addon.]]>
https://forums.modx.com/thread/104795/invisible-recaptcha-not-submitting#dis-post-563607 Wed, 16 Jan 2019 08:14:52 +0000 https://forums.modx.com/thread/104795/invisible-recaptcha-not-submitting#dis-post-563607
<![CDATA[SPForm / Captcha Help]]> https://forums.modx.com/thread/104760/spform-captcha-help#dis-post-563546
I had to reinstall my ModX a few months ago now I'm trying to take some time getting things back to what I had. I was using the SPForm with the Captcha and now that I have it reinstalled it is not working and it has been awhile on what I should be looking for so any help would be great to push me in the right direction.

Site:
http://www.tapanime.com/contact/

The call I'm using is:
[[!SPForm? &requireVerify=`1` &useMathString=`1`]]


I do have the Captcha installed as well.]]>
https://forums.modx.com/thread/104760/spform-captcha-help#dis-post-563546 Sat, 12 Jan 2019 04:35:35 +0000 https://forums.modx.com/thread/104760/spform-captcha-help#dis-post-563546
<![CDATA[Can't figure out what is handling my form submission]]> https://forums.modx.com/thread/104668/can-t-figure-out-what-is-handling-my-form-submission#dis-post-562949 I have a form:

<form name="" action="" method="post" class="pure-form pure-form-aligned">
<input type="hidden" name="postback" value="yes">
<input type="hidden" name="contract_id" value="120">
<fieldset>
<div class="pure-control-group">
<label for="contract_name">Contract Name</label>
<input id="contract_name" name="contract_name" type="text" placeholder="Contract Formal Name" class="pure-input-1-2" value="XXXXX" required="">
</div>
<div class="pure-control-group">
<label for="period_start_date">Period Start Date</label>
<input id="period_start_date" name="period_start_date" type="text" placeholder="Start Date" style="width:150px;" value="XXXX" data-toggle="datepicker1" required="">
</div>
<div class="pure-control-group">
<label for="period_end_date">Period End Date</label>
<input id="period_end_date" name="period_end_date" type="text" placeholder="End Date" style="width:150px;" value="xxxxxx" data-toggle="datepicker1" required="">
</div>
</fieldset>

<menu class="actions">
<button type="submit" class="pure-button pure-button-primary">Save</button>
</menu>
</form>

I have looked at all the js/jquery event handler possibilities: "button.pure-button....", "button", $('button[type="submit"]'), "#pure-button", "$(document).on('submit', '.popover form', function(e){". I doesn't appear to have a js event handler. That being said, the form is sent and the db is updated. I try to follow the form submission and can't. client side code doesn't seem to be receiving it. What am I missing?

Is there a non-js recipient of this form submission? Can someone enlighten me?

I have tried to use the Chrome dev tools to find where my form is submitted to. No luck.


I don't know where modx is sending my form submission.....

James

]]>
https://forums.modx.com/thread/104668/can-t-figure-out-what-is-handling-my-form-submission#dis-post-562949 Mon, 26 Nov 2018 08:13:16 +0000 https://forums.modx.com/thread/104668/can-t-figure-out-what-is-handling-my-form-submission#dis-post-562949
<![CDATA[Form Z (Formit) Stopped sending notification e-mails after upgrade]]> https://forums.modx.com/thread/104375/form-z-formit-stopped-sending-notification-e-mails-after-upgrade#dis-post-561510
My forms seem to be working in that they produce errors and properly redirect after submission, but the notification e-mail is not being sent to admin. I do have one standard FormIt form on my contact page, this form works perfectly but uses a call on the contact page. Another words the form that is working does not use Formz. As far as my other 2 forms that use FormZ, they are not sending an admin e-mail after submission, which is my issue.

Here is on of my forms that is not sending the e-mail: https://www.ducksonsecurity.com/quote.html

I have been looking in Chunks and Snippets but don't know why its not sending the admin e-mail. Perhaps the upgrade removed coding out of one of the chunks or snippets? Any ideas what I can check?]]>
https://forums.modx.com/thread/104375/form-z-formit-stopped-sending-notification-e-mails-after-upgrade#dis-post-561510 Wed, 12 Sep 2018 01:43:40 +0000 https://forums.modx.com/thread/104375/form-z-formit-stopped-sending-notification-e-mails-after-upgrade#dis-post-561510
<![CDATA[Formz Builder Questions?]]> https://forums.modx.com/thread/87783/formz-builder-questions#dis-post-561474
I have a few questions pertaining to Formz Builder that documentation does not address, and was hoping someone has already had these same questions and found a solution. Even if you only know one of these questions, please help with that one question, it would be much appreciated.

1. First, I was wondering if anyone had figured out how to disable the form submission post to the database (database storage)? Meaning just have it sent via e-mail instead of saving to database? In the formTPL chunk I tried chaning this line: &store=`1` to &store=`0` thinking this was adding the data to the database but it did not seem to work. Don't need my client to have to constantly come in here and clean up all their former e-mails (there will be 5 forms with lots of submissions). An e-mail send is sufficient if possible.

2. Also in the formTPL chunck I see this line: &storeTime=`900`. Is this 900 seconds, minutes, or days? And does the form being stored disappear on it's own after this time has elapsed?

3. I am confused as to how to format the: Form Field Type: Radio and Select options. I am only getting 1 option with all my options comma separated. For example lets say I want multiple select drop downs with Option 1, Option 2, and Option 3. I do not know how to format. If I enter this: Option1, Option2, Option 3 in the "Values" field, I get 1 drop-down with all these variables, instead of multple drop-downs. Same thing with the Radio buttons only 1 is created instead of multiples. Can anyone help me here?

4. ReCAPTCHA: I was able to add a reCAPTCHA to my forms and it almost works properly. I almost used the same method I use to display my FormIt reCAPTCHA. The problem is the form can be submitted (added to database and send an e-mail) even before the reCAPTCHA is filled out properly. Have you found the proper solution to display reCAPTCHA using formz builder?

On the front end the submission message or redirect will not work until the reCAPTCHA is fille out, so it appears its working properly. This is an issue because SPAM bots can still send the e-mails (and save to database) even if reCAPTCHA is not yet completed.

Here is what I have done to show my reCAPTCHA:
in my formTL chunck I changed this:
<span class="error">[[!+fi.successMessage]]
[[!+fi.validation_error_message]]</span>

<form class="form [[+identifier]]" action="" method="post">
	<fieldset>
		[[+fields]]
	</fieldset>
        <div class="actions">
                <input type="submit" name="submit[[+id]]" value="[[+action_button:default=`Submit`]]" class="btn primary" />
	</div>
</form>


to this (added a few lines):
<span class="error">[[!+fi.successMessage]]
[[!+fi.validation_error_message]]</span>

<form class="form [[+identifier]]" action="" method="post">
	<fieldset>
		[[+fields]]
	</fieldset>
        <br class="clear" />
	[[!+formit.recaptcha_html]] [[!+fi.error.recaptcha]]
	<br />
        <div class="actions">
                <input type="submit" name="submit[[+id]]" value="[[+action_button:default=`Submit`]]" class="btn primary" />
	</div>
</form>


Then in my form extra fields I have added these hooks: recaptcha,spam

I would love for the reCAPTCHA error fields to display, before it allows the submit button to save to database and/or send to e-mail, but am not sure how to do this. This would allow the reCAPTCHA to stop SPAM bots.

In you have figured out any of these questions, your input and feedback would be much appreciated. I am just stuck on a few of theese issues (especially the select and radio button format).]]>
https://forums.modx.com/thread/87783/formz-builder-questions#dis-post-561474 Tue, 11 Sep 2018 11:51:18 +0000 https://forums.modx.com/thread/87783/formz-builder-questions#dis-post-561474
<![CDATA[ [SOLVED] reCaptcha V2 no longer works on multiple sites after MODx 2.6.5 upgrade]]> https://forums.modx.com/thread/104294/solved-recaptcha-v2-no-longer-works-on-multiple-sites-after-modx-2-6-5-upgrade#dis-post-561260
Although the submissions DOES go through, the error message fools the site visitor into attempting the form again, resulting in multiple submissions.

The error log within the manager is filled with these submissions:

[2018-08-20 15:17:16] (ERROR @ /home/username/public_html/core/components/formit/src/FormIt/Request.php : 87) [FormIt] Could not load FormItReCaptcha service class.
[2018-08-20 15:17:20] (ERROR @ /home/username/public_html/core/components/formit/src/FormIt/Request.php : 87) [FormIt] Could not load FormItReCaptcha service class.
[2018-08-20 15:17:20] (ERROR @ /home/username/public_html/core/components/formit/src/FormIt/Request.php : 87) [FormIt] Could not load FormItReCaptcha service class.
[2018-08-20 15:17:31] (ERROR @ /home/username/public_html/core/components/formit/src/FormIt/Request.php : 87) [FormIt] Could not load FormItReCaptcha service class.


1. I made sure I had the correct reCaptcha keys were set.
2. I removed ReCaptchaV2 package completely and reinstalled. No good.
3. Core/cache cleared.
4. Reverted Formit back to the previous version (version 2.2.7-px) but that ended up crashing the entire front of the site...500 error. Luckily, the manager still worked since I was able to install the latest version of Formit back (version 4.1.0-pl), bringing the site back, but still not correcting the reCaptcha problem. BTW: after the crash, I saw this in the manager error log:

[2018-08-20 15:15:03] (ERROR @ /home/username/public_html/core/xpdo/xpdo.class.php : 644) Could not load class: FormIt from formit.
[2018-08-20 15:15:08] (ERROR @ /home/username/public_html/core/xpdo/xpdo.class.php : 644) Could not load class: FormIt from formit.
[2018-08-20 15:15:15] (ERROR @ /home/username/public_html/core/xpdo/xpdo.class.php : 644) Could not load class: FormIt from formit.
[2018-08-20 15:15:20] (ERROR @ /home/username/public_html/core/xpdo/xpdo.class.php : 644) Could not load class: FormIt from formit.
[2018-08-20 15:15:24] (ERROR @ /home/username/public_html/core/xpdo/xpdo.class.php : 644) Could not load class: FormIt from formit.
[2018-08-20 15:16:08] (ERROR @ /home/username/public_html/core/xpdo/xpdo.class.php : 644) Could not load class: FormIt from formit.
[2018-08-20 15:16:18] (ERROR @ /home/username/public_html/core/xpdo/xpdo.class.php : 644) Could not load class: FormIt from formit.
[2018-08-20 15:16:29] (ERROR @ /home/username/public_html/core/xpdo/xpdo.class.php : 644) Could not load class: FormIt from formit.


My form code, which was working before my upgrade(s), is this:

[[!FormIt?  
&hooks=`recaptchav2,spam,FormSave,email,emailUser-contact,redirect`
&submitVar=`contact_page`
&emailSubject=`Submission Through The Whatever Contact Page`
&emailTpl=`contact_page_EmailChunk`
&emailTo=`email@sample.com,email2@sample.com`
&emailFrom=`[[+email-contact]]`
&redirectTo=`10`
&fsFormTopic=`Contact Page`
&fsFormFields=`firstName-contact,lastName-contact,telephone-contact,email-contact,subject-contact,text-contact`
]]

[[!+fi.error.error_message:notempty=`
<p>[[!+fi.error.error_message]]</p>
`]]





<div class="col-md-12">
                            <form class="form" action="[[~[[*id]]]]" method="post" id="contactForm" >
								<div class="row">
									<div class="form-group">
										<div class="col-md-6">
											<label for="firstName-contact">First Name *
                                            <span class="error">[[+fi.error.firstName-contact]]</span></label>
											<input type="text" value="[[+fi.firstName-contact]]" maxlength="100" class="form-control" name="firstName-contact" id="firstName-contact" required>
                                            <input name="nospam:blank" type="hidden" />
										</div>
										<div class="col-md-6">
											<label for="lastName-contact">Last Name *<span class="error">[[+fi.error.lastName-contact]]</span></label>
											<input type="text" value="[[+fi.lastName-contact]]" maxlength="100" class="form-control" name="lastName-contact" id="lastName-contact" required>
										</div>
									</div>
								</div>
                                
								<div class="row">
									<div class="form-group">
										<div class="col-md-6">
											<label for="email-contact">Email *
                                            <span class="error">[[+fi.error.email-contact]]</span></label>
											<input type="text" value="[[+fi.email-contact]]" maxlength="100" class="form-control" name="email-contact" id="email-contact" required>
										</div>
										<div class="col-md-6">
											<label for="telephone-contact">Telephone *<span class="error">[[+fi.error.telephone-contact]]</span></label>
											<input type="text" value="[[+fi.telephone-contact]]" maxlength="100" class="form-control" name="telephone-contact" id="telephone-contact" required>
										</div>
									</div>
								</div>

                                
								<div class="row">
									<div class="form-group">
										<div class="col-md-12">
											<label for="subject-contact">Subject</label>
											<input type="text" value="[[+fi.subject-contact]]" maxlength="100" class="form-control" name="subject-contact" id="subject-contact">
										</div>
									</div>
								</div>
								<div class="row">
									<div class="form-group">
										<div class="col-md-12">
											<label for="text-contact">Message</label>
											<textarea maxlength="5000" rows="10" class="form-control" name="text-contact" id="text-contact">[[+fi.text-contact]]</textarea>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="form-group">
										<div class="col-md-12">
 											
[[!recaptchav2_render]]<span style="color: #ff0000; font-size: 1.2em; font-weight: bold;">[[!+fi.error.recaptchav2_error]]</span>

										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-12">
                                                                                <input type="hidden" name="subject" id="subject" value="Submission Through The Whatever Website Contact Page" />
										<input type="submit" value="Submit" class="btn btn-primary btn-lg" name="contact_page" >
									</div>
								</div>
							</form>
						</div>
<div style="clear: both;"></div>


This same issue is happening on several sites. Any thoughts would be appreciated.

MODx 2.6.5
PHP 7.0
FormIt 4.1.0-pl
ReCaptchaV2 2.3.0-rc1]]>
https://forums.modx.com/thread/104294/solved-recaptcha-v2-no-longer-works-on-multiple-sites-after-modx-2-6-5-upgrade#dis-post-561260 Thu, 30 Aug 2018 08:06:24 +0000 https://forums.modx.com/thread/104294/solved-recaptcha-v2-no-longer-works-on-multiple-sites-after-modx-2-6-5-upgrade#dis-post-561260
<![CDATA[Associated Array & Ajax Help needed]]> https://forums.modx.com/thread/104014/associated-array-ajax-help-needed#dis-post-560499 The initial page load should default the state to Nebraska.
The county field should be limited to just counties in the selected state and can default to the 1st one in the list. (Stored procedure will provide the appropriate sort order.)

I made a snippet that contains the following (there will be two columns returned and anywhere from 1-254 records): (Is this how I would return a recordset inside a PHP array?)
...
$sql = "{call Web_GetCountyData4State(?)}";
$state = $_REQUEST['usState1'];
$params = array(array(&$state, SQLSRV_PARAM_IN));
$stmt = sqlsrv_query($conn, $sql, $params);

if ($stmt === false) {
    echo "Error in Code at getCountyData_step1";
    die( print_r( sqlsrv_errors(),true));
}
else {
    $counties = array();
    while ($row = sqlsrv_fetch_array($stmt)) {
        $counties[]=$row;
    }
}
sqlsrv_free_stmt($stmt);
sqlsrv_close($conn);

$countyarray=json_encode($counties);
return $countyarray;


Portions of the HTML/Javascript/jQuery chunk
<select name="usState1" id="stateInput1" class="form-control required" value="[[!+fi.usState1]]" placeholder="State">
[[!getStates]]
</select>
<select name="county1" id="county1" class="form-control required" value="[[!+fi.county1]]" placeholder="county">
<!--Need help with javascript/jquery to populate the drop-down on intial page load (where state="Nebraska")-->
</select>
<input type="hidden" name="ToEmail" value="">

...
$('#stateInput1').change(function(e) {
// how do I populate the county drop-down?
});
$('#county1').change(function(e) {
//How do I get the array value for salesman email for the selected county into the hidden ToEmail value?
});[/i]]]>
https://forums.modx.com/thread/104014/associated-array-ajax-help-needed#dis-post-560499 Tue, 07 Aug 2018 09:34:03 +0000 https://forums.modx.com/thread/104014/associated-array-ajax-help-needed#dis-post-560499
<![CDATA[FormIt: Setting the redirectParams dynamically with a placeholder. Is it possible?]]> https://forums.modx.com/thread/95657/formit-setting-the-redirectparams-dynamically-with-a-placeholder-is-it-possible?page=3#dis-post-559731
[[!FormIt?
    &hooks=`saveChronicleProcessor,redirect`
    &redirectTo=`15`
    &redirectParams=`{"id":"[[!+grow.id]]"}` // <------ The placeholder isn't setting the parameter, it stays blank.
    &validate=`
        day:required:isNumber,
        week:required:isNumber,
        summary:required:minLength=^50^,
        content:required,
        publish_on:isDate,`
]]
[[!+grow.id]] // <----- This line here is being output as expected.


The placeholder is outputting outside of the FormIt.redirectParameter, but not inside it.

The url looks like this; "http://cannacle.com/dashboard/view-grow?id="

Where is the placeholder wandering off to inside FormIt?]]>
https://forums.modx.com/thread/95657/formit-setting-the-redirectparams-dynamically-with-a-placeholder-is-it-possible?page=3#dis-post-559731 Thu, 19 Jul 2018 11:09:12 +0000 https://forums.modx.com/thread/95657/formit-setting-the-redirectparams-dynamically-with-a-placeholder-is-it-possible?page=3#dis-post-559731
<![CDATA[Formit Redirect and personal message]]> https://forums.modx.com/thread/104013/formit-redirect-and-personal-message#dis-post-559374 Using the redirect option to a new page, i would like to write a success message including some personal info already used in the email placeholders e.g. [[+name]]

What is the easiest way to do so ?

I have to call the formit snippet on that new page, how ?
e.g. [[!FormIt?
&hooks=`getInfo`
]]
and write an additionnal snippet getInfo to set placeholders containing this info ?? or there is an easier way to re use the email placeholders ?

Many thanks for your help]]>
https://forums.modx.com/thread/104013/formit-redirect-and-personal-message#dis-post-559374 Fri, 06 Jul 2018 04:54:23 +0000 https://forums.modx.com/thread/104013/formit-redirect-and-personal-message#dis-post-559374
<![CDATA[Formit stopped working]]> https://forums.modx.com/thread/103740/formit-stopped-working?page=2#dis-post-559231
This is the Formit code:

[[!FormIt?
&hooks=`spam,email,redirect,FormItAutoResponder`
&submitVar=`contactForm-submit`
&emailTpl=`form-contact-sentEmailTpl`
&emailSubject=`Een bericht van [[+contact_name]]`
&emailTo=`info@domainname.nl`
&validate=`
      workemail:blank,
      contact_name:required:minLength=`2`,
      email:email:required,
      contact_telefoon:required,
      contact_message:required`
&redirectTo=`39`
&fiarTpl=`form-contact-autoResponse`
&fiarSubject=`Je bericht`
&fiarToField=`email`
&fiarFrom=`info@domainname.nl`
&fiarFromName=`Afzendernaam`
]][[+fi.error.error_message]]

<form id="contactForm" class="cmxform" method="post" action="[[~[[*id]]]]">
<input type="hidden" name="contactForm-submit">
<input type="hidden" name="workemail" value="" />
[[!+fi.validation_error_message:notempty=`
<div class="error">
    <strong>Het invullen van het formulier ging niet goed. Controleer de velden.</strong>
</div>`]]
<div class="form-group required">
<label for="contact_name" class="control-label">Naam: *<br />
<input type="text" id="contact_name" name="contact_name" class="required form-control" value="[[!+fi.contact_name]]" /> [[!+fi.error.contact_name]]</label> 
</div>
<div class="form-group">
<label for="contact_telefoon" class="control-label">Telefoonnummer: </label> *<br />
<input type="tel" id="contact_telefoon" name="contact_telefoon" class="form-control"  size="11" value="[[!+fi.contact_telefoon]]" /> [[!+fi.error.contact_telefoon]]
</div>
<div class="form-group">
<label for="email" class="control-label">E-mailadres: </label> *<br />
<input type="email" id="email" name="email" class="email form-control" value="[[!+fi.email]]" /> [[!+fi.error.email]]
</div>
<div class="form-group required">
  <label for="contact_message" class="control-label">Je vraag of bericht: [[!+fi.error.contact_message:notempty=`<br />[[!+fi.error.contact_message]]`]]</label> *<br />
  <textarea id="contact_message" name="contact_message" rows="7" class="form-control"></textarea>
</div>
<div class="form-buttons">
    <input name="contactForm-submit" class="submit btn btn-primary" type="submit" value="Verzenden"/>
</div>
</form>
]]>
https://forums.modx.com/thread/103740/formit-stopped-working?page=2#dis-post-559231 Tue, 26 Jun 2018 09:11:16 +0000 https://forums.modx.com/thread/103740/formit-stopped-working?page=2#dis-post-559231
<![CDATA[ReCaptchaV2 + Formit, language issue : I'm not a robot txt always default context language]]> https://forums.modx.com/thread/103885/recaptchav2-formit-language-issue-i-m-not-a-robot-txt-always-default-context-language#dis-post-558859

reCaptcha v2 with Formit and Modx 2.6.3

Seams to work fine for me, and does not fires errors in the log from it but there's not a correct language detection.
Using 2 contexts (web = FR, EN = english) the text 'I'm not a robot' is always in the default language (French') ' Je ne suis pas un robot'. Even if I'm on may english side contact form.

the rendered html code in the Google iFrame show lang='fr'
`html dir="ltr" lang="fr"`

The [[++CultureKey] at this moment is however correct and set to 'en' ...?

Thank you]]>
https://forums.modx.com/thread/103885/recaptchav2-formit-language-issue-i-m-not-a-robot-txt-always-default-context-language#dis-post-558859 Fri, 01 Jun 2018 07:19:36 +0000 https://forums.modx.com/thread/103885/recaptchav2-formit-language-issue-i-m-not-a-robot-txt-always-default-context-language#dis-post-558859
<![CDATA[How do I stop FormProcessor from submitting a form on clicking return?]]> https://forums.modx.com/thread/46492/how-do-i-stop-formprocessor-from-submitting-a-form-on-clicking-return#dis-post-558510 https://forums.modx.com/thread/46492/how-do-i-stop-formprocessor-from-submitting-a-form-on-clicking-return#dis-post-558510 Sat, 12 May 2018 07:02:34 +0000 https://forums.modx.com/thread/46492/how-do-i-stop-formprocessor-from-submitting-a-form-on-clicking-return#dis-post-558510 <![CDATA[Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557493
[[!FormIt?
    &hooks=`recaptchav2,spam,email,redirect,FormItAutoResponder`
    &emailTpl=`EmailTpl`
    &emailTo=`karl@mycompany.com`
    &emailSubject=`'Contact Us' inquiry: [[+category]]`
    &fiarTpl=`AutoResponseTpl`
    &fiarSubject=`Thank You for Contacting Us`
    &fiarToField=`email`
    &fiarFromName=`My Company`
    &fiarFrom=`karl@mycompany.com`
    &redirectTo=`23`
    &store=`1`
    &validate=`nospam:blank,
      category:required,
      name:required,
      email:email:required,
      comment:required:stripTags`
    &vTextRequired=`Enter a value for this field`
    &category.vTextRequired=`Select a category`
    &name.vTextRequired=`Enter your name`
    &email.vTextRequired=`Enter your email address`
    &email.vTextEmailInvalid=`Enter a valid email address`
    &comment.vTextRequired=`Enter your comment or question`
    &validationErrorMessage=`<div class="val-error-hdr">
        <a href="[[~22]]" class="btn float-right">Reset form</a>
        <h3>Please review the following errors:</h3>
        <ul>
            [[+errors]]
        </ul>
        </div>`
]]
[[!+fi.validation_error_message]]

<h1 class="form-header">How May We Help You?</h1>
<form action="[[~[[*id]]]]" id="form-contact" method="post">
...


With this configuration, the recaptcha, email and autoresponse works fine, but it does not redirect. If I remove the FormItAutoResponder parameter, then redirect starts working.

Somehow, FormItAutoResponder is aborting the redirect before it can complete.

I have tried positioning FormItAutoResponder before the 'redirect' parameter, and it still stops the redirect from happening.

Any ideas on how to troubleshoot this?

Thanks in advance..

Karl]]>
https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557493 Tue, 20 Mar 2018 12:03:23 +0000 https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557493
<![CDATA[Formit/Formalicious redirectTo based off of context variable]]> https://forums.modx.com/thread/103459/formit-formalicious-redirectto-based-off-of-context-variable#dis-post-556650
&redirectTo=[[++membership_renewal_resource]]

it doesn't actually work. Is there a different way to achieve this?]]>
https://forums.modx.com/thread/103459/formit-formalicious-redirectto-based-off-of-context-variable#dis-post-556650 Thu, 01 Feb 2018 09:17:30 +0000 https://forums.modx.com/thread/103459/formit-formalicious-redirectto-based-off-of-context-variable#dis-post-556650
<![CDATA[Empty Formit messages come to my MODX admin email address]]> https://forums.modx.com/thread/103246/empty-formit-messages-come-to-my-modx-admin-email-address#dis-post-555920
I have a simple Formit form [[+name]], [[+email]], [[+text]]. It works fine when I try to use it on a website.
However I (form recipient email) receive mysterious messages that come FROM an admin email address (admin email address for this MODX installation!). These messages formatted like my quick email chunk, have a correct subject line (as specified in Formit code) but there's no user data, just Formit placeholders as in a code chunk. The messages look like this:
Inquiry from: [[+name]] ([[+email]])
Message:
[[+text]]


Formit code is here:
[[!FormIt?
   &hooks=`spam,email,redirect`
   &emailTpl=`message-tpl`
   &emailTo=`recipient@gmail.com`
   &emailSubject=`A mail from my site`
   &redirectTo=`1`
]]


So the questions - where are these coming from and why? Is it a security risk, spam related, do I loose my mail?
Please help smiley !]]>
https://forums.modx.com/thread/103246/empty-formit-messages-come-to-my-modx-admin-email-address#dis-post-555920 Sat, 16 Dec 2017 03:28:03 +0000 https://forums.modx.com/thread/103246/empty-formit-messages-come-to-my-modx-admin-email-address#dis-post-555920
<![CDATA[FormIt - Recaptchav2 validation problem with form]]> https://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=3#dis-post-553529
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=`xxxxxxxx@gmail.com`
&emailSubject=`Subject`
&fiarTpl=`quoteFormEmailRspTempl`
&fiarSubject=`Subject`
&fiarReplyTo=`xxxxxxxx@gmail.com`
&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>]]>
https://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=3#dis-post-553529 Fri, 01 Sep 2017 01:09:26 +0000 https://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=3#dis-post-553529
<![CDATA[Modx FormIt, redirect & successmessage]]> https://forums.modx.com/thread/102486/modx-formit-redirect-successmessage#dis-post-552231 i use formIt for my contactpage.
everything is working, i get email after sending form but the successmessage is not there if use "redirect" in hooks. when i don't use redirecting the successmessage is showing. the strange thing is: errormessage is working in both cases.

what could that be?

this works (successmessage is showing):


        [[!FormIt?
            &hooks=`spam,email`
            &emailTpl=`kontaktMail`
            &successMessage=`<span class="successMessage">Vielen Dank für Ihre Nachricht.</span>`
            &validationErrorMessage=`<span class="errorBlue_big">Bitte überprüfen Sie ihre Eingaben.</span>`
            &emailTo=`mailadress`
            &clearFieldsOnSuccess=`1`
            &validate=`nospam:blank,
            name:required,
            email:email:required,
            text:required:stripTags`
        ]]
        
        [[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p><br>`]] 
        [[!+fi.successMessage]]


this is not working (successmessage is not showing):

        [[!FormIt?
            &hooks=`spam,email,redirect`
            &redirectTo=`http://www.abc.ch#contact`
            &emailTpl=`kontaktMail`
            &successMessage=`<span class="successMessage">Vielen Dank für Ihre Nachricht.</span>`
            &validationErrorMessage=`<span class="errorBlue_big">Bitte überprüfen Sie ihre Eingaben.</span>`
            &emailTo=`email`
            &clearFieldsOnSuccess=`1`
            &validate=`nospam:blank,
            name:required,
            email:email:required,
            text:required:stripTags`
        ]]
        
        [[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p><br>`]] 
        [[!+fi.successMessage]]
]]>
https://forums.modx.com/thread/102486/modx-formit-redirect-successmessage#dis-post-552231 Sun, 02 Jul 2017 05:44:00 +0000 https://forums.modx.com/thread/102486/modx-formit-redirect-successmessage#dis-post-552231
<![CDATA[Support/Comments for SPForm]]> https://forums.modx.com/thread/46444/support-comments-for-spform?page=23#dis-post-552014 http://bobsguides.com/downloads/spform-1.0.4.zip
The MODx Revolution package is available for download here: SPForm, but is much easier to install via the Package Manager in Revolution.

Use this forum to post any comments about this addition or any questions you have regarding its use.

Brief Description:
A simple, easy to install, spamproof contact form snippet.]]>
https://forums.modx.com/thread/46444/support-comments-for-spform?page=23#dis-post-552014 Fri, 23 Jun 2017 11:14:32 +0000 https://forums.modx.com/thread/46444/support-comments-for-spform?page=23#dis-post-552014
<![CDATA[FormItSaveForm entries don't make sense]]> https://forums.modx.com/thread/101237/formitsaveform-entries-don-t-make-sense#dis-post-546355
In my formit tag (FormIt 2.2.11 / MODX 2.5.1) I have the necessary validation fields

&validate=`workemail:blank,
your_name:required,
phone_number:required,
email:email:required,
address_line1:required,
permit_number:required,
location:required,
agree:required`


However, I did an export today of all the entries. Many of them do not have all the fields completed, however all of them have your_name, phone_number, and email. Any idea why that would be?

Thanks.]]>
https://forums.modx.com/thread/101237/formitsaveform-entries-don-t-make-sense#dis-post-546355 Mon, 14 Nov 2016 02:05:17 +0000 https://forums.modx.com/thread/101237/formitsaveform-entries-don-t-make-sense#dis-post-546355