Skip to content

CLIENTS & SUPPORT

Rename the Company Name Field in WHMCS

WHMCS asks every client for a Company Name. Our clients are councils, so we show Council Name instead. This procedure explains how that was done and how to repeat it, or put it back after a WHMCS upgrade.

The label is changed with language overrides. The stored field is still companyname, so email merge fields, invoices and the API are unaffected.

WHMCS is installed in public_html/portal on server.netwisetraining.com, under the netwiseuk cPanel account.

1. Add the client area override

Create lang/overrides/english.php inside the WHMCS folder, creating the overrides folder first if it does not exist, and add:

<?php
$_LANG['clientareacompanyname'] = "Council Name";
$_LANG['orderForm']['companyName'] = "Council Name";

The first line covers the client's own details pages. The second covers the signup form, which uses a different key.

2. Add the admin area override

Create admin/lang/overrides/english.php and add:

<?php
$_ADMINLANG['fields']['companyname'] = "Council Name";

This changes the label on the client profile you see in the admin area.

Note

The overrides folder must sit inside admin/lang, not directly in admin. cPanel's file editor will not create the folder for you, so create it in File Manager first.

3. Remove "(Optional)" from the signup form

The signup form adds "(Optional)" to the company field from the template itself, so a language override cannot remove it.

In templates/twenty-one/clientregister.tpl, find the line for the inputCompanyName field and change the placeholder from:

placeholder="{lang key='orderForm.companyName'} ({lang key='orderForm.optional'})"

to:

placeholder="{lang key='orderForm.companyName'}"

Take a copy of the file before editing it.

Final check

  1. Open the portal signup page at netwiseuk.com/portal/register.php and confirm the field says Council Name with no "(Optional)".
  2. Open a client profile in the WHMCS admin area and confirm the label says Council Name.
  3. Open a client's own details page in the client area and confirm the label there. This page was not checked when the change was made.

After a WHMCS upgrade

The two override files are not touched by upgrades, so the Council Name labels stay.

An upgrade replaces the stock template, so step 3 is lost and the signup form goes back to "Council Name (Optional)". Repeat step 3 if the "(Optional)" text matters.

Troubleshooting

The label still says Company Name

  • Check the override file is called english.php and sits in the right overrides folder.
  • Check the file starts with <?php.
  • If a screen still shows the old label, that screen probably uses a different language key. Find the key in the main language file and add it to the override.