/** Set up and configure the coin copying fields for cloning a record.
  * @access public
  * @return void
  */
 public function coinAction()
 {
     $form = new ConfigureCoinCopyForm();
     $this->view->form = $form;
     $copyCoin = new CopyCoin();
     $current = $copyCoin->getConfig();
     $values = array();
     //As each value is a checkbox and we need to set as checked use 1
     foreach ($current as $cur) {
         $values[$cur] = 1;
     }
     $form->populate($values);
     if ($this->_request->isPost()) {
         $formData = $this->_request->getPost();
         if ($form->isValid($formData)) {
             $copyCoin->updateConfig($form->getValues());
             $this->getFlash()->addMessage('Copy last record fields for coin table updated');
             $this->redirect('/users/configuration/');
         } else {
             $form->populate($values);
         }
     }
 }