'This retrieves the saved form and returns a dictionary containing the name,
desc, type, layout & fields of the form'

def get_saved_form(self, form_definition):

    if (form_definition.type == form_definition.types.SAMPLE):
        return dict(name=form_definition.name, desc=form_definition.desc, type=form_definition.type, layout=list(copy.deepcopy(form_definition.layout)), fields=list(copy.deepcopy(form_definition.fields)))
    return dict(name=form_definition.name, desc=form_definition.desc, type=form_definition.type, layout=[], fields=list(copy.deepcopy(form_definition.fields)))
