def itemKey(item):
    """
    Build the form item's key from the the item's name and the name of all
    ancestors.
    """
    parts = [item.name]
    parent = item.itemParent
    while parent is not None:
        parts.append(parent.name)
        parent = parent.itemParent
    parts.reverse()
    return '.'.join(parts)