<?php

$name = 'ExternalNumber[' . $row . '][' . $column->name . ']';
$htmlOptions = array(
    'name' => $name,
    'data-custom-contexthelp-key' => 'EXTERNALNUMBER_' . strtoupper($column->name) . '_CONTEXT_HELP'
);
$html = '';
if ($column->name != 'pattern') {
    $html = CHtml::activeCheckBox($data, $column->name, $htmlOptions);
} else {
    $html = CHtml::activeTextField($data, $column->name, $htmlOptions);
    $html.=CHtml::activeHiddenField($data, 'id', array('name' => 'ExternalNumber[' . $row . '][dataId]'));
}
echo $html;

