I'm building a module with a form that includes an element select field that I want to restrict to specific volume. So far this is what I have:
{{ forms.elementSelectField({
label: "Asset"|t('app'),
id: 'images',
name: 'images',
elementType: 'craft\\elements\\Asset',
selectionLabel: "Choose"|t('app'),
criteria: {
kind: ['images']
},
}) }}
I can see there is a 'sources' attribute, but I don't know how to structure the value. I've tried:
sources:[1]
and the handle sources:['images']
without luck.