Replace binary gender examples with something that is actually single-choice

In order to include people who do not fit into the gender binary, gender fields really should be a free-form text field. As such, this patch changes the `choices` example to use a billing plan instead.

# References

* http://gender.wikia.com/wiki/Non-binary
* https://en.wikipedia.org/wiki/Genderqueer
* https://modelviewculture.com/pieces/the-argument-for-free-form-input
* https://www.facebook.com/
parent 081257c5
...@@ -91,8 +91,8 @@ example:: ...@@ -91,8 +91,8 @@ example::
$form = $app['form.factory']->createBuilder('form', $data) $form = $app['form.factory']->createBuilder('form', $data)
->add('name') ->add('name')
->add('email') ->add('email')
->add('gender', 'choice', array( ->add('billing_plan', 'choice', array(
'choices' => array(1 => 'male', 2 => 'female'), 'choices' => array(1 => 'free', 2 => 'small_business', 3 => 'corporate'),
'expanded' => true, 'expanded' => true,
)) ))
->getForm(); ->getForm();
...@@ -139,10 +139,10 @@ form by adding constraints on the fields:: ...@@ -139,10 +139,10 @@ form by adding constraints on the fields::
->add('email', 'text', array( ->add('email', 'text', array(
'constraints' => new Assert\Email() 'constraints' => new Assert\Email()
)) ))
->add('gender', 'choice', array( ->add('billing_plan', 'choice', array(
'choices' => array(1 => 'male', 2 => 'female'), 'choices' => array(1 => 'free', 2 => 'small_business', 3 => 'corporate'),
'expanded' => true, 'expanded' => true,
'constraints' => new Assert\Choice(array(1, 2)), 'constraints' => new Assert\Choice(array(1, 2, 3)),
)) ))
->getForm(); ->getForm();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment