Модель order:
Код: Выделить всё
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('bol', 'required'),
array('bol, name_from, name_to', 'length', 'max'=>45),
array('address_from, address_to', 'length', 'max'=>150),
array('cityzip_from, cityzip_to', 'length', 'max'=>10),
array('phone_from, phone_to', 'length', 'max'=>12),
array('bol', 'safe'),
// The following rule is used by search().
// @todo Please remove those attributes that should not be searched.
array('order_id, bol, name_from, address_from, cityzip_from, phone_from, name_to, address_to, cityzip_to, phone_to, ___virtualField', 'safe', 'on'=>'search'),
);
}
Код: Выделить всё
<?php
$orderModel=new Order;
$this->renderPartial('ordermap',array('model'=>$orderModel)); ?>
Код: Выделить всё
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'ordermap-form',
'action'=>'?r=site/Services',
'enableAjaxValidation'=>false,
'method'=>'post',
)); ?>
<p class="note">Fields with <span class="required">*</span> are required.</p>
<?php echo $form->errorSummary($model); ?>
<div class="row">
<?php echo $form->labelEx($model,'bol'); ?>
<?php echo $form->textField($model,'bol',array('size'=>12,'maxlength'=>10)); ?>
<?php echo $form->error($model,'bol'); ?>
</div>
<div class="row buttons">
<?php echo CHtml::submitButton( 'find'); ?>
</div>
<?php $this->endWidget(); ?>
Надеюсь разборчиво написано.)))))