Controller/CustomFieldController.php
private function createCreateForm(CustomField $entity, $type)
    {
        $form = $this->createForm('custom_field_choice', $entity, array(
            'action' => $this->generateUrl('customfield_create', 
                  array('type' => $type)),
            'method' => 'POST',
            'type' => $type,
            'group_widget' => ($entity->getCustomFieldsGroup()) ? 'hidden' :'entity'
        ));
        
        $form->add('submit', 'submit', array('label' => 'Create'));

        return $form;
    }
private function createCreateForm(CustomField $entity, $type)
    {
        $form = $this->createForm('custom_field_choice', $entity, array(
            'action' => $this->generateUrl('customfield_create', 
                  array('type' => $type)),
            'method' => 'POST',
            'type' => $type,
            'group_widget' => ($entity->getCustomFieldsGroup()) ? 'hidden' :'entity'
        ));
        
        $form->add('submit', 'submit', array('label' => 'Create'));

        return $form;
    }
Creates a form to create a CustomField entity.

@param CustomField $entity The entity
@param string
@return \Symfony\Component\Form\Form The form