Skip to content

Commit 52eda40

Browse files
committed
Tidy misc.md
1 parent f3582cf commit 52eda40

File tree

1 file changed

+12
-16
lines changed
  • plone.app.dexterity/reference

1 file changed

+12
-16
lines changed
Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
---
22
myst:
33
html_meta:
4-
"description": ""
5-
"property=og:description": ""
6-
"property=og:title": ""
7-
"keywords": ""
4+
"description": "Miscellaneous contributor contributed recipes for content types and schema in Plone"
5+
"property=og:description": "Miscellaneous contributor contributed recipes for content types and schema in Plone"
6+
"property=og:title": "Miscellaneous contributor contributed recipes for content types and schema in Plone"
7+
"keywords": "Plone, miscellaneous, recipes, content types"
88
---
99

10-
# Miscellaneous
10+
# Miscellaneous recipes
1111

12-
## User contributed recipes
12+
## Hiding a field
1313

14-
**How to hide a field on a schema if we do not want to or cannot modify the original schema**
15-
16-
To do this one can use tagged values on the schema. In this case want to hide 'introduction' and 'answers' fields:
14+
On occasion you may want to hide a field in a schema without modifying the original schema.
15+
To do this, you can use tagged values on the schema.
16+
In this example, you would hide the `introduction` and `answers` fields:
1717

1818
```python
1919
from example.package.content.assessmentitem import IAssessmentItem
2020
from plone.autoform.interfaces import OMITTED_KEY
2121
IAssessmentItem.setTaggedValue(OMITTED_KEY,
22-
[(Interface, 'introduction', 'true'),
23-
(Interface, 'answers', 'true')])
22+
[(Interface, "introduction", "true"),
23+
(Interface, "answers", "true")])
2424
```
2525

26-
This code can sit in another.package.\_\_init\_\_.py for example.
27-
28-
See also: [Original thread on coredev mailinglist]
29-
30-
[original thread on coredev mailinglist]: http://plone.293351.n2.nabble.com/plone-autoform-why-use-tagged-values-td7560956.html
26+
This code can reside in {file}`another.package.__init__.py`.

0 commit comments

Comments
 (0)