VeryApt / django-phone-field

Lightweight model and form field for phone numbers in Django
GNU General Public License v3.0
52 stars 13 forks source link

Disable Extension #8

Closed CamGenius closed 5 years ago

CamGenius commented 5 years ago

It would be great if you could disable the extension in the form.

va-andrew commented 5 years ago

It wouldn't be hard to add that to PhoneFormField, but would it be any better than simply hiding the extension input via CSS? In the latter case, you don't risk clobbering an existing extension if one somehow winds up in your database.

abraner commented 5 years ago

I have used the "display:none;" in my CSS to hide the extension input but the "ext." text is still there. Is there a way to hide that as well?

va-andrew commented 5 years ago

Looks like there isn't a great way to do that. Perhaps we should wrap the "ext." text in a span so it can be selected and hidden.

va-andrew commented 5 years ago

Resolved in 1.8.0 release: now you can also specify

.phone-field-ext { display: none; }

abraner commented 5 years ago

Great! Thank you.

On Thu, Aug 15, 2019 at 9:14 AM va-andrew notifications@github.com wrote:

Closed #8 https://github.com/VeryApt/django-phone-field/issues/8.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/VeryApt/django-phone-field/issues/8?email_source=notifications&email_token=AM3AVTLHBVPYQDCAMDLSK23QEVQDFA5CNFSM4H4WZFW2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTCINEJQ#event-2559627814, or mute the thread https://github.com/notifications/unsubscribe-auth/AM3AVTMGLGMLDAT56YQQKRTQEVQDFANCNFSM4H4WZFWQ .

szpm102 commented 3 years ago

Hi.. in Django where exactly do I specify to remove the extension part please? In django forms or django models?

chideegit commented 1 month ago

Hi.. in Django where exactly do I specify to remove the extension part please? In django forms or django models?

This would be in CSS