Convert Forms
v4.4.10
- Getting Started
- Field Types
- Email Notifications
-
Integrations
- MailerLite
- Create User Accounts with Convert Forms
- MailChimp
- HubSpot
- GetResponse
- AcyMailing
- Content App
- Webhooks Addon
- Facebook Meta Pixel
- Google Adwords
- Sync submissions with your favorite app
- Integrate Drip Ecommerce CRM with Convert Forms
- Google Analytics
- Constant Contact
- SalesForce Web-to-Lead
- IContact
- Zoho CRM
- Elastic Email
- Zoho Campaigns
- Zapier
- Kit
- Brevo (Sendinblue)
- Campaign Monitor
- AWeber
- ActiveCampaign
-
Functionality
- Show or Hide Form Fields Based on User Joomla User Group
- Disabling Browser Autocomplete for Form Fields
- Scroll the Page to the Top When a Long Form is Submitted
- Display Submissions Count for a Specific Form
- Populate Drop Down, Radio Buttons or Checkboxes with a CSV File
- Automatically Delete Submissions Older Than X Days
- Silently POST Submitted Data to Any API or URL
- Automatically Save Each Submission to a JSON file
- Authenticate and Login a User with a Custom Joomla Form
- Auto-Populate a Form Field with an Article Data
- Add a placeholder text to a Dropdown
- Create Multilingual Forms in Joomla
- Create a custom Joomla User Registration Form
- Redirect User to a URL After Form Submission
- Export and Import Forms across different Websites
- Export Form Submissions to CSV
- Convert Forms
- Styling and Customization
- Payment Forms
-
Advanced Features
- How to Create a Quiz Form
- Displaying a Popup After Form Submission Using EngageBox
- Conditional Content Shortcode in Convert Forms
- Copy Value From One Field to Another
- Tasks
- Export Form Submissions with a Webhook URL
- Conditional Fields
- PDF Form Submissions
- Input Masks
- Field Calculations
- Auto-Populate Form Fields Using Query String
- Use Smart Tags
- Developers
- Troubleshooting and Support
-
Spam, Security & Compliance
- Restrict Form Submissions Based on IP
- Enforcing a Custom Password Policy in Convert Forms
- Add Cloudflare Turnstile to your Joomla Form
- Implement the Iubenda Consent Database in Joomla with Convert Forms
- Add Custom Validations to Fields and Forms
- Add Math Captcha to your Form
- Prevent a Field From Saving in the Database
- Add hCaptcha to your Form
- Enable Double Opt-in
- Allow Form Submissions in Specific Date Range
- Ensure a Unique Value is Entered Into a
- Block Form Submissions Containing Profanity (Bad Words)
- Block Email Addresses or Email Domains
- Native Convert Forms Anti-spam Protection with Honeypot
- Setting Up Google reCAPTCHA
- Create GDPR Compliant Forms
Automatically Delete Submissions Older Than X Days
Heads up! This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Would you like to automatically delete old submissions that are older than a specific amount of days? This is quite useful when you don't want to keep old submissions and would like to automatically remove them instead of manually going over them. The following PHP snippet will allow you to automatically delete old submissions.
Setup
To delete your old submissions, copy the code shown below and place it into the PHP Scripts -> After Form Submission area of your form.
// Set how long the submissions need to be in order to be deleted
$total_days_ago = 5;
// Do not edit below
$form_id = $submission->form_id;
$query = $db->getQuery(true)
->select('*')
->from($db->quoteName('#__convertforms_conversions'))
->where($db->quoteName('form_id') . ' = ' . $form_id)
->where('DATE(created) < DATE_SUB(CURDATE(), INTERVAL ' . $total_days_ago . ' DAY)');
$db->setQuery($query);
$rows = $db->loadObjectList();
foreach ($rows as $key => $row)
{
ConvertForms\Api::removeSubmission($row->id);
}
Remember to set how long your submissions needs to be in order to be removed by setting the variable $total_days_ago
Last updated on Nov 26th 2024 12:11