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(); } }