Yii Framework Forum: [EXTENSION] Bootstrap - Tabbable widget - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] Bootstrap - Tabbable widget Rate Topic: -----

#1 User is offline   Galin Velchev 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 17-July 12

Posted 17 July 2012 - 05:30 AM

Hello, Yii people!
I am new to Yii Framework and this is my first post in the forum. There are so many useful information here, but I couldn't find anything related to my problem: How can I separate form fields into tabs using Tabbable widget from Bootstrap Extension. Here is a simple example of what I want to do:
$this->widget('bootstrap.widgets.BootTabbable', array(
    'type'=>'tabs',
    'placement'=>'above',
    'tabs'=>array(
        array('label'=>'Name', 'content'=>$this->renderPartial('_form1',array('model'=>$model)),'active'=>true),
        array('label'=>'Address', 'content'=>$this->renderPartial('_form2', array('model'=>$model))),
        and so on...
    ),
));

..where the fields from _form1, _form2,.. must make a single form and on submit the $_POST array must contain all the fields from all the forms.

I hope that my question is understandable and someone can help me :)

Thanks in advance,
G.Velchev
0

#2 User is offline   Galin Velchev 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 17-July 12

Posted 18 July 2012 - 07:01 AM

I did it.
0

#3 User is offline   Ferry Lukito 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 27-May 12

Posted 04 December 2012 - 11:05 PM

Hi Galin,

can you share how you did it
0

#4 User is offline   waterloomatt 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 545
  • Joined: 09-April 10

Posted 04 December 2012 - 11:20 PM

View PostFerry Lukito, on 04 December 2012 - 11:05 PM, said:

Hi Galin,

can you share how you did it


Haven't done this myself but I think you should put the form head above the widget and (probably) the form button below the widget. Not sure that this is a good idea from a user experience POV. It will be difficult to open a particular tab when it's form elements are in error state.

<?php echo $form = widget('xxx');?>

$this->widget('bootstrap.widgets.BootTabbable', array(   
    'type'=>'tabs',    
    'placement'=>'above',   
    'tabs'=>array(        
    	array(
  	  	'label'=>'Name', 
  	  	'content'=>$this->renderPartial('_form1',array('model'=>$model)),'active'=>true),        
    	array(
  	  	'label'=>'Address', 
  	  	'content'=>$this->renderPartial('_form2', array('model'=>$model))),        
and so on...    ),));
?>

<?php widget('submitbutton....');?>

Matt

0

#5 User is offline   Glenn 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 13-February 13

Posted 13 February 2013 - 09:10 AM

View PostGalin Velchev, on 18 July 2012 - 07:01 AM, said:

I did it.



How frustrating ... I'm trying to do the same , care to share your solution ?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users