autocomplete="off"

6 messages Options
Embed this post
Permalink
Anders Gunnarsson

autocomplete="off"

Reply Threaded More More options
Print post
Permalink
How do I add /
autocomplete/="off"

To a password field in zend_form?

Anders
Hector Virgen

Re: autocomplete="off"

Reply Threaded More More options
Print post
Permalink
Do input type="password" fields support autocomplete?

--
Hector


On Tue, Nov 3, 2009 at 11:02 AM, Anders Gunnarsson <[hidden email]> wrote:
How do I add /
autocomplete/="off"

To a password field in zend_form?

Anders

Jurian Sluiman

Re: autocomplete="off"

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
The autocomplete attribute is an unsupported one, but introduced by Microsoft. Now all common browsers supports the autocomplete attribute, though it's still not in the official specification (afaik).


For elements, all kind of attributes can be set with an option. Inside your form::init() method:
$this->addElement('password', 'password', array(
'label' => 'Your password',
'autocomplete' => 'off'
));


Regards, Jurian
--
Jurian Sluiman
Soflomo.com


Op Tuesday 03 November 2009 20:06:54 schreef Hector Virgen:
> Do input type="password" fields support autocomplete?
>
> --
> Hector
>
> On Tue, Nov 3, 2009 at 11:02 AM, Anders Gunnarsson <[hidden email]>wrote:
> > How do I add /
> > autocomplete/="off"
> >
> > To a password field in zend_form?
> >
> > Anders



signature.asc (204 bytes) Download Attachment
Hector Virgen

Re: autocomplete="off"

Reply Threaded More More options
Print post
Permalink
I've never seen a password field support autocomplete. What does it do? Does it show a list of recently typed passwords so you can select one? I thought this feature was only available on inputs of type "text".

--
Hector


On Tue, Nov 3, 2009 at 11:12 AM, Jurian Sluiman <[hidden email]> wrote:
The autocomplete attribute is an unsupported one, but introduced by Microsoft. Now all common browsers supports the autocomplete attribute, though it's still not in the official specification (afaik).


For elements, all kind of attributes can be set with an option. Inside your form::init() method:
$this->addElement('password', 'password', array(
'label' => 'Your password',
'autocomplete' => 'off'
));


Regards, Jurian
--
Jurian Sluiman
Soflomo.com


Op Tuesday 03 November 2009 20:06:54 schreef Hector Virgen:

> Do input type="password" fields support autocomplete?
>
> --
> Hector
>
> On Tue, Nov 3, 2009 at 11:02 AM, Anders Gunnarsson <[hidden email]>wrote:
> > How do I add /
> > autocomplete/="off"
> >
> > To a password field in zend_form?
> >
> > Anders

weierophinney

Re: autocomplete="off"

Reply Threaded More More options
Print post
Permalink
In reply to this post by Anders Gunnarsson
-- Anders Gunnarsson <[hidden email]> wrote
(on Tuesday, 03 November 2009, 08:02 PM +0100):
> How do I add /
> autocomplete/="off"
>
> To a password field in zend_form?

Simply specify it as a property or as metadata on instantiation:

    $foo = new Zend_Form_Element_Text('foo', array(
        'autocomplete' => 'off',
    ));

    // or...
    $form->addElement('text', 'foo', array(
        'autocomplete' => 'off',
    ));

    // or...
    $element->autocomplete = 'off';

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
Anders Gunnarsson

Re: autocomplete="off"

Reply Threaded More More options
Print post
Permalink
In reply to this post by Hector Virgen
It doesn't display a list, it is just pre-filled when you enter the page.
I have chosen "save this password" when loggin in,
but when enterning "edit profile" the field for "new password" if filled
with the password I'm using to log in.

I will now try the autocomplete switch.




Hector Virgen skrev:

> I've never seen a password field support autocomplete. What does it
> do? Does it show a list of recently typed passwords so you can select
> one? I thought this feature was only available on inputs of type "text".
>
> --
> Hector
>
>
> On Tue, Nov 3, 2009 at 11:12 AM, Jurian Sluiman
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     The autocomplete attribute is an unsupported one, but introduced
>     by Microsoft. Now all common browsers supports the autocomplete
>     attribute, though it's still not in the official specification
>     (afaik).
>
>
>     For elements, all kind of attributes can be set with an option.
>     Inside your form::init() method:
>     $this->addElement('password', 'password', array(
>     'label' => 'Your password',
>     'autocomplete' => 'off'
>     ));
>
>
>     Regards, Jurian
>     --
>     Jurian Sluiman
>     Soflomo.com
>
>
>     Op Tuesday 03 November 2009 20:06:54 schreef Hector Virgen:
>
>     > Do input type="password" fields support autocomplete?
>     >
>     > --
>     > Hector
>     >
>     > On Tue, Nov 3, 2009 at 11:02 AM, Anders Gunnarsson
>     <[hidden email] <mailto:[hidden email]>>wrote:
>     > > How do I add /
>     > > autocomplete/="off"
>     > >
>     > > To a password field in zend_form?
>     > >
>     > > Anders
>
>