Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[FEATURE] Enable textInputMode for VGSTextField #344

Open
trevor-holliday-instacart opened this issue May 22, 2023 · 3 comments
Open

[FEATURE] Enable textInputMode for VGSTextField #344

trevor-holliday-instacart opened this issue May 22, 2023 · 3 comments
Assignees

Comments

@trevor-holliday-instacart

Is your feature request related to a problem? Please describe.

  • iOS offers users the ability to auto-complete text entry fields with local suggestions. By enabling the textInputMode via the VGSTextField, and further in the MaskedTextField, users will be able to skip manually entering their CreditCardNumber.

Describe the solution you'd like

  • enable textInputMode on the VGSTextField.
@dmytrokhl
Copy link
Contributor

Hi @trevor-holliday-instacart ,
I suppose you want to set textField.textContentType = .creditCardNumber to enable card number autofill. From my experience card number autofill on iOS works only in Safari. In native textfields this attribute is more about setting a proper keyboard type and autocorrection for specific content type. From textContentType docs :

When you provide this information about the content you expect users to enter in a text input area, the system can in some cases automatically select an appropriate keyboard and improve keyboard corrections and proactive integration with other text input opportunities.

@trevor-holliday-instacart
Copy link
Author

ah sorry i referenced the incorrect property. However, this will allow the system to suggest input to the user. Here is an example of how we do this with names.

IMG_8BD2B609B568-1

@dmytrokhl
Copy link
Contributor

It will not work with card number, but you are right it can work with name field. However setting content type can automatically change keyboard type, which could be different then you aspect when setting VGSConfiguration.keyboardType.

We will validate this feature internally and check possible issues, e.g.: you want to collect card holder name which always should be in latin characters, but on user's device Cyrillic or Chinese keyboard is default, and iOS recommends him different keyboard or suggest name in other language.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants