That's okay. Try this (untested) code:
Find the following file:
includes/modules/create_account.php
Copy the file into your override system, so you have this:
includes/modules/your_template/create_account.php
In your override file, find this block of code (around line 113):
PHP Code:
if (ACCOUNT_COMPANY == 'true') {
if ((int)ENTRY_COMPANY_MIN_LENGTH > 0 && strlen($company) < ENTRY_COMPANY_MIN_LENGTH) {
$error = true;
$messageStack->add('create_account', ENTRY_COMPANY_ERROR);
}
}
Directly underneath it, add this:
PHP Code:
// BEGIN Company Filter 1/1
if (preg_match('/\bnone\b/i', $company)) {
$error = true;
$messageStack->add('create_account', COMPANY_FILTER_ERROR);
} else if (preg_match('/\bn\/a\b/i', $company)) {
$error = true;
$messageStack->add('create_account', COMPANY_FILTER_ERROR);
}
// END Company Filter 1/1
Then in includes/languages/english/extra_definitions/
Create a file called company_filter_defines.php
In that file, add this:
PHP Code:
<?php
define('COMPANY_FILTER_ERROR', 'Please leave the company field blank if you are not a company.');
?>
Bookmarks