Make following steps:
1. Add field to table in database
2. Edit /protected/modules/apartments/models/Apartment.php
2.1. Add to function rules() new array: array('website', 'safe'), or array('website', 'length', 'max' => 255), (this is validation rules)
2.2. Add new line to function attributeLabels(): 'website' => tt('Website', 'apartments'), (this is a 'translation' for this field, you will be able to change it from admin panel)
3. Edit /protected/modules/apartments/views/backend/__form_general.php and add to preferred place:
- Code: Select all
<div class="rowold">
<?php echo $form->labelEx($model, 'website'); ?>
<?php echo $form->textField($model, 'website', array('class' => 'width240')); ?>
<?php echo $form->error($model, 'website'); ?>
</div>
4. Add CHtml::encode($data->website) to your _tab_general.php