/** * @param FormMapper $formMapper */ protected function configureFormFields(FormMapper $formMapper) { $this->_form_label = 'form'; parent::configureFormFields($formMapper); $id = $this->getRequest()->get($this->getIdParameter()); $formMapper->with(' '); $formMapper->add('client', null, array('label' => ' ', 'data' => $this->getClient(), 'attr' => array('class' => 'client_id important_hidden')))->add('is_new', 'hidden', array('data' => $id ? 0 : 1, 'mapped' => false, 'attr' => array('class' => 'is_new'))); }