Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Autofill Issue with nova-inputmask Fields #4

Open
ekazda opened this issue Nov 21, 2024 · 0 comments
Open

Autofill Issue with nova-inputmask Fields #4

ekazda opened this issue Nov 21, 2024 · 0 comments

Comments

@ekazda
Copy link

ekazda commented Nov 21, 2024

Summary

When using the nova-inputmask plugin, fields like credit card number, expiration date, and security code are correctly filled by Chrome's credit card autofill feature. However, these values are not recognized or submitted as part of the form, unlike other autofilled fields (e.g., address fields) that work as expected. Additionally other input masked fields like Phone Number that are autofilled seem to submit properly.

Steps to Reproduce

  1. Add the following fields to a Nova resource or action using the nova-inputmask plugin:
NovaInputmask::make('Phone Number', 'phone')
    ->mask('(999) 999-9999')
    ->rules('required')
    ->help('Format: (###)###-####')
    ->fullWidth(),

NovaInputmask::make('Card Number', 'cc_number')
    ->mask('9999999999999[999]')
    ->rules('required')
    ->fullWidth(),

NovaInputmask::make('Expiration', 'cc_exp')
    ->mask('99/9999')
    ->help('Format: ##/####')
    ->rules('required')
    ->fullWidth(),

NovaInputmask::make('Security Code', 'ccv')
    ->mask('999[9]')
    ->rules('required')
    ->fullWidth(),
  1. Open the form in Google Chrome and use the browser's saved autofill feature to fill in the credit card information. Please note this will only work if loaded from a server with a proper SSL certificate
  2. Submit the form.

Expected Behavior

  • The nova-inputmask fields should behave like regular text inputs and recognize values provided by Chrome's autofill feature.
  • Autofilled values should be processed and submitted with the form.

Actual Behavior

  • Chrome successfully autofills the credit card fields visually.
  • On form submission, the autofilled values in nova-inputmask fields (cc_number, cc_exp, ccv) are not recognized and are submitted as empty.
  • Other autofilled fields, such as address inputs, work as expected.

Environment

  • Laravel Version: 10.48.23
  • Nova Version: 4.35.4
  • PHP Version: 8.3.1
  • Plugin Version: 1.2.20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant