Hello everyone!

We have been investing plenty of personal time and energy for many years to share our knowledge with you all. However, we now need your help to keep this blog running. All you have to do is just click one of the adverts on the site, otherwise it will sadly be taken down due to hosting etc. costs. Thank you.

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.

Form builder

->add('email', 'text', array('label' => 'Email'))
->add('hiddenEmail', 'hidden', array('mapped' => false, 'data' => $builder->getData()->getEmail()))