Skip to content

Commit

Permalink
attempt to reproduce #91
Browse files Browse the repository at this point in the history
My attempt to reproduce #91.
All radio buttons however are rendered as expected.
  • Loading branch information
jrief committed Oct 12, 2023
1 parent db1f8e2 commit e4a7302
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion testapp/forms/contact.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.core.exceptions import ValidationError
from django.forms import fields, forms
from django.forms import fields, forms, widgets

from formset.collection import FormCollection
from formset.renderers.default import FormRenderer as DefaultFormRenderer
Expand Down Expand Up @@ -88,6 +88,16 @@ class PhoneNumberForm(forms.Form):
],
)

is_active = fields.ChoiceField(
required=False,
widget=widgets.RadioSelect,
label="Is active?",
choices=[
('yes', "Yes"),
('no', "No"),
],
)

def clean_phone_number(self):
value = self.cleaned_data['phone_number'].replace(' ', '').replace('-', '').replace('.', '')
if value == '+123456789':
Expand Down

0 comments on commit e4a7302

Please sign in to comment.