If this is your first visit, check our documentation. To post, register or login.
Forums / Other Business Topics / Autocomplete function on Credit Card forms

Autocomplete function on Credit Card forms

Locked

Started by rbarcus on 27 Dec 2007, 3:42 AM · Views: 80

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
27 Dec 2007, 3:42 AM
#1
rbarcus avatar

rbarcus

New Zenner

Join Date:
Jul 2007
Posts:
1
Plugin Contributions:
0

Autocomplete function on Credit Card forms

I discovered that when using Firefox, the credit card and CVS information is stored on the user's machine even after logging out, resetting the form, etc. It actually requires the user to clear his/her cache in order to keep from seeing the cc numbers.

So what I did was add 'autocomplete=off' to line 17 of tpl_checkout_payment_default.php in:
includes/template/template_defaults/templates

Changed:

<?php echo zen_draw_form('checkout_payment', zen_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', ($flagOnSubmit ? 'onsubmit="return check_form();"' : '')); ?>

To:

<?php echo zen_draw_form('checkout_payment', zen_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'autocomplete=off', ($flagOnSubmit ? 'onsubmit="return check_form();"' : '')); ?>

This seemed to work pretty good!

Thanks

27 Dec 2007, 6:00 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Autocomplete function on Credit Card forms

Valid point. And it works ... with one caveat: It's not a standard HTML tag, and using it will cause the page to not validate. Plus, it is purported to not work consistently across all browsers.

We try not to use non-official HTML tags in the core code, since we prefer to have all the pages be Valid HTML (XHTML).

Nevertheless, there are various other ways which might be considered in a future release.
Here's one, mentioned here for possible future reference:

http: //chrisholland. blog spot .com/2004/11/banks-protect-privacy-disable.html
(remove spaces)

This isn't to say that you're doing anything wrong. Feel free to do as you wish with your site. As mentioned, I'm mostly putting this info here for reference.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.