===== Edit_account_data FORM CONTROLLER ===== /applications/controllers/actions/Account_change.php load->model('account_changes'); } /** * Index Page for this controller. */ public function index() { //POST VALUES if($this->input->post()){ $post_data = $this->input->post(); $save_state = $this->account_changes->update_accounts($post_data['account_id']); } //based on save do var update if($save_state){ if($this->input->post('status') == 'DONE') $data['RESULT'] = 'OK'; $data['STATUS'] = $this->input->post('status'); $this->core_actions->update_var('ACTIVITY',$this->input->post('activity'),'ACTIVITY',$this->input->post('activity'),$data,NULL); } //handle errors according to business logic $result = true; $message = ''; $return = array( 'result' => $save_state, 'error' => $message ); $this->output->set_content_type('application/json')->set_output(json_encode($return)); } } [[tech2018:s4:develop_custom_form| Back to: dev forms/develop custom forms]]