<?php

/**
 * Callback form.
 *
 * @package    sf
 * @subpackage form
 * @author     Atma
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class wwwCallbackForm extends BaseCallbackForm
{
    public function configure()
    {
        $this->useFields(array('name', 'phone', 'offer_id'));

        sfApplicationConfiguration::getActive()->loadHelpers(array('I18N'));

        $this->widgetSchema['name'] = new sfWidgetFormInputText(array(), array("size" => 64, "maxlength" => 255, "required" => true, 'placeholder' => __('Как к вам обращаться'), 'autocomplete' => 'off'));
        $this->widgetSchema['phone'] = new sfWidgetFormInputText(array(), array("size" => 64, "maxlength" => 255, "required" => true, 'placeholder' => __('Номер телефона'), 'autocomplete' => 'off'));
        $this->validatorSchema['phone'] = new sfValidatorAnd(array(
            new sfValidatorNumber(array('required' => true)),
            new sfValidatorString(array('max_length' => 255, 'required' => true))
        ));
    }
}
