'Represent dataform as simple dictionary mapping of datafield names to their values.'

def asDict(self):

    ret = {}
    for field in self.getTags('field'):
        name = field.getAttr('var')
        typ = field.getType()
        if (isinstance(typ, (str, unicode)) and (typ[(-6):] == '-multi')):
            val = []
            for i in field.getTags('value'):
                val.append(i.getData())
        else:
            val = field.getTagData('value')
        ret[name] = val
    if self.getTag('instructions'):
        ret['instructions'] = self.getInstructions()
    return ret
