kalpit
(Panditkalpit)
August 22, 2013, 9:54am
1
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?
jayant
(Codesutras)
August 22, 2013, 10:02am
2
kalpit:
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.
kalpit
(Panditkalpit)
August 22, 2013, 10:09am
3
thanks for replay
but that page design i did using jquery and Html. i didn’t use CactiveForm widgest inside for textbox and all…
jayant
(Codesutras)
August 22, 2013, 10:15am
4
What you mean by this
So, how you are creating a forms in your application?? This is how you are proceeding.
kalpit
(Panditkalpit)
August 22, 2013, 10:17am
5
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.
jayant
(Codesutras)
August 22, 2013, 10:19am
6
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.
kalpit
(Panditkalpit)
August 22, 2013, 10:25am
7
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
and my other forms also i am using Cactiveform only then also it’s taking bootstrap effect
jayant
(Codesutras)
August 22, 2013, 10:26am
8
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.
jayant
(Codesutras)
August 22, 2013, 10:30am
9
Didn’t get you last comment ??
jayant
(Codesutras)
August 22, 2013, 10:33am
10
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.
kalpit
(Panditkalpit)
August 22, 2013, 10:47am
11
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