FormIt - MODX Community Forums https://forums.modx.com/board/?board=92 <![CDATA[Formit and QuickEmail nothing sent]]> https://forums.modx.com/thread/104461/formit-and-quickemail-nothing-sent#dis-post-564153 https://forums.modx.com/thread/104461/formit-and-quickemail-nothing-sent#dis-post-564153 Tue, 19 Feb 2019 10:37:10 +0000 https://forums.modx.com/thread/104461/formit-and-quickemail-nothing-sent#dis-post-564153 <![CDATA[New FormIt Hook and Prehook to prevent bot attacks.]]> https://forums.modx.com/thread/104912/new-formit-hook-and-prehook-to-prevent-bot-attacks#dis-post-564125 So I created a cool-down hook to slow the bots down. Most people do not submit form twice so quickly.

It is working for me, but I was wondering if anyone else could use it, and or did I miss a feature.
The prehook creates a session with a timestamp. The hook compares it to the time and a delay.

FormItWaitForItPreHook
<?php
$waitSessionName = $modx->getOption('waitSessionName', $formit->config, 'waitSession');
if (!isset($_SESSION[$waitSessionName])) {
	$_SESSION[$waitSessionName] = time();
}
// debug
// $hook->setValue('session', $_SESSION[$waitSessionName] . ' - ' . time());
return true;


FormItWaitForIt
<?php
$waitSessionName = $modx->getOption('waitSessionName', $formit->config, 'waitSession');
$delay = $modx->getOption('delay', $formit->config, 15);
$delayPenalty = $modx->getOption('delayPenalty', $formit->config, 30);

$delayTimer = ($_SESSION[$waitSessionName] - time()) + $delayPenalty;
$s = $delayTimer%60;
$dTm = floor(($delayTimer % 3600) / 60);
$dTh = floor(($delayTimer % 86400) / 3600);
$m = $dTm>0?$dTm.' minute'.($dTm>1?'s':''):'';
$h = $dTh>0?$dTh.' hour'.($dTh>1?'s':''):'';

$timeRemaining = "$h $m $s seconds" . ' ' . $_SESSION[$waitSessionName] . ' ' . $delayTimer;

$waitErrorMsg = $modx->getOption('waitErrorMsg', $formit->config, 'Too soon, please wait [[!+timeRemaining]]');

if ($_SESSION[$waitSessionName]+$delay <= time()){
  $_SESSION[$waitSessionName] = time();
  return true;
} else {
  $_SESSION[$waitSessionName] = time() + $delayTimer;
  $modx->log(modX::LOG_LEVEL_INFO, $_SESSION[$waitSessionName]);
  $hook->addError('waitError',$waitErrorMsg);
  $modx->setPlaceholder('timeRemaining', $timeRemaining);
  return false;
}



Test Form
[[!FormIt?
   &preHooks=`FormItWaitForItPreHook`
   &hooks=`FormItWaitForIt,redirect`
   &emailTpl=`MyEmailChunk`
   &emailTo=`me@gmail.com`
   &redirectTo=`1`
]]
 
<h1>Session Form</h1>
<span class="errors">[[!+fi.error.waitError]]</span>
<form action="[[~[[*id]]]]" method="post" class="form">
    <div class="form-row">
        <label for="session">Session</label>
        <input type="text" name="session" size="50" autocomplete="off" class="form-field" value="[[!+fi.session]]"/>
    </div>
    <button type="submit" class="submit-button">Submit</button>
</form>
]]>
https://forums.modx.com/thread/104912/new-formit-hook-and-prehook-to-prevent-bot-attacks#dis-post-564125 Mon, 18 Feb 2019 04:21:01 +0000 https://forums.modx.com/thread/104912/new-formit-hook-and-prehook-to-prevent-bot-attacks#dis-post-564125
<![CDATA[ [SOLVED] FormIt not sending mail on localhost]]> https://forums.modx.com/thread/47653/solved-formit-not-sending-mail-on-localhost?page=2#dis-post-563827 I’ve just recently made the change from Evolution to Revolution and am having trouble getting FormIt to actually send email.

I’m sure this is a really newb question but I’d be very grateful for any help as I’ve been unable to find an answer.

Basically the form is set up and validating fine, but when I hit submit it just refreshes the existing page. Below is my code:

The contact form (template):

[[!FormIt?
   &hooks=`email,redirect,spam`
   &emailTpl=`sent_email_template`
   &emailTo=`harmony123@bigpond.com.au`
   &emailSubject=`Enquiry via website`
   &redirectTo=`21`   
   &validate=`name:required,
	      email:email,
	      text:required`
    ]]

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

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

        <label for="name" >Name<span class="error">[[+fi.error.name]]</span></label>
        <input type="text" name="name" maxlength="60"  value="[[+fi.name]]" />

        <label for="email" >Email<span class="error">[[+fi.error.email]]</span></label>
        <input type="text" name="email" size="40" maxlength="40"  value="[[+fi.email]]" />

        <input type="hidden" name="phone" value="" /> 

        <label for="text">Message<span class="error">[[+fi.error.text]]</span></label>
        <textarea cols="40" rows="7" name="text" value="[[+fi.text]]">[[+fi.text]]</textarea>

        <input type="image" name="submit" class="submit" alt="Send" src="assets/images/global/send.png" />

    </form>


sent_email_template (chunk):

<br />[[+name]] ([[+email]]) Wrote: <br />  [[+text]] 



Any idea if it’s something wrong with my code, or a setting in modx or the FormIt package I need to change?

Many thanks in advance for any help you can give me.

Harmony]]>
https://forums.modx.com/thread/47653/solved-formit-not-sending-mail-on-localhost?page=2#dis-post-563827 Tue, 29 Jan 2019 07:45:04 +0000 https://forums.modx.com/thread/47653/solved-formit-not-sending-mail-on-localhost?page=2#dis-post-563827
<![CDATA[Formit upgrade to 4.1.0 has messed up all previously encrypted stored form data]]> https://forums.modx.com/thread/104569/formit-upgrade-to-4-1-0-has-messed-up-all-previously-encrypted-stored-form-data#dis-post-562504
What a pain!

Cheers,

dubbs.]]>
https://forums.modx.com/thread/104569/formit-upgrade-to-4-1-0-has-messed-up-all-previously-encrypted-stored-form-data#dis-post-562504 Fri, 02 Nov 2018 07:55:02 +0000 https://forums.modx.com/thread/104569/formit-upgrade-to-4-1-0-has-messed-up-all-previously-encrypted-stored-form-data#dis-post-562504
<![CDATA[Multipage and FormitRetreiver and &store Issue]]> https://forums.modx.com/thread/100537/multipage-and-formitretreiver-and-store-issue?page=2#dis-post-562248
Step (Page 1)

 [[!FormIt?
   &hooks=`redirect`
    &validate=`donation_type:required, amount:required`
       &store=`1`
       &storeTime=`1200`
   &redirectTo=`2`
]]  


Step 2 (Page 2)
[[!FormItRetriever]]
 [[!FormIt? &submitVar=`regular-donation` &hooks=`redirect` &store=`1` &validate=`nospam:blank,email:email:required,DonorTitle:required,Donor_FirstName:required,Donor_LastName:required` &redirectTo=`4` ]]


To this stage all works well the information from Page 1 has been stored and appears in the hidden fields of Page 2

Step 3 (Page 3)
[[!FormItRetriever]]
 [[!FormIt? &submitVar=`dd_donation` &hooks=`email,redirect` &validate=`nospam:blank,email:email:required,DonorTitle:required,Donor_FirstName:required,Donor_LastName:required,Donation_Frequency:required` &emailTpl=`regular_donation_emailTpl` &emailTo=`myemail@domain.com`  &redirectTo=`5` ]]


However the fields from Page 2 do not appear, the fields from Page 1 do... The form does not submit because the fields that should appear from Page 2 are not there and these are required fields.

Suggestions please as to why the &store=`1` doesn't appear to be storing the data from Step 2 to Step 3.

Thank you

Environment:

MODX Cloud
Revo 2.5.0
Formit 2.2.10]]>
https://forums.modx.com/thread/100537/multipage-and-formitretreiver-and-store-issue?page=2#dis-post-562248 Mon, 22 Oct 2018 05:02:13 +0000 https://forums.modx.com/thread/100537/multipage-and-formitretreiver-and-store-issue?page=2#dis-post-562248
<![CDATA[Failed Formit 4.1.0 upgrade and now no manager!]]> https://forums.modx.com/thread/104259/failed-formit-4-1-0-upgrade-and-now-no-manager#dis-post-562150
Any ideas what is going on and how to fix???

Looks like same issues here > https://github.com/Sterc/FormIt/issues/183]]>
https://forums.modx.com/thread/104259/failed-formit-4-1-0-upgrade-and-now-no-manager#dis-post-562150 Wed, 17 Oct 2018 03:00:08 +0000 https://forums.modx.com/thread/104259/failed-formit-4-1-0-upgrade-and-now-no-manager#dis-post-562150
<![CDATA[FormIt Action to Existing PHP Processor]]> https://forums.modx.com/thread/104433/formit-action-to-existing-php-processor#dis-post-561723
I am running into an issue where I have an existing PHP processor with my CRM where presently I have a form stored in a chunk with the action pointed at my CRM (action="https://myCRM.domain.com/form.php").

I want to use FormIt to validate fields and then send the form to my existing action point.

What is the best approach here?
]]>
https://forums.modx.com/thread/104433/formit-action-to-existing-php-processor#dis-post-561723 Mon, 24 Sep 2018 03:46:44 +0000 https://forums.modx.com/thread/104433/formit-action-to-existing-php-processor#dis-post-561723
<![CDATA[Formit not working]]> https://forums.modx.com/thread/92686/formit-not-working?page=2#dis-post-560929
Here's my code which is a cut-down version of the instructions from http://rtfm.modx.com/extras/revo/formit/formit.tutorials-and-examples/formit.examples.simple-contact-page

[[!FormIt?
   &hooks=`email,redirect`
   &emailTpl=`MyEmailChunk`
   &emailTo=`[[+email]]`
   &emailFrom=`emailaddress@domain.com` /* changed to protect the innocent */
   &emailSubject=`Portofino FormIt Form`
   &redirectTo=`10`
   &validate=`name:required,
      email:email:required,
      subject:required,
      text:required:stripTags,`
]]

<h2>Contact Form</h2>
 
[[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p>`]]
 
<form action="[[~[[*id]]]]" method="post" class="form">
    <input type="hidden" name="nospam:blank" value="[[+fi.nospam]]" />
 
    <label for="name">
        Name:
        <span class="error">[[!+fi.error.name]]</span>
    </label>
    <input type="text" name="name" id="name" value="[[!+fi.name]]" /><br />
 
    <label for="email">
        Email:
        <span class="error">[[!+fi.error.email]]</span>
    </label>
    <input type="text" name="email" id="email" value="[[!+fi.email]]" /><br />
 
    <label for="subject">
        Subject:
        <span class="error">[[!+fi.error.subject]]</span>
    </label>
    <input type="text" name="subject" id="subject" value="[[!+fi.subject]]" /><br />
 
    <label for="text">
        Message:
        <span class="error">[[!+fi.error.text]]</span>
    </label>
    <textarea name="text" id="text" cols="55" rows="7" value="[[!+fi.text]]">[[!+fi.text]]</textarea><br /><br />
 
    <br class="clear" />
 
    <div class="form-buttons">
        <input type="submit" value="Send Contact Inquiry" />
    </div>
</form>


and my chunk:

This is the Formit Email Chunk.
 
<br />[[+name]] ([[+email]]) Wrote: <br />
 
[[+text]]


the test page can be viewed at http://portofino.com.ph/modx/test.html

What I have tried:

- Bob's QuickEmail snippet which works no problem (thanks Bob I sent you a donation)

- a simple phpmail() snippet which works no problem

<?php
mail("myemailaddress@mydomain.com","php mail test","this works if you are reading it","From: emailaddress@domain.com");


- installing the same code at another site (hosted by hostgator) which works no problem http://outoftheblue.com.ph/modx/test.html

I can only conclude there is nothing fundamentally wrong with my code, but rather something queer about the interaction of formit and the host.

Any suggestions out there or do I just 'roll my own form' and abandon formit? Two days wasted on this already sad

MODx 2.3.1 traditional
MySQL 5.0.77
PHP Mailer 5.2.8 (can't view phpinfo they have blocked it's use server-side)]]>
https://forums.modx.com/thread/92686/formit-not-working?page=2#dis-post-560929 Mon, 20 Aug 2018 06:33:20 +0000 https://forums.modx.com/thread/92686/formit-not-working?page=2#dis-post-560929
<![CDATA[How to create Resources from the front end FormIt 4.0?]]> https://forums.modx.com/thread/104286/how-to-create-resources-from-the-front-end-formit-4-0#dis-post-560917 Snippets from here https://forums.modx.com/thread/31314/how-to-create-resources-documents-from-the-front-end-with-a-form
not working.

Anyone can help, please?]]>
https://forums.modx.com/thread/104286/how-to-create-resources-from-the-front-end-formit-4-0#dis-post-560917 Sun, 19 Aug 2018 08:13:46 +0000 https://forums.modx.com/thread/104286/how-to-create-resources-from-the-front-end-formit-4-0#dis-post-560917
<![CDATA[FormIT 4.0 update broke manager login]]> https://forums.modx.com/thread/103766/formit-4-0-update-broke-manager-login#dis-post-560805 The error is:
mod_fcgid: stderr: PHP Parse error: syntax error, unexpected '[' in /home/webs60/public_html/core/components/formit/src/FormIt.php on line 24

I installed it on another site to see if it was an update issue and the same thing happened with the same error and stopping me from logging into manager.

Line 24 is:
public $config = [];

Any ideas?]]>
https://forums.modx.com/thread/103766/formit-4-0-update-broke-manager-login#dis-post-560805 Wed, 15 Aug 2018 09:31:05 +0000 https://forums.modx.com/thread/103766/formit-4-0-update-broke-manager-login#dis-post-560805
<![CDATA[SOLVED: Custom Formit Hook]]> https://forums.modx.com/thread/71441/solved-custom-formit-hook#dis-post-560468
I'm having a little issue with a Formit Hook that I made for a 3PC I'm working on. This might be a case of me just staring at it too long and missing something obvious (I'm hoping) so I figured I'd ask here for a new set of eyes.

The Formit call for adding items to my db is as follows:
[[!FormIt?
   &hooks=`erHook,redirect`
   &redirectTo=`[[*id]]`
   &redirectParams=`{"success":"1"}`
   &validate=`name:required,cat_id:required`
   &submitVar=`addItem`
]]


The hook code is as follows:
<?php
$easyrestaurant = $modx->getService('easyrestaurant','Easyrestaurant',$modx->getOption('easyrestaurant.core_path',null,$modx->getOption('core_path').'components/easyrestaurant/').'model/easyrestaurant/',$scriptProperties);
if (!($easyrestaurant instanceof Easyrestaurant)) return '';

$edit = $hook->getValue('edit');
$itemid = $hook->getValue('itemid');

if($edit == 1) { $easyrestaurant_hook = $modx->getObject('erItems',$itemid); } else { $easyrestaurant_hook = $modx->newObject('erItems'); }
if (empty($easyrestaurant_hook)) {return 'I didn\'t get an object..';}
$easyrestaurant_hook->fromArray($scriptProperties['fields']);
$easyrestaurant_hook->save();
return true;


Editing items works great... Things are saving to the database successfully.. no problems there.

For some reason...I can't create new items though. The form is completely processed and returns with the success param, but no new items are in the database.

My initial inclination was that I was passing the edit field to the form accidentally and it was trying to edit an item that didn't exist, but I did some error checking there and it appears to be properly executing the "else" statement.

What are my tired eyes missing?

Thanks in advance!
-Jared]]>
https://forums.modx.com/thread/71441/solved-custom-formit-hook#dis-post-560468 Tue, 07 Aug 2018 01:35:32 +0000 https://forums.modx.com/thread/71441/solved-custom-formit-hook#dis-post-560468
<![CDATA[Formit 4.1.0 on Revo 2.6.5]]> https://forums.modx.com/thread/104168/formit-4-1-0-on-revo-2-6-5#dis-post-560283
An error occurred while trying to send the email. SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting


Error logo shows these:

[2018-07-30 21:13:22] (ERROR @ /public_html/core/components/formit/src/FormIt/Request.php : 87) [FormIt] Could not load FormItReCaptcha service class.
[2018-07-30 21:13:22] (ERROR @ /public_html/core/components/formit/src/FormIt/Hook/Email.php : 303) [FormIt] An error occurred while trying to send the email. SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting


Any ideas?]]>
https://forums.modx.com/thread/104168/formit-4-1-0-on-revo-2-6-5#dis-post-560283 Tue, 31 Jul 2018 08:11:52 +0000 https://forums.modx.com/thread/104168/formit-4-1-0-on-revo-2-6-5#dis-post-560283
<![CDATA[Formatting checkboxes when displaying results with FormItRetriever]]> https://forums.modx.com/thread/104140/formatting-checkboxes-when-displaying-results-with-formitretriever#dis-post-560074
Got a question that's been bugging me all morning as I try to convert an email form to one that displays on a webpage for the user to then print. I have a form set up with FormIt so that when the user hits submit, it goes to a new page and displays all the form fields with FormItRetriever. It's a nitpick, but I want to display checkbox values on separate lines, rather than the default comma separated.

e.g.

value 1
value 2

rather than

value 1,value 2

With email, I know I can format this with &emailMultiWrapper and &emailMultiSeparator in the FormIt call. Is there any way to do this with FormItRetriever?

Thanks in advance,

Kahli]]>
https://forums.modx.com/thread/104140/formatting-checkboxes-when-displaying-results-with-formitretriever#dis-post-560074 Fri, 27 Jul 2018 01:56:13 +0000 https://forums.modx.com/thread/104140/formatting-checkboxes-when-displaying-results-with-formitretriever#dis-post-560074
<![CDATA[FormIt 4.0 / 4.1 "Fatal error: Class 'Sterc\FormIt' not found"]]> https://forums.modx.com/thread/103984/formit-4-0-4-1-fatal-error-class-sterc-formit-not-found#dis-post-559253
I was about to update FormIt from 3.0.4 to the latest version 4.1.0.

My contact form works fine under 3.x and prior, but for any 4.x version my page shows following error:

Fatal error: Class 'Sterc\FormIt' not found in /www/htdocs/###/core/components/formit/model/formit/formit.class.php on line 28

I had a look at this file, and it has changed from prior versions. For now I reverted back to 3.0.4 but would like to figure out what went wrong.

I'm running my page with MODX Revolution 2.6.3-pl under PHP7.0.

Does anyone have similar issues, or an idea what the issue may be?

Thank you
Mark]]>
https://forums.modx.com/thread/103984/formit-4-0-4-1-fatal-error-class-sterc-formit-not-found#dis-post-559253 Tue, 26 Jun 2018 11:31:20 +0000 https://forums.modx.com/thread/103984/formit-4-0-4-1-fatal-error-class-sterc-formit-not-found#dis-post-559253
<![CDATA[How to collect different forms to one result?]]> https://forums.modx.com/thread/103925/how-to-collect-different-forms-to-one-result#dis-post-558958
I'm using a formit to a resultpage (id=12) where I want to show both name1 and name2. I use the store-function of FormIt to keep the data in session.

[[!FormItRetriever? &storeLocation=`session`]]

[[!FormIt? 
&submitVar=`send`
&hooks=`redirect`
&redirectTo=`12`
&store=`1`
&storeLocation=`session`
&storeTime=`900`
]]

on the resultpage I call [[+fi.name1]] and [[+fi.name2]]


The problem is that only the last filled in name is showed on the resultpage. So if I last fill in name2 then name1 is blank on the resultpage and name2 is filled in and vice versa.

Am I getting crazy or why is this not working?]]>
https://forums.modx.com/thread/103925/how-to-collect-different-forms-to-one-result#dis-post-558958 Thu, 07 Jun 2018 06:47:50 +0000 https://forums.modx.com/thread/103925/how-to-collect-different-forms-to-one-result#dis-post-558958
<![CDATA[How to display success message?]]> https://forums.modx.com/thread/103878/how-to-display-success-message#dis-post-558682
[[!FormIt?
&hooks=`email,attachment`
&emailTpl=`[[+emailChunk]]`
&emailTo=`[[+teamselect]]`
&attachment=`[[+filedata]]`
&emailSubject=`Request from [[+formName]]`
&emailFromName=`Profiles`
&emailFrom=`Profiles@xjtlu.edu.cn`
&validate=`[[+validation:default=`
formName:required,
formEmailAddress:email:required,
teamselect:required,
formQuery:required,
whatAreYouDoing:blank
`]]`
&successMessage=`Your comment has been submitted successfully.`
&validationErrorMessage=`<div class="alert alert-error">
<h3>Please review the following errors:</h3>
<ul>
[[!+fi.error.formName:!empty=`<li><a href="[[~[[*id]]]]#formName">Name is a required field</a></li>`]]
[[!+fi.error.formEmailAddress:!empty=`<li><a href="[[~[[*id]]]]#formEmailAddress">Email is a required field</a></li>`]]
</ul>
</div>`
]]


[[!+fi.validation_error_message:!empty=`
<div class="alert alert-error xjtlurequest">
<h3>Please review the following errors:</h3>
<ul>
[[!+fi.error.formName:!empty=`<li><a href="[[~[[*id]]]]#formName">Name is a required field</a></li>`]]
[[!+fi.error.formEmailAddress:!empty=`<li><a href="[[~[[*id]]]]#formEmailAddress">Email is a required field</a></li>`]]
</ul>
</div>`]]

[[!fi.successMessage]]

<div class="well xjtlurequest">
<form method="post" action="[[~[[*id]]]]" id="[[+formId:default=`contact-us`]]" enctype="multipart/form-data">
<fieldset>
<legend>Contact Us</legend>
<input type="hidden" value="[[*pagetitle]]" name="formPage" id="formPage">
<p>
<label for="formName">Name [[!+fi.error.formName:notempty=`[[!+fi.error.formName]]`]]</label>
<input type="text" name="formName" id="formName" value="[[!+fi.formName]]">
</p>
<p>
<label for="formEmailAddress">Email [[!+fi.error.formEmailAddress:notempty=`[[!+fi.error.formEmailAddress]]`]]</label>
<input type="email" name="formEmailAddress" id="formEmailAddress" value="[[!+fi.formEmailAddress]]">
</p>
<p>
<label for="formPhoneNumber">Telephone [[!+fi.error.formPhoneNumber:notempty=`[[!+fi.error.formPhoneNumber]]`]]</label>
<input type="text" name="formPhoneNumber" id="formPhoneNumber" value="[[!+fi.formPhoneNumber]]">
</p>

<label for="teamselect">Please chose a thing for requesting....
[[!+fi.error.teamselect:notempty=`[[!+fi.error.teamselect]]`]]</label>
<select name="teamselect">
<option value="News@xjtlu.edu.cn" [[!+fi.teamselect:FormItIsSelected=`News@xjtlu.edu.cn`]] >News</option>
<option value="News@xjtlu.edu.cn" [[!+fi.teamselect:FormItIsSelected=`News@xjtlu.edu.cn`]] >Events</option>
<option value="Marketing@xjtlu.edu.cn" [[!+fi.teamselect:FormItIsSelected=`Marketing@xjtlu.edu.cn`]] >Web Content Update</option>
<option value="zhefei.zhu@xjtlu.edu.cn" [[!+fi.teamselect:FormItIsSelected=`zhefei.zhu@xjtlu.edu.cn`]] >Web Tech Matters</option>
<option value="439973358@qq.com" [[!+fi.teamselect:FormItIsSelected=`439973358@qq.com`]] >General Matters</option>
</select>

<p>
<label for="formQuery">Request [[!+fi.error.formQuery:notempty=`[[!+fi.error.formQuery]]`]]</label>
<textarea rows="5" cols="30" name="formQuery" id="formQuery" wrap="hard">[[!+fi.formQuery]]</textarea>
</p>

<p>
<input id="filedata" name="filedata" type="file" value="[[+fi.filedata]]">
</p>

<p>
<button type="submit">Send</button>
<input type="hidden" name="whatAreYouDoing" value="">
[[!FormItRetriever]]
</p>
</fieldset>
</form>
</div>
]]>
https://forums.modx.com/thread/103878/how-to-display-success-message#dis-post-558682 Tue, 22 May 2018 03:04:12 +0000 https://forums.modx.com/thread/103878/how-to-display-success-message#dis-post-558682
<![CDATA[Bulk delete FormIt submissions]]> https://forums.modx.com/thread/103834/bulk-delete-formit-submissions#dis-post-558547 I have been making a form for a client. The submissions are saved using the the FormItSaveForm hook. When the client need the submission data, they go to the Extra/Formit menu and export a csv-file. They can remove/delete the submissions one by one.

I would like to make it possible to bulk delete these submission, but where do I start? Anyone who could point me in the right direction? An option for bulk deleting uploaded files in the mediabrowser would be nice too.

Best regards Gitte]]>
https://forums.modx.com/thread/103834/bulk-delete-formit-submissions#dis-post-558547 Mon, 14 May 2018 09:28:25 +0000 https://forums.modx.com/thread/103834/bulk-delete-formit-submissions#dis-post-558547
<![CDATA["Form Select" dropdown in formit CMP]]> https://forums.modx.com/thread/103769/form-select-dropdown-in-formit-cmp#dis-post-558339
The 'Form Select' dropdown list in the Formit CMP is empty, even though I have at least 5 different forms. I cannot select any. Should I enter some value for a variable in the systems settings?

Tnx for your help

Ludo
]]>
https://forums.modx.com/thread/103769/form-select-dropdown-in-formit-cmp#dis-post-558339 Thu, 03 May 2018 01:38:13 +0000 https://forums.modx.com/thread/103769/form-select-dropdown-in-formit-cmp#dis-post-558339
<![CDATA[Formit 4.0 - cannot have two forms on the same page]]> https://forums.modx.com/thread/103782/formit-4-0---cannot-have-two-forms-on-the-same-page#dis-post-558292
Two forms on one and the same page. That should be no problem.

But do try the following code - and have it executed on a modx installation with formit 4.0.

[[!formit? &hooks=`redirect` &store=`1` &redirectTo=`90` &submitVar=`foo`]]

<form id="form1" action="[[~[[*id]]]]" method="post">
    <input type="submit" name="foo" class="btn btn-primary" value="Submit Inquiry">
</form>

<p>Something else</p>

[[!formit? &hooks=`redirect`  &store=`1` &redirectTo=`90` &submitVar=`bar`]]

<form id="form2" action="[[~[[*id]]]]" method="post">
    <input type="submit" name="bar" class="btn btn-primary" value="Submit Inquiry">
</form>


The first submit button executes the redirect. The second one doesn't do anything.

Is that a bug?

KInd regards

Ludo
]]>
https://forums.modx.com/thread/103782/formit-4-0---cannot-have-two-forms-on-the-same-page#dis-post-558292 Mon, 30 Apr 2018 05:48:54 +0000 https://forums.modx.com/thread/103782/formit-4-0---cannot-have-two-forms-on-the-same-page#dis-post-558292
<![CDATA[formit succes message]]> https://forums.modx.com/thread/47588/formit-succes-message?page=3#dis-post-557948
I have an e-mail form which returns to the same page after sending.
I want to give the user a confirmation. Something basic, like "Your message has been send!" above the form.

I think I need to use hooks... but how? Can anybody help me? Thanks!]]>
https://forums.modx.com/thread/47588/formit-succes-message?page=3#dis-post-557948 Wed, 11 Apr 2018 02:05:00 +0000 https://forums.modx.com/thread/47588/formit-succes-message?page=3#dis-post-557948