/**
  * Приём анкеты Сити банка
  */
 public function executeCitiCashBackApplication(sfRequest $request)
 {
     $form = new CitiBankApplicationForm();
     $form->bind($request->getPostParameters());
     if ($form->isValid()) {
         $this->_sendEmail($form->getValues());
         return $this->renderJsonSuccess('Анкета успешно отправлена');
     }
     $errors = $form->getErrorSchema()->getErrors();
     $errorMessages = array();
     //TODO: refactor: все сообщения русским языком должны создаваться на клиенте,
     //сервер должен слать только код поля (например, "email") и сообщение валидатора
     $humanFieldNames = array("email" => "Email", "birthday" => "Дата рождения", "name" => "Имя", "patronymic" => "Отчество", "surname" => "Фамилия", "mobile_phone" => "Мобильный телефон");
     foreach ($errors as $fieldName => $error) {
         $errorMessages[] = sprintf("%s", $humanFieldNames[$fieldName]);
     }
     return $this->renderJsonError("Пожалуйста, исправьте заполнение полей: \n" . implode(', ', $errorMessages));
 }
<?php

$data = array('city' => 'Уфа', 'employment' => 'Работаю по постоянному контракту', 'birthday' => date('Y-m-d', strtotime('30 years ago')), 'name' => 'Василий', 'patronymic' => 'Иванович', 'surname' => 'Тёркин', 'mobile_code' => '123', 'mobile_phone' => '1234567', 'email' => '*****@*****.**');
$form = new CitiBankApplicationForm();
$form->bind($data);
function simpleOptions($arr)
{
    $result = array();
    foreach ($arr as $key => $val) {
        $result[] = '<option value="' . $val . '">' . $val . '</option>';
    }
    return implode($result, '');
}
$api_url = url_for("easybank_citi_cashback_apply");
$cityfield = array('label' => 'Город', 'name' => 'city', 'id' => 'city', 'selectbox' => simpleOptions($form['city']->getWidget()->getChoices()));
$employmentfield = array('label' => 'Форма трудоустройства', 'name' => 'employment', 'id' => 'employment', 'selectbox' => simpleOptions($form['employment']->getWidget()->getChoices()));
$date = array('label' => 'Дата рождения', 'name' => 'birthday', 'hint' => 'В формате ДД.ММ.ГГГГ', 'inputClass' => 'js-control js-control-datepicker', 'jsparams' => sprintf('{
            dateFormat: "dd.mm.yy",
            changeMonth: true,
            changeYear: true,
            maxDate: new Date("%s"),
            minDate: new Date("%s"),
            yearRange: "%s:%s"
        }', date('r', strtotime('22 years ago')), date('r', strtotime('60 years ago')), date('Y', strtotime('60 years ago')), date('Y', strtotime('20 years ago'))));
$name = array('label' => 'Имя', 'name' => 'name');
$patronymic = array('label' => 'Отчество', 'name' => 'patronymic');
$surname = array('label' => 'Фамилия', 'name' => 'surname');
$phone = array('label' => 'Мобильный телефон', 'name' => 'mobile_number', 'hint' => '+7 (123) 4567890', 'inputClass' => 'js-control js-control-phonefield', 'jsparams' => '{forceRussia: true}');
$email = array('label' => 'Email', 'name' => 'email', 'type' => 'text');
?>