def getall(theform, nolist=False):
    """
    Passed a form (FieldStorage instance) return all the values.
    This doesn't take into account file uploads.
    
    Also accepts the 'nolist' keyword argument as ``getform``.
    
    Returns a dictionary.
    """
    data = {}
    for field in theform.keys():
        if not isinstance(theform[field], list):
            data[field] = theform[field].value
        else:
            if not nolist:
                # allows for list type values
                data[field] = [x.value for x in theform[field]]
            else:
                # just fetch the first item
                data[field] = theform[field][0].value
    return data