Awecrud Yiistrap exception: AweActiveForm and its behaviors do not have a method or closure named "textFieldRow"

StackOverflow https://stackoverflow.com/questions/21951505

Question

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?

Was it helpful?

Solution

EDIT : Yiistrap is not compatible with Awecrud. I've checked yiistrap and yiistrap does not have a textFieldRow function in TbActiveForm. You have to install this version of bootstrap with yii (downloads are on the rightside) to work with Awecrud.

This is strange because TbActiveForm has a function named textFieldRow and since AweActiveForm extends TbActiveForm it should be available.

Please check your TbActiveForm class and find if you have a textFieldRow function. If not, I think you have an outdated version of TbActiveForm and you better update it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top