web/views/forms.py
changeset 9717 a6834e2dcc1b
parent 8900 010a59e12d89
child 9770 112c884b2d8d
equal deleted inserted replaced
9716:c44224387028 9717:a6834e2dcc1b
   109       identifier of the form renderer to use to render the form
   109       identifier of the form renderer to use to render the form
   110 
   110 
   111     :attr:`fieldsets_in_order`
   111     :attr:`fieldsets_in_order`
   112       sequence of fieldset names , to control order
   112       sequence of fieldset names , to control order
   113 
   113 
       
   114     :attr:`autocomplete`
       
   115       set to False to add 'autocomplete=off' in the form open tag
       
   116 
   114     **Generic methods**
   117     **Generic methods**
   115 
   118 
   116     .. automethod:: cubicweb.web.form.Form.field_by_name(name, role=None)
   119     .. automethod:: cubicweb.web.form.Form.field_by_name(name, role=None)
   117     .. automethod:: cubicweb.web.form.Form.fields_by_name(name, role=None)
   120     .. automethod:: cubicweb.web.form.Form.fields_by_name(name, role=None)
   118 
   121 
   158     cwtarget = None
   161     cwtarget = None
   159     redirect_path = None
   162     redirect_path = None
   160     form_buttons = None
   163     form_buttons = None
   161     form_renderer_id = 'default'
   164     form_renderer_id = 'default'
   162     fieldsets_in_order = None
   165     fieldsets_in_order = None
       
   166     autocomplete = True
   163 
   167 
   164     @property
   168     @property
   165     def needs_multipart(self):
   169     def needs_multipart(self):
   166         """true if the form needs enctype=multipart/form-data"""
   170         """true if the form needs enctype=multipart/form-data"""
   167         return any(field.needs_multipart for field in self.fields)
   171         return any(field.needs_multipart for field in self.fields)