12/09/2014 - SYMFONY, TWIG
Sometimes we might want to assign a value of particular field to another, for instance as a hidden value so on. You can do it as shown below.
$builder
->add('email', 'text', array('label' => 'Email'))
->add('hiddenEmail', 'hidden', array('mapped' => false, 'data' => $builder->getData()->getEmail()))
;