i want to make a button that submits the data captured fro the Cactiveform but outside the CActiveform, im using yiistrap to make a modal which will contain the cactiveform data, this is my code:
<?php $this->widget('bootstrap.widgets.TbModal', array(
'id' => 'myModal',
'header' => 'login',
'content' => $this->renderPartial('test', array('model'=>$model), true),
'footer' => array(
TbHtml::submitButton('Login', array('data-target'=>'#login-form', 'color'=>TbHtml::BUTTON_COLOR_INVERSE,))
),
)); ?>
<?php $this->widget('bootstrap.widgets.TbHeroUnit', array(
'heading' => 'Nosthertus\'s Server!',
'content' => '<p>This page is a test webpage server under beta.</p>' .
TbHtml::button('Login', array(
'color' => TbHtml::BUTTON_COLOR_INVERSE,
'size' => TbHtml::BUTTON_SIZE_LARGE,
'data-toggle' => 'modal',
'data-target' => '#myModal',
)),
)
); ?>
renderpartial with the CActive form.
<p>Please fill out the following form with your login credentials:</p>
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'login-form',
'enableClientValidation'=>true,
'clientOptions'=>array(
'validateOnSubmit'=>true,
),
)); ?>
<p class="note">Fields with <span class="required">*</span> are required.</p>
<div class="row">
<?php echo $form->labelEx($model,'username'); ?>
<?php echo $form->textField($model,'username'); ?>
<?php echo $form->error($model,'username'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model,'password'); ?>
<?php echo $form->passwordField($model,'password'); ?>
<?php echo $form->error($model,'password'); ?>
<p class="hint">
Hint: You may login with <kbd>demo</kbd>/<kbd>demo</kbd> or <kbd>admin</kbd>/<kbd>admin</kbd>.
</p>
</div>
<div class="row rememberMe">
<?php echo $form->checkBox($model,'rememberMe'); ?>
<?php echo $form->label($model,'rememberMe'); ?>
<?php echo $form->error($model,'rememberMe'); ?>
</div>
<div class="row buttons">
<?php echo TbHtml::submitButton('Login', array('color'=> TbHtml::BUTTON_COLOR_PRIMARY)); ?>
</div>
<?php $this->endWidget(); ?>
</div><!-- form -->
i want the button on the footer of TbModal to work like the submitbutton inside the CActiveform.