Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Need an isset($form['#form_id'])
for twitter_bootstrap_form_alter
(in form.inc
).
/**
* Implements hook_form_alter().
*/
function twitter_bootstrap_form_alter(&$form, &$form_state, $form_id) {
...
// Only wrap in container for certain form
if(isset($form['#form_id']) && !in_array($form['#form_id'], $form_ids) && !isset($form['#node_edit_form'])) {
$form['actions']['#theme_wrappers'] = array();
}
}
Comments
Comment #1
Docc CreditAttribution: Docc commentedHmz shouldnt a form always have a form_id? Anyway, commited. Thanks :)
Comment #2
nagiek CreditAttribution: nagiek commentedSometimes, CTools wizard adds the form_id after. :p
Thanks Docc
Comment #3
andregriffin CreditAttribution: andregriffin commented