How to autofill any text on an iPhone using text replacement

Automate the simple things in life

Introduction

I typically find myself typing my own email address quite a bit when logging into apps on my Apple iPhone or setting up a new account on some website. I find it annoying that my email address is not automatically filled out when I start typing it in an app. I am also surprised that iOS is not smart enough to realize the field is an email address and provides me with options that I’ve typed previously that I can quickly select from. This led me towards researching how I could make this work better for me. I ended up failing-fast when trying to find a solution on the internet and I ended up figuring out a solution that worked on the iPhone using a feature that already existed.

App Auto-fill Features

On an iPhone, there is really only one opportunity to autofill information and that is when entering information into an app.

Some apps such as Safari or Chrome provide you with autofill options where you can either specify information such as address and email address or select a contact in your list of contacts that you want to use for autofill text. I attempted to set up both Safari and Chrome to use the autofill text and it never worked the way I expected. In fact, it’s still not clear to me how they are supposed to work.

My expectations are that when I start typing information that is identified in my autofill options then that text is suggested to me for finishing the rest of the text. I should be able to then click on the text and it fills out the rest of it.

In this case, I’m at the mercy of the app and how it chooses to implement its autofill feature if it even has one. Lots of apps don’t have an autofill feature and the only ones that do are usually browser-based apps.

Keyboards

I ended up thinking that I could bypass the question of whether the app supported an autofill feature and focus just on the input of text from the keyboard. The iPhone has a default keyboard that comes with it, but you also have the ability to replace it with a custom keyboard from the app store such as Gboard (Google’s Keyboard).

My initial thoughts were that I could first check to see if the default keyboard provided an option for auto-filling text. My once-over on this proved fruitless so I decided that maybe I could see if a custom keyboard would give me the autofill feature. The short version is that the Gboard app did not provide me with an autofill option. There may be other custom keyboard apps out there that do, but I didn’t pursue that too hard.

Text Replacement

When I was originally looking for an autofill feature in the iPhone keyboard settings, I found something that was encouraging called “Text Replacement”. This ended up being the best solution that I could find and met all of my expectations and needs. The following are steps to setting it up and using it.

1. Open Settings > General > Keyboard > Text Replacement

A screenshot of the iPhone Text Replacement screen with no shortcuts
A screenshot of the iPhone Text Replacement screen with no shortcuts

2. Click on the + symbol to add a new shortcut

3. In the Phrase textbox, add the text that you want to be suggested

4. In the Shortcut textbox, add the text that you want to type to prompt the suggestion

A screenshot of adding a new text replacement shortcut with a phrase of “test@gmail.com” and a shortcut of “ts”
A screenshot of adding a new text replacement shortcut with a phrase of “test@gmail.com” and a shortcut of “ts”

5. Save!

A screenshot of the iPhone text replacement screen showing one shortcut
A screenshot of the iPhone text replacement screen showing one shortcut

6. Now go test it out in any app of your choosing

A screenshot of the Medium.com app on an iPhone asking to enter an email address
A screenshot of the Medium.com app on an iPhone asking to enter an email address

7. Just start typing the shortcut text and you’ll immediately notice a prompt right above the keyboard suggesting the text that you want

A screenshot of the Medium.com app with “ts” entered in the email address text field and the iPhone keyboard suggesting “test@gmail.com” to replace the “ts” text
A screenshot of the Medium.com app with “ts” entered in the email address text field and the iPhone keyboard suggesting “test@gmail.com” to replace the “ts” text

8. Tap on the suggested text and the text is auto-filled!

A screenshot of the Medium.com app with “test@gmail.com” in the email text field
A screenshot of the Medium.com app with “test@gmail.com” in the email text field

Conclusion

This solution allowed me to set up all kinds of autofill text that I use all the time. I ended up figuring out the text I wanted to type easily and set up the shortcut to be the first couple of letters or numbers and created shortcuts for all of them. This made it so that typing information such as my email address, phone number, and address was really easy anywhere on the iPhone regardless of the app I was using.