Page 1 of 1

CreateInputForm & Bootstrap CSS

Posted: Fri Jun 17, 2016 5:56 pm
by milehigh
Speaking to the latest CMSMS versions, I know that most of the API based form fields are deprecated with the exception of a couple...CreateFormStart() being one of them.

By default, this generates a class called "cms_form". I've been overwriting that with some jQuery

Code: Select all

($(document).ready(function(){
	$('form').addClass('form-horizontal');


but was wondering if there was something I'm missing for this.

We use Bootstrap and have various uses for .form-inline and .form-horizontal and I'd like to stick to the CMSMS module API's as tightly as possible.

Re: CreateInputForm & Bootstrap CSS

Posted: Fri Jun 17, 2016 6:02 pm
by calguy1000
use the {form_start} plugin in CMSMS 2.x and put as much as is absolutely possible into the template rather than in php code.

The {form_start} plugin allows specifying class, and id attributes.

Re: CreateInputForm & Bootstrap CSS

Posted: Fri Jun 17, 2016 6:29 pm
by milehigh
Exactly what I was looking for. Thanks.