Where and what should be the changes made to replace the default widget(in and out select widget) for List type with RadioFieldWidget? I am building an addon for plone5 and using autoform 1.7.
In the file that contains the following class:
class FilterForm(form.SchemaForm):
schema = IFilterForm ignoreContext = True
label = u"Filter" description = u"Filter after certain criteria."
I imported
from z3c.form.browser.radio import RadioFieldWidget
and the schema is defined in an xml file with fields like:
<field name="supported_python_versions"
type="zope.schema.List" >
<title i18n:translate="">Supported Python Versions</title>
<description i18n:translate="">Choose the list of supported Python versions</description>
<required>False</required>
<default>[]</default>
<value_type type="zope.schema.Choice">
<vocabulary>ploneorg.addonlisting.python_versions_vocabulary</vocabulary>
</value_type>
</field>
Is there a way to change the widget to radioField and pass the vocabulary to it?