我正在將Yii Framework和Yii Booster擴展作爲引導。我正在嘗試在下拉列表中創建一個登錄表單。我有一個TbNavbar,並且它是下拉代碼,但是當我在下拉列表中添加登錄表單時,它只是顯示下拉內的代碼。TbNavbar內部下拉項目的形式YiiBooster
我爲先導用這個貼子:
這裏是我的代碼的形式和它只是不工作:
<?php $this->beginWidget('bootstrap.widgets.TbNavbar', array(
'type'=>'inverse',
'brand' => 'Title',
'fixed'=>'bottom',
'collapse'=>true,
'items'=>array(
array(
'class'=>'bootstrap.widgets.TbMenu',
'type'=>'inverse',
'items'=>array(
array('label'=>'Home', 'url'=>'#', 'active'=>true),
array('label'=>'Link', 'url'=>'#'),
array('label' => 'DropDown', 'items' => array(
array('label' => 'Item1', 'content' => 'Item1 Content'),
array('label' => 'Item2', 'content' => 'Item2 Content')
)),
array('label'=>'Dropdown', 'url'=>'#', 'items'=>array(
array('label'=>'Action', 'url'=>'#'),
array('label'=>'Another action', 'url'=>'#'),
array('label'=>'Something else here', 'url'=>'#'),
'---',
array('label'=>'NAV HEADER'),
array('label'=>'Separated link', 'url'=>'#'),
array('label'=>'One more separated link', 'url'=>'#'),
)),
),
),
'<ul class="nav pull-right">
<li><a href="https://stackoverflow.com/users/sign_up">Sign Up</a></li>
<li class="divider-vertical"></li>
<li class="dropdown">
<a class="dropdown-toggle" href="#" data-toggle="dropdown">Sign In <strong class="caret"></strong></a>
<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">
<?php $form = $this->beginWidget(\'bootstrap.widgets.TbActiveForm\', array(
\'id\'=>\'verticalForm\',
\'htmlOptions\'=>array(\'class\'=>\'well\'),
)); ?>
<?php echo $form->textFieldRow($model, \'textField\', array(\'class\'=>\'span3\')); ?>
<?php echo $form->passwordFieldRow($model, \'password\', array(\'class\'=>\'span3\')); ?>
<?php echo $form->checkboxRow($model, \'checkbox\'); ?>
<?php $this->widget(\'bootstrap.widgets.TbButton\', array(\'buttonType\'=>\'submit\', \'label\'=>\'Login\')); ?>
<?php $this->endWidget(); ?>
</div>
</li>
</ul>' ),)); ?>
<?php $this->endWidget(); ?>
謝謝!這是現在的下拉,但是當我點擊該按鈕,沒做什麼:C 附加到我有一些代碼停在thextfields和「登錄按鈕」 ptopagation,因爲當你在的東西點擊它下拉沒有理由隱藏。這可能是一個問題嗎? –
@AareelyCoca,請檢查編輯以解決您在下拉菜單時遇到的問題。 – Hearaman
好吧,我把所有的代碼,你把我在這裏,當我點擊它讓無所事事的按鈕:C也會是別的我失蹤? –