[SOLVED] Making references in RelatedItemsFieldWidget orderable?

We have a 1:N reference field defined as

    widget(
        'images',
        RelatedItemsFieldWidget,
        pattern_options={
            'selectableTypes': ['Image']
        }
    )

    images = RelationList(
        title=_(u"Images"),
        default=[],
        value_type=zope.schema.Choice(
            title=_("Image"),
            required=True,
            vocabulary='plone.app.vocabularies.Catalog'),
        required=False)

for choosing images.

How can you make the images references reorderable?

If you use value type RelationChoice it should be possible to drag them in the right order

...or setting pattern_options="orderable".

1 Like

Plone Foundation Code of Conduct