-
- Managing Form Submissions
- Searching and Filtering Submissions
- Submission Tracking Data
- Customizing Submission Columns
- Editing Submissions
- Deleting Submissions
- Importing Submissions
- Exporting Submissions
- Exporting Submissions with a Webhook URL
- Tracking the User's IP Address
- Disable Submission Storage
- Auto-Delete Old Submissions
- Auto-Save Each Submission to a JSON file
- Increment a Count on Each Submission
- Add a Unique ID to Each Submission
-
- Set up Auto-Responder Emails
- Email the Person Who Filled Out the Form
- Send an Email Only When a Checkbox Is Checked
- Attach the Submission PDF to Emails
- Send Email Based on Drop Down Selection
- Send Different Email Content Based on Form Responses
- Styling Emails with CSS
- Sending Plain-Text Alternative Body Emails
- Troubleshooting Email Delivery
- Tracking Sent Emails
- Resending Emails
-
- Browser Autocomplete for Form Fields
- Redirect to a Menu Item After Form Submission
- Show a Form Only to Logged-In Users
- Adding an “Other” Option
- Show or Hide Form Fields Based on User Joomla User Group
- 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
- Silently POST Submitted Data to Any API or URL
- Create a Custom Login Form
- Auto-Populate Fields with Article Data
- Add a placeholder text to a Dropdown field
- Create Multilingual Forms in Joomla
- Redirect User to a URL After Form Submission
- Importing and Exporting Forms
- Display Convert Forms in a popup
-
- 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 Field
- Block Form Submissions Containing Profanity (Bad Words)
- Block Email Addresses or Email Domains
- Honeypot
- Setting Up Google reCAPTCHA
- Create GDPR Compliant Forms
Enforcing a Custom Password Policy in Convert Forms
Would you like to enforce a strict password policy in Convert Forms that requires a combination of uppercase letters, lowercase letters, numbers, and symbols? While Convert Forms doesn’t strictly enforce these requirements by default, you can easily achieve this with a custom PHP function. In this guide, we’ll walk you through adding a custom code snippet to implement your password validation rules, ensuring stronger, more secure passwords in your Joomla forms.
Setup
To force your password policy, copy the code below and place it into your form's PHP Scripts → Form Process area.
$passwordFieldName = 'name'; // Set the name of the password field to check
$passwordLength = 8; // Set password length
$requireNumbers = true; // Check for numeric digits
$requireSymbols = true; // Check for symbols
$requireMixedCase = true; // Check for mixed case letters
$preventCommonPasswords = true; // Check for common passwords
// DO NOT EDIT BELOW
$password = $post[$passwordFieldName];
// Check password length
if (mb_strlen($password) < $passwordLength)
{
throw new Exception("Password must be at least $passwordLength characters long.");
}
// Check for numeric digits if required
if ($requireNumbers && !preg_match('/[0-9]/', $password))
{
throw new Exception('Password must contain at least one numeric digit.');
}
// Check for symbols if required
if ($requireSymbols && !preg_match('/[\W_]/u', $password))
{
throw new Exception('Password must contain at least one special character (e.g., @, #, $, %).');
}
// Check for mixed case letters if required
if ($requireMixedCase)
{
// Uppercase letters (Unicode-aware)
if (!preg_match('/\p{Lu}/u', $password))
{
throw new Exception('Password must contain at least one uppercase letter.');
}
// Lowercase letters (Unicode-aware)
if (!preg_match('/\p{Ll}/u', $password))
{
throw new Exception('Password must contain at least one lowercase letter.');
}
}
// Check for common passwords if required
if ($preventCommonPasswords)
{
$commonPasswords = [
'123456',
'password',
'qwerty',
'abc123'
];
if (in_array($password, $commonPasswords))
{
throw new Exception('Password is too common, please choose a more secure one.');
}
}
Last updated on Nov 26th 2024 12:11