Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
The css from bootstrap 3 are not working in the cms:form.
I want to add .form-horizontal and it won't work.
Hi,

The cms:form faithfully outputs any extra parameter added to it.
I had a look at your code and the class="form-horizontal" you added to cms:form tag does get outputted as a parameter of the generated FORM element.

So, since the markup is outputted correctly, I don't think this could be termed as a bug.

That said, if the form does not get styled as it should, we'll have to find the reason by identifying which other element on the page is messing up the style - a standard CSS troubleshooting exercise using firebug or Chrome developer tools.

What I found was that Couch adds a style="width:99%; " to every 'bound' text input and this causes the input to wrap below its label.

That can be easily corrected by overriding the inline style by adding your own 'style' or 'width' parameter to the cms:input tag or defining a !important style in the stylesheet e.g. this seems to be working for me (you can use other ways) -
Code: Select all
.form-horizontal input[type="text"]{
    width: 206px !important;
}

Hope this helps.
Thanks it helps a lot.
Bound text inputs will no longer output the 99% width style in the next release, 1.4.5.
cheesypoof wrote: Bound text inputs will no longer output the 99% width style in the next release, 1.4.5.


Thanks, this hardcoded 99% is completely not useful, I had to rewrite it with !important parameter every time... Nice to hear that it will be deleted ;)
5 posts Page 1 of 1