diff --git a/mailpoet/lib/Form/Block/Text.php b/mailpoet/lib/Form/Block/Text.php index f0661209f3..ebb8cb19ec 100644 --- a/mailpoet/lib/Form/Block/Text.php +++ b/mailpoet/lib/Form/Block/Text.php @@ -35,10 +35,15 @@ class Text { $type = 'text'; $automationId = ' '; $id = ''; - $autocomplete = 'on'; if ($block['id'] === 'email') { $type = 'email'; $autocomplete = 'email'; + } else if ($block['id'] === 'first_name') { + $autocomplete = 'given-name'; + } else if ($block['id'] === 'last_name') { + $autocomplete = 'family-name'; + } else { + $autocomplete = 'on'; } if (in_array($block['id'], ['email', 'last_name', 'first_name'], true)) { diff --git a/mailpoet/tests/integration/Subscription/ManageSubscriptionFormRendererTest.php b/mailpoet/tests/integration/Subscription/ManageSubscriptionFormRendererTest.php index 2bb47e2a18..80fc4643ff 100644 --- a/mailpoet/tests/integration/Subscription/ManageSubscriptionFormRendererTest.php +++ b/mailpoet/tests/integration/Subscription/ManageSubscriptionFormRendererTest.php @@ -25,8 +25,8 @@ class ManageSubscriptionFormRendererTest extends \MailPoetTest { $form = $this->formRenderer->renderForm($subscriber); expect($form)->regExp('/
/'); expect($form)->stringContainsString(''); - expect($form)->regExp('//'); - expect($form)->regExp('//'); + expect($form)->regExp('//'); + expect($form)->regExp('//'); expect($form)->regExp('/ Test segment/'); expect($form)->regExp('//'); expect($form)->regExp('//');