/** Set up and configure which findspot fields to copy when copying record * @access public * @return void */ public function findspotAction() { $form = new ConfigureFindSpotCopyForm(); $this->view->form = $form; $copyFindSpot = new CopyFindSpot(); $current = $copyFindSpot->getConfig(); $values = array(); foreach ($current as $cur) { $values[$cur] = 1; } $form->populate($values); if ($this->_request->isPost()) { $formData = $this->_request->getPost(); if ($form->isValid($formData)) { $copyFindSpot->updateConfig($form->getValues()); $this->getFlash()->addMessage('Copy last record fields for findspot table updated'); $this->redirect('/users/configuration/'); } else { $form->populate($values); } } }