phone-number-bundle icon indicating copy to clipboard operation
phone-number-bundle copied to clipboard

Exception on form rendering when using Synfony 4 build-in Bootstrap 4 form support

Open mathiasstocker opened this issue 7 years ago • 3 comments

Your bundle works great so far, i only have problems when i set the bootstrap 4 form theme as described here: https://symfony.com/doc/current/form/bootstrap4.html

The form field was set like this:

->add('mobile', PhoneNumberType::class, array('widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'preferred_country_choices' => array('CH')))

When the page is rendered i got the following exception: An exception has been thrown during the rendering of a template ("Notice: Array to string conversion").

Would be great to have this fixed or to provide me a workaround to this.

mathiasstocker avatar May 06 '18 09:05 mathiasstocker

Forked your repo and found the problem. Add a fix in a pull request #180

mathiasstocker avatar May 06 '18 10:05 mathiasstocker

I'm getting this error on symfony v3.4, after upgrading

iBasit avatar Jun 02 '18 10:06 iBasit

Please merge this pull request, really need this update ! Same as iBasit, error after 3.4 and bootstrap form theme declaration must be in config file not declared in template to work.

crazyball avatar Jun 22 '18 08:06 crazyball