def __init__(self, field, *args, **kwargs):
    if (not isinstance(field, BoundField)):
        raise BootstrapError('Parameter "field" should contain a valid Django BoundField.')
    self.field = field
    super().__init__(*args, **kwargs)
    self.widget = field.field.widget
    self.is_multi_widget = isinstance(field.field.widget, MultiWidget)
    self.initial_attrs = self.widget.attrs.copy()
    self.field_help = (text_value(mark_safe(field.help_text)) if (self.show_help and field.help_text) else '')
    self.field_errors = [conditional_escape(text_value(error)) for error in field.errors]
    self.form_check_class = kwargs.get('form_check_class', 'form-check')
    if ('placeholder' in kwargs):
        self.placeholder = kwargs['placeholder']
    elif get_bootstrap_setting('set_placeholder'):
        self.placeholder = field.label
    else:
        self.placeholder = ''
    if self.placeholder:
        self.placeholder = text_value(self.placeholder)
    self.addon_before = kwargs.get('addon_before', self.widget.attrs.pop('addon_before', ''))
    self.addon_after = kwargs.get('addon_after', self.widget.attrs.pop('addon_after', ''))
    self.addon_before_class = kwargs.get('addon_before_class', self.widget.attrs.pop('addon_before_class', 'input-group-text'))
    self.addon_after_class = kwargs.get('addon_after_class', self.widget.attrs.pop('addon_after_class', 'input-group-text'))
    error_css_class = kwargs.get('error_css_class', None)
    required_css_class = kwargs.get('required_css_class', None)
    bound_css_class = kwargs.get('bound_css_class', None)
    if (error_css_class is not None):
        self.error_css_class = error_css_class
    else:
        self.error_css_class = getattr(field.form, 'error_css_class', get_bootstrap_setting('error_css_class'))
    if (required_css_class is not None):
        self.required_css_class = required_css_class
    else:
        self.required_css_class = getattr(field.form, 'required_css_class', get_bootstrap_setting('required_css_class'))
    if (bound_css_class is not None):
        self.success_css_class = bound_css_class
    else:
        self.success_css_class = getattr(field.form, 'bound_css_class', get_bootstrap_setting('success_css_class'))
    if self.field.form.empty_permitted:
        self.required_css_class = ''
def __init__(self, field, *args, **kwargs):
    if (not isinstance(field, BoundField)):
        raise BootstrapError('Parameter "field" should contain a valid Django BoundField.')
    self.field = field
    super().__init__(*args, **kwargs)
    self.widget = field.field.widget
    self.is_multi_widget = isinstance(field.field.widget, MultiWidget)
    self.initial_attrs = self.widget.attrs.copy()
    self.field_help = (text_value(mark_safe(field.help_text)) if (self.show_help and field.help_text) else )
    self.field_errors = [conditional_escape(text_value(error)) for error in field.errors]
    self.form_check_class = kwargs.get('form_check_class', 'form-check')
    if ('placeholder' in kwargs):
        self.placeholder = kwargs['placeholder']
    elif get_bootstrap_setting('set_placeholder'):
        self.placeholder = field.label
    else:
        self.placeholder = 
    if self.placeholder:
        self.placeholder = text_value(self.placeholder)
    self.addon_before = kwargs.get('addon_before', self.widget.attrs.pop('addon_before', ))
    self.addon_after = kwargs.get('addon_after', self.widget.attrs.pop('addon_after', ))
    self.addon_before_class = kwargs.get('addon_before_class', self.widget.attrs.pop('addon_before_class', 'input-group-text'))
    self.addon_after_class = kwargs.get('addon_after_class', self.widget.attrs.pop('addon_after_class', 'input-group-text'))
    error_css_class = kwargs.get('error_css_class', None)
    required_css_class = kwargs.get('required_css_class', None)
    bound_css_class = kwargs.get('bound_css_class', None)
    if (error_css_class is not None):
        self.error_css_class = error_css_class
    else:
        self.error_css_class = getattr(field.form, 'error_css_class', get_bootstrap_setting('error_css_class'))
    if (required_css_class is not None):
        self.required_css_class = required_css_class
    else:
        self.required_css_class = getattr(field.form, 'required_css_class', get_bootstrap_setting('required_css_class'))
    if (bound_css_class is not None):
        self.success_css_class = bound_css_class
    else:
        self.success_css_class = getattr(field.form, 'bound_css_class', get_bootstrap_setting('success_css_class'))
    if self.field.form.empty_permitted:
        self.required_css_class = 