Convert Forms
v4.4.10
-
- 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
-
- 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
-
- Enable Minimum Time to Submit
- 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
- Add Honeypot Protection
- Setting Up Google reCAPTCHA
- Create GDPR Compliant Forms
Block Email Addresses or Email Domains
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 block certain email addresses or email domains from your forms? You may have identified specific email addresses as spammers and want to stop those entries from being saved. Using a small PHP snippet you can easily block these email addresses from your site.
Setup
To restrict specific email addresses or domains, copy the code shown below and place it into the PHP Scripts -> Form Process area of your form.
// You can add as many email addresses as you'd like to this list.
$blacklist = [
'@domain1.com',
'@domain2.com',
'[email protected]'
];
// The name of the field representing the email address input
$field_name = 'email';
// The error message to show when an invalid email address is submitted
$error_message = 'This email is not allowed';
// Do not edit below
foreach ($blacklist as $blacklist_email)
{
if (stripos($post[$field_name], $blacklist_email) !== false)
{
throw new Exception($error_message);
}
}
Remember to update the $blacklist array with the email addresses and domains you want in your black list.
Last updated on Nov 26th 2024 12:11