I'm attempting to add some Twitter Bootstrap classes to the Button Field in the "Additional Classes" field but nothing is saving.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

clemens.tolboom’s picture

I guess this is due to typo: $classes should be $class

function _button_field_build_element($id, $instance, $entity_type, $entity) {
  $class = array('button_field');
  if (isset($instance['additional_class'])) {
    $class = array_merge($classes, explode(' ', $instance['additional_class']));
  }
Lord Pachelbel’s picture

Status: Active » Needs review
FileSize
3.04 KB

Here's a patch to fix the additional classes being missing and the "Hide on edit form" checkbox that was broken in the same manner. It also contains the one-line change from https://www.drupal.org/node/1989578 because I had fixed that issue on my own before seeing there already was an issue for it.