I tried to find a way with plone.autoform.directives to set the attribute of the form to 'off'.
How would you set an arbitrary form attribute and how expecially 'autocomplete'?
I tried to find a way with plone.autoform.directives to set the attribute of the form to 'off'.
How would you set an arbitrary form attribute and how expecially 'autocomplete'?
To set this to the <form />
element you have to override the https://github.com/plone/plone.z3cform/blob/master/src/plone/z3cform/pagetemplates/macros.pt template. There is no "autoform" way to inject attributes to the form.
For the widgets you could register a new FieldWidget
and assign it to the schema field with autoform.
For upcoming Plone 6.1 there's the new z3c.form
customizable attribute implementation which would makes it easier to inject your custom attributes to a widget template. See https://github.com/plone/plone.app.z3cform/blob/master/plone/app/z3cform/widgets/base.py#L85 for a code snipped, where the attributes
attribute is overriden to inject the pattern configuration information for the widgets.
I feared it is so that titlelessform of plone.app.form https://github.com/plone/plone.app.z3cform/blob/master/plone/app/z3cform/templates/macros.pt would need to be overridden to add a form attribute.
Thanks for the hint to your great change on customizing field widget attributes!