diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index fbc8f87750..edbd691c2c 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -382,7 +382,7 @@ class acp_profile
// $exclude contains the data we gather in each step
$exclude = array(
- 1 => array('field_ident', 'field_icon', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_pm', 'field_show_on_vt', 'field_show_on_ml', 'field_required', 'field_show_novalue', 'field_hide', 'field_show_profile', 'field_no_view', 'field_is_contact', 'field_contact_desc', 'field_contact_url'),
+ 1 => array('field_ident', 'field_icon', 'field_icon_color', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_pm', 'field_show_on_vt', 'field_show_on_ml', 'field_required', 'field_show_novalue', 'field_hide', 'field_show_profile', 'field_no_view', 'field_is_contact', 'field_contact_desc', 'field_contact_url'),
2 => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'),
3 => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options')
);
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
index c5290c8313..ff97c32071 100644
--- a/phpBB/language/en/acp/profile.php
+++ b/phpBB/language/en/acp/profile.php
@@ -95,7 +95,7 @@ $lang = array_merge($lang, array(
'FIELD_DROPDOWN' => 'Dropdown box',
'FIELD_ICON' => 'Field icon',
'FIELD_ICON_COLOR' => 'Icon colour',
- 'FIELD_ICON_EXPLAIN' => 'Enter the name of a Font Awesome icon to use if displaying as a contact field option above is set. Optionally, set the icon colour in 6-value hexadecimal format or choose it using the colour picker next to the icon colour field (only effective when Font Awesome icon name is set). Leave Font Awesome icon field blank to use phpBB default contact field icon if any (this will also empty the icon colour field).',
+ 'FIELD_ICON_EXPLAIN' => 'Enter a Font Awesome icon name to display with this contact field. Optionally, set its colour using a 6-digit hex code or the colour picker. Leave blank to use phpBB’s default icon and clear the colour.',
'FIELD_IDENT' => 'Field identification',
'FIELD_IDENT_ALREADY_EXIST' => 'The chosen field identification already exist. Please choose another name.',
'FIELD_IDENT_EXPLAIN' => 'The field identification is a name to identify the profile field within the database and the templates.',
diff --git a/tests/functional/profile_field_contact_icon_test.php b/tests/functional/profile_field_contact_icon_test.php
new file mode 100644
index 0000000000..4b8a128b35
--- /dev/null
+++ b/tests/functional/profile_field_contact_icon_test.php
@@ -0,0 +1,66 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_profile_field_contact_icon_test extends phpbb_functional_test_case
+{
+ protected function setUp(): void
+ {
+ parent::setUp();
+
+ $this->login();
+ $this->admin_login();
+ $this->add_lang('acp/profile');
+ }
+
+ public function test_add_contact_field_icon()
+ {
+ // Custom profile fields page
+ $crawler = self::request('GET', 'adm/index.php?i=acp_profile&mode=profile&sid=' . $this->sid);
+
+ // Get any contact profile field, f.e. phpbb_twitter
+ $twitter_field = $crawler->filter('tbody tr')
+ ->reduce(
+ function ($node, $i) {
+ $text = $node->text();
+ return ((bool) strpos($text, 'phpbb_twitter'));
+ });
+
+ $twitter_edit_url = $twitter_field->filter('.actions a')->eq(2)->attr('href');
+
+ $crawler = self::request('GET', 'adm/' . $twitter_edit_url . '&sid=' . $this->sid);
+
+ $this->assertStringContainsString('phpbb_twitter', $crawler->text());
+
+ $form = $crawler->selectButton('Profile type specific options')->form([
+ 'field_icon' => 'twitter',
+ 'field_icon_color' => '1da1f2',
+ ]);
+ $crawler= self::submit($form);
+
+ $this->assertStringContainsString('Profile type specific options', $crawler->text());
+
+ $form = $crawler->selectButton('Save')->form();
+ $crawler= self::submit($form);
+ $this->assertContainsLang('CHANGED_PROFILE_FIELD', $crawler->text());
+
+ // Ensure contact filed icon was saved correctly
+ $crawler = self::request('GET', 'adm/' . $twitter_edit_url . '&sid=' . $this->sid);
+ $this->assertEquals('twitter', $crawler->filter('#field_icon')->attr('value'));
+ $this->assertEquals('1da1f2', $crawler->filter('#contact_field_icon_bgcolor')->attr('value'));
+ $this->assertEquals(1, $crawler->filter('i.fa-twitter')->count());
+ $this->assertStringContainsString('#1da1f2;', $crawler->filter('i.fa-twitter')->attr('style'));
+ }
+}