You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/backend/widgets.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,11 +63,11 @@ The main widgets are:
63
63
- DateTime Picker
64
64
65
65
66
-
(backend-widgets-fields-display-label)=
66
+
(backend-widgets-change-a-fields-display-label)=
67
67
68
68
## Change a field's display mode
69
69
70
-
A field's widget can be displayed in several modes:
70
+
A field's widget can be displayed in several modes.
71
71
72
72
`input`
73
73
: Allows the user to enter data into the field
@@ -81,6 +81,7 @@ A field's widget can be displayed in several modes:
81
81
82
82
### `plone.autoform``mode` directive
83
83
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.
84
85
85
86
```{code-block} python
86
87
:emphasize-lines: 6,7
@@ -99,8 +100,6 @@ class IMySchema(model.Schema):
99
100
)
100
101
```
101
102
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
-
104
103
The corresponding supermodel XML directive is `form:mode`:
105
104
106
105
```{code-block} xml
@@ -114,7 +113,7 @@ The corresponding supermodel XML directive is `form:mode`:
114
113
</field>
115
114
```
116
115
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:
118
117
119
118
```{code-block} xml
120
119
:emphasize-lines: 3
@@ -127,10 +126,10 @@ The mode can be specified briefly if it should be the same for all forms:
127
126
</field>
128
127
```
129
128
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.
0 commit comments