Created
April 27, 2011 14:09
-
-
Save johnwards/944304 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace WhiteOctober\FormBuilderBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilder; | |
class FormType extends AbstractType | |
{ | |
public function buildForm(FormBuilder $builder, array $options) | |
{ | |
$builder | |
->add('name') | |
->add('shortUrl') | |
->add('welcomeText', 'textarea') | |
->add('selfRegistration') | |
; | |
} | |
public function getDefaultOptions(array $options) | |
{ | |
return array( | |
'virtual' => false, | |
// Errors in forms bubble by default, so that form errors will | |
// end up as global errors in the root form | |
'error_bubbling' => true | |
); | |
} | |
public function getIdentifier() | |
{ | |
return 'wofb_form'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment