Dexterity add form with autocomplete="off"

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 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 for a code snipped, where the attributes attribute is overriden to inject the pattern configuration information for the widgets.

1 Like

I feared it is so that titlelessform of would need to be overridden to add a form attribute.

Thanks for the hint to your great change on customizing field widget attributes!