function actionDeleteFormField($params = '') { $objForm = new FormModel(); if (!empty($params['field_id'])) { $deleted = $objForm->deleteFormField($params['field_id']); if ($deleted) { $this->messages[] = array('type' => 'success', 'message' => 'Field has been deleted.'); } else { $this->messages[] = array('type' => 'error', 'message' => 'Unable to delete field.'); } } else { $this->messages[] = array('type' => 'error', 'message' => 'Unknown field.'); } if (!empty($params['form_id'])) { $this->actionEditForm(array('form_id' => $params['form_id'])); } else { $this->actionIndex(); } return; }