states.js requires form items to be wrapped in form-item.

We have to make sure that class makes it in.

function twitter_bootstrap_form_element(&$variables) {
  ...
  $attributes['class'][] = 'form-item';
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frankbaele’s picture

Status: Active » Postponed (maintainer needs more info)

Could you give me more info please

nagiek’s picture

Status: Postponed (maintainer needs more info) » Active

When states.js looks for form elements to change, it looks for the input within a .form-item tag. This theme does not apply the form-item tag uniformly, so states.js breaks.

frankbaele’s picture

Assigned: Unassigned » frankbaele
jim_at_miramontes’s picture

Subscribe. Are there any updates on this? I'm just getting started on both twitter-bootstrap and states, and would really like them to both work!

FWIW, adding $attributes['class'][] = 'form-item'; to the _form_element function, just before $output = '<div' . drupal_attributes($attributes) . '>' . "\n"; is so far working nicely for me, but it's early yet...

natted’s picture

Ok, I hope I've done this right... but here is a patch based on suggestion from nagiek and jim_at_miramontes.

In testing, it resolves a problem where my project was using form states and twitter_bootstrap caused them to break.

Please advise if anything further needs to be done or if problems still occur.

natted’s picture

Status: Active » Needs review
jim_at_miramontes’s picture

Works for me...

frankbaele’s picture

Assigned: frankbaele » Unassigned
andregriffin’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

andregriffin’s picture

Project: Twitter's Bootstrap » Bootstrap