<h3><?php echo ($model->isNewRecord) ? 'Add New Sub Brand' : 'Edit Sub Brand'; ?></h3>

<?php echo CHtml::beginForm(); ?>

<?php echo CHtml::hiddenField('MasSubBrands[id]', $model->id); ?>

<div>
    <label>Brand</label><br>
    <?php
    $brands = CHtml::listData(MasBrands::model()->findAll(), 'id', 'brand_name');

    echo CHtml::activeDropDownList(
        $model,
        'brand_id',
        $brands,
        array('class'=>'form-control','prompt'=>'-- Select Brand --')
    );
    ?>
</div>

<br>

<div>
    <label>Sub Brand Name</label><br>
    <?php echo CHtml::activeTextField($model, 'sub_brand_name', array('class'=>'form-control')); ?>
</div>

<br><br>

<?php echo CHtml::submitButton('Save', array('class'=>'btn btn-primary')); ?>

<?php echo CHtml::endForm(); ?>