zendframework / zend-form

Form component from Zend Framework
BSD 3-Clause "New" or "Revised" License
69 stars 87 forks source link

Missing default tel (and search) plugins #233

Closed Draxticore closed 5 years ago

Draxticore commented 5 years ago

As can be seen in: https://github.com/zendframework/zend-form/pull/57 , the tel and search types have been initially omitted, for whatever reason. I suggest to update:

src/FormElementManager/FormElementManagerV2Polyfill.php

and

src/FormElementManager/FormElementManagerV2Polyfill.php

, accordingly. If there is consensus on this suggestion, I could try to do it myself.

Code to reproduce the issue

I have the following config:

    'form' => [
        'elements' => [
            [
                'spec' => [
                    'type' => 'tel',
                    ...
                ],
            ],
        ],
    ],

Expected results

The tel plugin should be found.

Actual results

Service with name "" could not be created. Reason: A plugin by the name "tel" was not found in the plugin manager Zend\Form\FormElementManager\FormElementManagerV3Polyfill

michalbundyra commented 5 years ago

@Draxticore would you like submit PR with the fix?

Draxticore commented 5 years ago

@webimpress, sure, I'll go ahead, and try to do it!