def chooseForm_slot(self, element, element_old):
self.current_slot = None<EOL>if (verbose):<EOL><INDENT>print(self.pre, "<STR_LIT>", element)<EOL><DEDENT>if (isinstance(element, type(None))):<EOL><INDENT>self.current_row = None<EOL>self.element = None<EOL><DEDENT>else:<EOL><INDENT>assert(hasattr(element, "<STR_LIT>"))<EOL>assert(hasattr(element, "<STR_LIT>"))<EOL>try:<EOL><INDENT>self.current_row = self.row_instance_by_name[element.classname]<EOL><DEDENT>except KeyError:<EOL><INDENT>print(<EOL>self.pre,<EOL>"<STR_LIT>",<EOL>element.classname)<EOL>self.current_row = None<EOL>self.element = None<EOL><DEDENT>else:<EOL><INDENT>self.resetForm()<EOL>self.current_row.get(self.collection, element._id)<EOL>self.element = element<EOL>self.current_slot = self.current_row.get_column_value("<STR_LIT>")<EOL><DEDENT><DEDENT>self.showCurrent()<EOL>
Calling this slot chooses the form to be shown

        :param element:      an object that has *_id* and *classname* attributes
        :param element_old:  an object that has *_id* and *classname* attributes

        This slot is typically connected to List classes, widget attribute's, currentItemChanged method (List.widget is QListWidget that has currentItemChanged slot), so the element and element_old parameters are QListWidgetItem instances with extra attributes "_id" and "_classname" attached.

        Queries the database for element._id