'Given a first-choice name, adds an underscore to the name until it
reaches a name that isn\'t claimed by any field in the form.
This is calculated rather than being hard-coded so that no field names
are off-limits for use in the form.'

def unused_name(self, name):

    while 1:
        try:
            f = self.form.base_fields[name]
        except KeyError:
            break
        name += '_'
    return name
