'Calculates and returns the ID attribute for this BoundField, if the
associated Form has specified auto_id. Returns an empty string otherwise.'

def _auto_id(self):

    auto_id = self.form.auto_id
    if (auto_id and ('%s' in smart_unicode(auto_id))):
        return (smart_unicode(auto_id) % self.html_name)
    elif auto_id:
        return self.html_name
    return ''
