1

I have created a model using Awe Model and using the model I've generated the Awe crud.

I am able to view the data in the DB, however when I'm trying to create the record, I get an exception:

AweActiveForm and its behaviors do not have a method or closure named "textFieldRow".

The create form is:

  <?php echo $form->errorSummary($model) ?>
  <?php echo $form->textFieldRow($model, 'cassette_set_no', array('class' => 'span5')) ?>
  <?php echo $form->textFieldRow($model, 'cassette_number', array('class' => 'span5')) ?>
  <?php echo $form->textFieldRow($model, 'duration', array('class' => 'span5')) ?>
  <?php echo $form->textFieldRow($model, 'status', array('class' => 'span5')) ?>
  <?php echo $form->textFieldRow($model, 'remarks', array('class' => 'span5', 'maxlength' => 128)) ?>

  <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit',
  'type'=>'primary','label'=>$model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),  )); ?>

I have Awecrud and Yiistrap installed and configured.

Any help?

4

1 回答 1

0

编辑: Yiistrap 与 Awecrud 不兼容。我已经检查了 yistrap 并且 yistrap 中没有 textFieldRow 函数TbActiveForm。您必须使用 yii 安装此版本的引导程序(下载在右侧)才能与 Awecrud 一起使用。

这很奇怪,因为它TbActiveForm有一个名为textFieldRow并且AweActiveForm extends TbActiveForm应该可用的函数。

请检查您的TbActiveForm班级,看看您是否有textFieldRow功能。如果没有,我认为你有一个过时的版本,TbActiveForm你最好更新它。

于 2014-02-22T09:02:53.380 回答