Products.Archetypes.Field.LinesField in Dextirity

How can I create a field that is equivalent to Products.Archetypes.Field.LinesField in Dexterity??

Thank youuu!!!

Use zope.schema.Tuple:

class IMySchema(Interface):
    linesfield = zope.schema.Tuple(
        title="my linesfield",
        value_type=zope.schema.TextLine(),
        required=False,
    )

example with more functionality here: plone.app.dexterity/metadata.py at master · plone/plone.app.dexterity · GitHub

1 Like

If it is OK for you to use XML, I would add a Dexterity Content type in the Dexterity Control panel, and copy the XML to my own content type when everything is OK.