diff --git a/bootstrap_barrio.theme b/bootstrap_barrio.theme index d65af0b265e503dcdfc5c954773a0e957050dce8..52c4b04fc49157263c5cf9597f7f60d13ead640d 100644 --- a/bootstrap_barrio.theme +++ b/bootstrap_barrio.theme @@ -385,17 +385,19 @@ function bootstrap_barrio_preprocess_form_element(&$variables) { if (isset($variables['element']['#attributes'])) { $variables['input_attributes'] = new Attribute($variables['element']['#attributes']); } - switch ($variables['type']) { - case 'checkbox': - $variables['customtype'] = theme_get_setting('bootstrap_barrio_checkbox'); - break; + if (isset($variables['type'])) { + switch ($variables['type']) { + case 'checkbox': + $variables['customtype'] = theme_get_setting('bootstrap_barrio_checkbox'); + break; - case 'radio': - $variables['customtype'] = theme_get_setting('bootstrap_barrio_radio'); - break; + case 'radio': + $variables['customtype'] = theme_get_setting('bootstrap_barrio_radio'); + break; - default: - break; + default: + break; + } } }