Skip to content

Commit 26111e2

Browse files
1letterdavisagli
andauthored
fix wrong attribute name (#1822)
* fix wrong attribute name * Apply suggestions from code review Co-authored-by: David Glick <[email protected]> --------- Co-authored-by: David Glick <[email protected]>
1 parent 6a6a258 commit 26111e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/backend/widgets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@ class AddForm(DefaultAddForm):
538538
# Call parent to set-up initial widget data
539539
super().updateWidgets(self, prefix=prefix)
540540

541-
# Note we need to be discreet to different form modes (view, edit, hidden)
542-
if self.fields["sections"].mode == INPUT_MODE:
541+
# Please note that the different form modes (show, edit, hide) have to be taken into account.
542+
if self.widgets["sections"].mode == INPUT_MODE:
543543

544544
# Modify a widget with certain name for our purposes
545545
widget = self.widgets["sections"]

0 commit comments

Comments
 (0)