Skip to content

Commit

Permalink
Allow overriding widget in ArrayFormField (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNilges authored Mar 28, 2024
1 parent 7e2b98d commit f48cfb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion django_jsonform/forms/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def __init__(self, base_field, **kwargs):
self.widget = JSONFormWidget(schema=self.get_schema())
else:
self.widget = TextInput
kwargs['widget'] = self.widget

if not kwargs.get('widget'):
kwargs['widget'] = self.widget

super().__init__(base_field, **kwargs)

Expand Down

0 comments on commit f48cfb9

Please sign in to comment.