phone-number-bundle
phone-number-bundle copied to clipboard
Possibility to override the label in country widget
By passing in a closure into the form options it's possible to customize the way the label of the country field is formatted:

Imo you should then also set the allowed types for this option to string and callable.
@xabbuh Thanks for your feedback. I wasn't even sure if this is the right way to do it?
I will check the required types thing you mentioned
What happened with this PR? can it be merged?
@thoroc I forgot it to be honest. I will look into it tonight.
Thanks for the reminder
@mablae @xabbuh @thewilkybarkid any chances of merging this?
Sorry for the delay in looking at this. We'll need some test coverage before merging.
@xabbuh @thewilkybarkid BUMP Please check this issue for merge as soon is possible, it is a nice feature could customize the label or even the class (the test coverage should be pretty simple)
I just see to that the template https://github.com/misd-service-development/phone-number-bundle/blob/master/Resources/views/Form/tel_bootstrap.html.twig is not picket the default merge params in composed widget that should be useful.
For example in twig I have to hard customize as following via form.phone.country and via form.phone.number:
<div class="row-fluid inline" style="display:inline-block">
<div class="inline 4u" style="display:inline-block">
{{ form_widget(form.phone.country, {'attr' : { 'class' : 'control-label inline no-padding-right' } }) }}
</div>
<div class="inline 7u" style="display:inline-block">
{{ form_widget(form.phone.number, {'attr' : { 'style': 'display:inline-block', 'class' : '10u col-sm-9 control-label inline no-padding-right' } }) }}
</div>
</div>
Any update on this? Seem to have a conflict in the PhoneNumberType?
Smth new about this issue?
Maybe we should finally write the tests?
@mablae @xabbuh @thewilkybarkid any update with this? would be nice to have it merged
Any news?