diff --git a/product/ERP5Form/Form.py b/product/ERP5Form/Form.py
index 2524c420816f47a93ab3b2083d9440b33dd120be..f196e2fce3f0fa22efa5fd79b48f62954f91c9c0 100755
--- a/product/ERP5Form/Form.py
+++ b/product/ERP5Form/Form.py
@@ -201,11 +201,11 @@ def add_and_edit(self, id, REQUEST):
         u = "%s/%s" % (u, quote(id))
     REQUEST.RESPONSE.redirect(u+'/manage_main')
 
-def initializeForm(field_registry):
+def initializeForm(field_registry, form_class=None):
     """Sets up ZMIForm with fields from field_registry.
     """
-    form_class = ERP5Form
-
+    if form_class is None: form_class = ERP5Form
+    
     meta_types = []
     for meta_type, field in field_registry.get_field_classes().items():
         # don't set up in form if this is a field for internal use only
@@ -276,16 +276,14 @@ def create_settings_form():
                                required=0,
                                size=1,
                                default=None)
-
     encoding = fields.StringField('encoding',
                                   title='Encoding of pages the form is in',
                                   default="UTF-8",
                                   required=1)
-
     stored_encoding = fields.StringField('stored_encoding',
                                       title='Encoding of form properties',
                                       default='UTF-8',
-                                      required=1)
+                                      required=1)    
     unicode_mode = fields.CheckBoxField('unicode_mode',
                                         title='Form properties are unicode',
                                         default=0,
@@ -451,6 +449,4 @@ psyco.bind(Field.get_value)
 #psyco.bind(PageTemplate.pt_macros)
 
 #from Products.CMFCore.ActionsTool import ActionsTool
-#psyco.bind(ActionsTool.listFilteredActionsFor)
-
-
+#psyco.bind(ActionsTool.listFilteredActionsFor)
\ No newline at end of file