Image Upload Using Chtml Form

I am using CHtml form for uploading an image. This is the code

view.php




<div class="form">

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


    <div class="row">

        <?php echo CHtml::activeLabel($model, 'image'); ?>

        <?php echo CHtml::activeFileField($model, 'image') ?>

        <?php //echo Chtml::error($model, 'name'); ?>

    </div>

    <div class="row submit">

        <?php echo "<br>" . CHtml::imageButton(Yii::app()->request->baseUrl . '/images/upload.png', array('submit' )); ?>

    </div>


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

</div><!-- form -->



my doubt is, where i put this following code in this view.




//form options array...

'htmlOptions' => array(

        'enctype' => 'multipart/form-data',

    ),



Thanks

that goes in the form:




<?php $form=$this->beginWidget('CActiveForm', array(

	'id'=>'picture-form',

	'enableAjaxValidation'=>false,

	'htmlOptions'=>array('enctype'=>'multipart/form-data')

)); ?>