Yiistrap Forum Submission


I am having trouble getting Yiistrap to work with form submissions. I am currently able to successfully save a form using standard Yii syntax like this:

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(






)); ?>

	<div class="row">

		<?php echo $form->labelEx($model,'Deal_Name'); ?>

		<?php echo $form->textField($model,'Deal_Name'); ?>

		<?php echo $form->error($model,'Deal_Name'); ?>


	<div class="row">

		<?php echo $form->labelEx($model,'Owner'); ?>

		<?php echo $form->passwordField($model,'Owner'); ?>

		<?php echo $form->error($model,'Owner'); ?>


	<div class="row">

		<?php echo $form->labelEx($model,'Division'); ?>

		<?php echo $form->passwordField($model,'Division'); ?>

		<?php echo $form->error($model,'Division'); ?>


	<div class="row buttons">

		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>


	<?php $this->endWidget(); ?>


However when I want to do a yiistrap form I cannot get it to save properly, most likely I am missing the proper parameters to send the form correctly. Below is my Yiistrap code:

<?php echo TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_HORIZONTAL)

); ?>

    <?php echo TbHtml::textFieldControlGroup('Land_Deal', '',

        array('label' => 'Land Deal', 'placeholder' => 'Land Deal'

    )); ?>

    <?php echo TbHtml::textFieldControlGroup('Owner', '',

        array('label' => 'Responible Party', 'placeholder' => 'Responsible Party'

    )); ?>

    <?php echo TbHtml::textFieldControlGroup('Division', '',

        array('label' => 'Division', 'placeholder' => 'Division'

    )); ?>

    <?php echo TbHTML::submitButton('Save'

    ); ?>

<?php echo TbHtml::endForm(); ?>

Could you guys give me some insight as to what I am missing? I am still a little new to yiistrap.

thanks in advance!

I would suggest you to use TbActiveForm to replace CActiveForm.

[color="#006400"]NOTE: moved to proper forum section[/color]