After just installing the bootstrap theme I started getting the following errors.

* Notice: Undefined index: #type in bootstrap_form_element() (line 44 of {DRUPAL_ROOT}/sites/all/themes/bootstrap/includes/form.inc).

Only local images are allowed.

// Add bootstrap class
  if ($element['#type'] == "radio" || $element['#type'] == "checkbox") {
    $exclude_control = TRUE;
  }
  else {
    $attributes['class'] = array('control-group');
  }

Comments

natted’s picture

Interesting. Thanks, just looking into this.

lyes’s picture

Solution

  // Add bootstrap class
  if (isset($element['#type']) && ($element['#type'] == "radio" || $element['#type'] == "checkbox") ){
    $exclude_control = TRUE;
  }
  else {
    $attributes['class'] = array('control-group');
  }
natted’s picture

Status: Active » Fixed

Thanks, applied fix in 2.x-dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.