Yii Framework Forum: Creating Dynamic page in web3cms application - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Creating Dynamic page in web3cms application Rate Topic: -----

#1 User is offline   asif 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 18-August 09

Posted 19 August 2009 - 04:21 AM

Hello i am newbie to yii framework. Please anyone guide me to create dynamic web pages in web3cms application of yii and what is the procedure.

In web3cms i have created customers page to insert customer information.if i place the following code.

<?php $this->setPageLabel(''); ?>
<?php MLayout::hideSidebars(); ?>
<?php $this->widget('application.components.WContentHeader',array(
'label'=>'Welcome, '.Yii::app()->user->name.'!',
'afterLabel'=>false,
'displayBreadcrumbs'=>false,
)); ?>
<div class="yiiForm">
<?php echo CHtml::beginForm(); ?>

<?php echo CHtml::errorSummary($customer); ?>

<div class="simple">
<?php echo CHtml::activeLabel($customer,'username'); ?>
<?php echo CHtml::activeTextField($customer,'username'); ?>
</div>

<div class="simple">
<?php echo CHtml::activeLabel($customer,'password'); ?>
<?php echo CHtml::activePasswordField($customer,'password');
?>
</div>

<div class="action">
<?php echo CHtml::activeCheckBox($customer,'rememberMe'); ?>
Remember me next time<br/>
<?php echo CHtml::submitButton('Login'); ?>
</div>

<?php echo CHtml::endForm(); ?>
</div><!-- yiiForm -->

i got some fatal error....

Fatal error: Call to a member function getErrors() on a non-object in C:\xampp\htdocs\webapp\framework\web\helpers\CHtml.php on line 1375

please anyone guide me for this problem..
0

#2 User is offline   pestaa 

  • past Yii dev member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 705
  • Joined: 07-May 09
  • Location:Hungary

Posted 19 August 2009 - 05:55 AM

You probably haven't passed $costumer to your view. Please check your rendering command in your action.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users