ZF2-391: formInput translates attribute autocomplete="off" into audocomplete="on"

Description

Steps: Create a form using the factory Add a field with attribute autocomplete with a string value of "off" Render the field

$this->add(array(
    'name' => 'field',
    'attributes' => array(
        'type' => 'text',
        'autocomplete' => 'off',
)));

Expected result:



Actual result:

The "correct" way of using this field is by specifying autocomplete => false However, this discrepancy with other "text-ish" attributes is confusing to use.

Comments

Added a PR for ability to use boolean values or raw values (ie "off") depending on the type of value set (boolean or not):

https://github.com/zendframework/zf2/pull/1833

My preference is to use the boolean type values (I can never remember if I should use "autocomplete" or "on" as the value), but I agree about adding support for those who'd like to use the raw values.

Patch is merged