Twbs-helper-plugin: Reset row_class or assign a different value instead of adding a new one

I’m using the twbs-helper-plugin to render form elements.

I can’t figure out how to define form elements without a spacing between them. By default, class="mb-3" is added to all divs containing an input element. Setting 'row_class' => 'mb-0' won’t have any effect, because it will be added to the row classes resulting in class="mb-3 mb-0".

This is the definition I used:

$this->add([
    'name' => 'username',
    'options' => [
        'row_class' => 'mb-0', 
    ],
    'attributes' => [
        'placeholder' => 'Username',
        'class' => 'input-lg',
    ],
     'required' => true,
]);

Is there a way to reset the default row_class and set it to another value?

This topic looks like a bug and a double post.

Yes, I opened the issue on github, but I wasn’t sure if it’s actually a bug. The owner assigned the bug label now, so it really seems to be a bug.

One can use 'row_spacing_class' => false in the options to deactivate the default spacing class.

1 Like