/** * Render sendgrid editable text field * @param CModel $model * @param CFormModel $form * @param string $attribute * @param boolean $isPassword * @return string */ public function renderSendGridEditableTextField($model, $form, $attribute, $isPassword = false) { $id = ZurmoHtml::activeId($model, $attribute); $name = ZurmoHtml::activeName($model, $attribute); $htmlOptions = array('name' => $name, 'id' => $id); $label = $form->labelEx($model, $attribute, array('for' => $id)); if (!$isPassword) { $textField = $form->textField($model, $attribute, $htmlOptions); } else { $textField = $form->passwordField($model, $attribute, $htmlOptions); } $error = $form->error($model, $attribute); return '<div>' . $label . $textField . $error . '</div>'; }