Skip to content

Commit 29f89eb

Browse files
committed
Tidy up widgets.md
1 parent 2135a23 commit 29f89eb

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

docs/backend/widgets.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ The main widgets are:
6363
- DateTime Picker
6464

6565

66-
(backend-widgets-fields-display-label)=
66+
(backend-widgets-change-a-fields-display-label)=
6767

6868
## Change a field's display mode
6969

70-
A field's widget can be displayed in several modes:
70+
A field's widget can be displayed in several modes.
7171

7272
`input`
7373
: Allows the user to enter data into the field
@@ -81,6 +81,7 @@ A field's widget can be displayed in several modes:
8181

8282
### `plone.autoform` `mode` directive
8383

84+
In the following example, the mode for the `secret` field is set to `hidden` for most forms, but `input` for forms that provide the `IEditForm` interface.
8485

8586
```{code-block} python
8687
:emphasize-lines: 6,7
@@ -99,8 +100,6 @@ class IMySchema(model.Schema):
99100
)
100101
```
101102

102-
In this case the mode for the `secret` field is set to 'hidden' for most forms, but 'input' for forms that provide the IEditForm interface.
103-
104103
The corresponding supermodel XML directive is `form:mode`:
105104

106105
```{code-block} xml
@@ -114,7 +113,7 @@ The corresponding supermodel XML directive is `form:mode`:
114113
</field>
115114
```
116115

117-
The mode can be specified briefly if it should be the same for all forms:
116+
The mode can be specified briefly, if it should be the same for all forms:
118117

119118
```{code-block} xml
120119
:emphasize-lines: 3
@@ -127,10 +126,10 @@ The mode can be specified briefly if it should be the same for all forms:
127126
</field>
128127
```
129128

130-
In other words, `form:mode` may be either a single mode, or a space-separated list of form_interface:mode pairs.
129+
In other words, `form:mode` may be either a single mode, or a space-separated list of `<form_interface>:<mode>` pairs.
131130

132131

133-
(backend-widgets-fields-widget-label)=
132+
(backend-widgets-change-a-fields-widget-label)=
134133

135134
## Change a field's widget
136135

0 commit comments

Comments
 (0)