} $f = $field . '_click'; $model->{$f} = count($model->getContactClickedUsers()); $model->update($f); echo $model->{$f}; } public function actionSubmitTcForm() { if (isset($_POST['CompanyListingAgreement'])) { $model = new CompanyListingAgreement('show-popup'); $model->attributes = $_POST['CompanyListingAgreement'];