mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 03:58:39 +02:00
Format phone on readonly
This commit is contained in:
parent
3f9ffd332d
commit
273f88ab14
4 changed files with 22 additions and 1 deletions
|
@ -60,6 +60,10 @@ class UserProfileForm(forms.ModelForm):
|
|||
}
|
||||
self.fields["phone"].error_messages["required"] = "Enter your phone number."
|
||||
|
||||
if self.instance and self.instance.phone:
|
||||
print(f"what is the instace? {self.instance.phone}")
|
||||
self.fields["phone"].initial = self.instance.phone.as_national
|
||||
|
||||
DomainHelper.disable_field(self.fields["email"], disable_required=True)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue