How To Restrict(Disable) Bootstrap Effect For Specific Form

hello,

i am using bootstrap in my project. it’s working fine.

but i dont want bootstrap effect (textbox effetcs) for specific forms.

because it’s changing my layout (because of textbox width and all).

i tried to used Yii::app()->bootstrap->register(false) to restrict it but it didn’t work.

any solution for this?

Use CactiveForm instead of bootstrap.widgets.TbActiveForm while you are creating a Form widgets. Then change htmlOptions property there.

thanks for replay

but that page design i did using jquery and Html. i didn’t use CactiveForm widgest inside for textbox and all…

What you mean by this ??? :unsure:

So, how you are creating a forms in your application?? This is how you are proceeding.

i am using Cactiveform widgets only for forms but for this form i used HTML5 and CSS3. it’s full loaded with jquery and html codes.

Let’s create a Different layout for this page.if this


Yii::app()->bootstrap->register(false) 

is not working.

and dont include bootstrap in that page.

buddy it will take too much time to convert it into yii format. and i have 3 forms like this.

that’s a problem :huh: :huh:

and my other forms also i am using Cactiveform only then also it’s taking bootstrap effect

This extension dont have any boolen param in register function as you are trying to do.




	/**

	 * Registers all Bootstrap CSS and JavaScript.

	 * @since 2.1.0

	 */

	public function register()

	{

		$this->registerAllCss();

		$this->registerCoreScripts();

	}



So,if you want to add this kind of feature in it then i think you need to do some changes here in register method.

Didn’t get you last comment ??

I did a very small changes in extension.bootstrap/components/Bootstrap.php on line 113.




	public function register($flag=null)

	{

		if(!isset($flag)){

		$this->registerAllCss();

		$this->registerCoreScripts();

		}

		

	}




And use in like




Yii::app()->bootstrap->register('false');



i hope it will sort out your problem or may be you got your idea what you have to do.

thanks Buddy it worked :) :)

i just changed register method like this…

public function register($flag)

{


	if($flag!='false')


            {


	$this->registerAllCss();


	$this->registerCoreScripts();


	}


}

and now it’s working fine…

in which page i want bootstrap at that page i just have to call

Yii::app()->bootstrap->register(‘true’);

and in which page i don’t want i just have to call

Yii::app()->bootstrap->register(‘false’);

Thanks you very much :) :) :)

Glad to know ;)

Cheers !!!