YiiBooster
YiiBooster copied to clipboard
how to assign class to a textFieldGroup?
The following code not working!
echo $form->textFieldGroup($model, 'Email',array('class'=>'input-group input-group-lg'));
I am not able to assign the class to the above input.
Please if anyone can help?
Why don't you just use textField instead of textFieldGroup On Aug 16, 2014 3:32 PM, "sachy123" [email protected] wrote:
The following code not working!
echo $form->textFieldGroup($model, 'Email',array('class'=>'input-group input-group-lg'));
I am not able to assign the class to the above input.
Please if anyone can help?
— Reply to this email directly or view it on GitHub https://github.com/clevertech/YiiBooster/issues/907.
Thanks for the reply but it still does not help.. again the class is not applied.. but anyways do you know how i can apply class to the variables? intact using textFieldGroup is better because it pulls the attribute name.
You need to assign it under the htmlOptions array, like: echo $form->textFieldGroup($model, 'Email',array( 'htmlOptions' => array( 'class'=>'input-group input-group-lg') ), );
Thanks ! but it still does not work my code is here
$form = $this->beginWidget(
'ext.YiiBooster.widgets.TbActiveForm',
array(
'id' => 'verticalForm',
'htmlOptions' => array('class' => 'well'), // for inset effect
// 'htmlOptions'=>array('class'=>'well'),
'enableAjaxValidation'=>true,
'focus'=>array($model,'Email'),
'enableClientValidation'=>true,
)
);
echo $form->textFieldGroup($model, 'Email',array(
'htmlOptions' => array(
'class'=>'input-group input-group-lg')
));
// echo $form->textFieldGroup($model, 'Email',array('class'=>'input-group input-group-lg')); echo $form->passwordFieldGroup($model, 'Password'); echo $form->checkboxGroup($model, 'rememberMe'); $this->widget( 'ext.YiiBooster.widgets.TbButton', array('buttonType' => 'submit', 'label' => 'Login') ); ?>
// code below
For the group options, I think there is another array called groupOptions, although I am unsure if it works for vertical, horizontal, or both. Try out: echo $form->textFieldGroup($model, 'Email',array( 'htmlOptions' => array( 'class'=>'input-lg') ), 'groupOptions'=>array( 'class'=>'input-group', ), );
Collins wants you to check out Tenderpreneur.net
Hi:
I would like to add you to my network on Tenderpreneur.net.
Follow this link to join my network: http://tenderpreneur.net.
Have a great day!
Explore Tenderpreneur.net and create network of your friends.===============================================
App Uprising, Inc., 20 Jay street, Brooklyn, NY, 11201
Powered by ReadyGraph https://www.readygraph.comIf you'd like to unsubscribe and stop receiving these emails click here: http://email.readygraph.com/wf/unsubscribe?upn=s5UH8bhnBaopYjthcNSRce1IxazJ5upXwSo1UjuFbGfULCvr0VD9v-2FjRiAQ4yfo-2F8Z6P-2FGddAZqvVvzwce0TPNSliCYeiRIQjqESWEfcZyvWrrh2YFxAzdCNSaAusYUxfhVQGw0sXLURZSezQcUjRQV14rBZ-2FqN7RHqZtIKUDBH6tIEwytCHShKCBkE-2FHqoLpbVV4KzxqeEyDiSI-2F3F51Wg7swisn8gH4Ap2SS16xi6b5-2Bf0w9PgAnQpPG-2FDSeSzbLRM3YH98-2FCIDPWWj1N1GzF6pI1tIkw4t-2FlzlY8-2F3M3lqaM8ycuIoovv3q-2BX-2B6Ca5HRPAmMlmkeYD1-2Bw-2BLRxoA-3D-3D.