CreateInputForm & Bootstrap CSS

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Locked
milehigh

CreateInputForm & Bootstrap CSS

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CreateInputForm & Bootstrap CSS

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
milehigh

Re: CreateInputForm & Bootstrap CSS

Post by milehigh »

Exactly what I was looking for. Thanks.
Locked

Return to “Developers Discussion”