code: def saveform(cls, form):
          
  
          columns = dict()
          for name, field in cls.form_fields.iteritems():
              columns[name] = getattr(form, field).data
          instance = cls(**columns)
          return instance.save()
docs: Create and save form model data to database