So right now we have this function:
function twitter_bootstrap_form_element(&$variables) {
...
// Add bootstrap class
$attributes['class'] = array('control-group');
If you have a .form-inline form, you may want the control group to wrap around multiple elements.
I suggest we add a possible override to the form array (i.e. #nowrap => true) which would stop twitter_bootstrap from adding this class.
i.e.
$attributes['class'] = array();
if (!isset($element['#no_wrap'])) {
$attributes['class'][] = 'control-group';
}
Comments
Comment #1
nagiek commentedAlso, we should put the same override when adding
<div class="controls">.Replace
with
Comment #2
nagiek commentedAnd the last point to make this work is the wrapper divs (like
.form-type-*) have to be modifiedi.e.
Comment #3
davidn commentedThe following function can than be used to make an inline form out of an existing form arrray:
By the way. I prefer to totally remove the div wrappers when #no_wrap is set. I haven't counter any problem with the missing classes till now!
Comment #4
andregriffin commentedComment #5
andregriffin commentedComment #6
natted commentedComment #6.0
natted commentedTypo
Comment #7
markhalliwellScripted response: This issue has been closed while cleaning up the issue queue. This has likely already been addressed in 7.x-3.x. If it has not, please create a new issue describing the exact issue with that version. The 7.x-2.x branch currently only receives security fixes.