< /p>
schema['creators'].schemata ='default'
However, I did not use Agile to achieve the same goal. I tried to use form prompts. For example:
< p>
form.fieldset('default',
fields=['creators']
)
I noticed that it does not work because of this When the “creator” field is unknown. (Ownership behavior has not yet been evaluated).
However, through the form prompt, I can transfer from “default” to another (e.g. “ownership”).
myfile = NamedFile(title=_(u"A file"))
form.fieldset('ownership', fields=['myfile'])
How can I do this? Write my own behavior?
Thank you!
(1) Declare the “creator” field on your content type interface (may be a recommended solution Scheme), or…
(2) Use the behavior you recorded here (and add this behavior to the FTI of the type in portal_types and related settings XML): http://docs.plone .org/external/plone.app.dexterity/docs/behaviors/creating-and-registering-behaviors.html
The first solution should be the simplest. You want to control the field set position or order Any field of should be defined by your interface.
In Archetypes, in order to move a field in a field set (or scheme) to another field set, we can Do the following:
schema['creators'].schemata ='default'
However, I did not use Agile to achieve the same goal .I tried to use form prompts. For example:
form.fieldset('default',
fields=['creators']
) pre>I noticed that it does not work because the "creator" field is unknown at this time. (Ownership behavior has not yet been evaluated).
However, through the form prompt, I can change from "default "Transfer to another (such as "ownership").
myfile = NamedFile(title=_(u"A file"))
form.fieldset(' ownership', fields=['myfile'])How can I achieve this? Write my own behavior?
Thank you!
You may need to define the fields to be assigned on the interface you control. Although this seems to be repeated, for the sake of completeness and clarity, this is a Good idea. You can:
(1) Declare the "creator" field on your content type interface (may be the recommended solution), or...
(2) Use the behavior you recorded here (and add this behavior to the FTI of the type in portal_types and related settings XML): http://docs.plone.org/external/plone.app.dexterity/docs /behaviors/creating-and-registering-behaviors.html
The first solution should be the simplest. Any field that you want to control the position or order of the field set should be defined by your interface. < /p>