widgetSchema['name'] = new sfWidgetFormInput(); $this->widgetSchema['name']->setLabel(__('Jméno a příjmení')); $this->validatorSchema['name'] = new sfValidatorString(array('required' => true)); $this->widgetSchema['tel'] = new sfWidgetFormInput(); $this->widgetSchema['tel']->setLabel(__('Telefon')); $this->validatorSchema['tel'] = new sfValidatorString(array('required' => false)); $this->widgetSchema['mail'] = new sfWidgetFormInput(); $this->widgetSchema['mail']->setLabel(__('Email')); $this->validatorSchema['mail'] = new sfValidatorEmail(array('required' => true)); $this->widgetSchema['text'] = new sfWidgetFormTextarea(); $this->widgetSchema['text']->setLabel(__('Text Vaší zprávy')); $this->validatorSchema['text'] = new sfValidatorString(array('required' => false)); $this->widgetSchema->setNameFormat('contact_form[%s]'); commonFormFunctions::setJqUiFormater($this); commonFormFunctions::addClasses($this); $this->disableCSRFProtection(); } }