Hi,Is it possible to populate the data in my textfield by default in _form.php ?
example if I have this form
trn# 00005 //Here I want to put default value which is pulled out from my table trns_tble .ex. 00005
trnName
telNo
etc…
_form.php
<?php
?>
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'transaction-form',
// Please note: When you enable ajax validation, make sure the corresponding
// controller action is handling ajax validation correctly.
// There is a call to performAjaxValidation() commented in generated controller code.
// See class documentation of CActiveForm for details on this.
'enableAjaxValidation'=>false,
)); ?>
<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,'trans_no'); ?>
<?php echo $form->textField($model,'trans_no'); ?>
<?php echo $form->error($model,'trans_no'); ?>
</div>
Other textfields......
<?php $this->endWidget(); ?>
</div><!-- form -->