public function __construct($parent, $name) { parent::__construct($parent, $name); $renderer = $this->getRenderer(); $renderer->wrappers['controls']['container'] = NULL; $renderer->wrappers['pair']['container'] = 'div'; $renderer->wrappers['label']['container'] = NULL; $renderer->wrappers['control']['container'] = NULL; $this->getElementPrototype()->class[] = 'input-box-form'; $this->addGroup(); $this->addText('name', 'Jméno')->setRequired(); $this->addText('surname', 'Příjmení')->setRequired(); $this->addText('address', 'Adresa')->setRequired(); $this->addText('city', 'Město')->setRequired(); $this->addText('zip', 'PSČ')->setRequired(); $this->addText('email', 'Email')->addRule(Form::EMAIL, 'Email není ve správném formátu')->setRequired('Zadejte, prosím, Váš email'); $this->addGroup(); $c = $this->addContainer('catalogs'); $c->addCheckbox('maxmara', 'Katalog Max Mara'); $c->addCheckbox('weekend', 'Katalog Weekend Max Mara'); $c->addCheckbox('marina', 'Katalog Marina Rinaldi'); $c->addCheckbox('marella', 'Katalog Marella'); $c->addCheckbox('iblues', 'Katalog iBlues'); $this['catalogs']['maxmara']->addRule(array($this, 'atLeastOneCheckBoxChecked'), 'Označte alespoň jeden katalog', $this['catalogs']); $this->addGroup(); $this->addCheckbox('agree', 'Souhlasím s použitím svých kontaktních údajů pro marketingové účely společnosti MaxPraga s.r.o.')->setRequired(); $this->addSubmit('send', 'Odeslat'); //$this['name']->getControlPrototype()->class = 'full-width-input'; // $this['email']->getControlPrototype()->class = 'input'; // $this['text']->getControlPrototype()->class = 'input2'; $this->onSuccess[] = array($this, 'formSubmited'); }
public function __construct($parent, $name) { parent::__construct($parent, $name); $this->addText('email', 'Email')->addRule(Form::EMAIL, 'Email není ve správném formátu')->setRequired('Zadejte, prosím, Váš email'); $this->addSubmit('send', 'Odeslat'); $this->addCheckbox('agree', 'Souhlasím s podmínkami')->setRequired(); $this['email']->getControlPrototype()->placeholder = 'Zadejte email'; // $this['email']->getControlPrototype()->class = 'input'; // $this['text']->getControlPrototype()->class = 'input2'; $this->onSuccess[] = array($this, 'formSubmited'); }
public function __construct($parent, $name) { parent::__construct($parent, $name); $this->addText('name', 'Jméno')->setRequired('Zadejte, prosím, Vaše jméno'); $this->addText('email', 'Email')->addRule(Form::EMAIL, 'Email není ve správném formátu')->setRequired('Zadejte, prosím, Váš email'); $this->addTextArea('text', 'Text')->addRule(Form::MAX_LENGTH, 'Maximální dálka zprávy je %d znaků', 500)->setRequired('Zadejte, prosím, text zprávy'); $this->addSubmit('send', 'Odeslat'); $this['name']->getControlPrototype()->class = 'full-width-input'; // $this['email']->getControlPrototype()->class = 'input'; // $this['text']->getControlPrototype()->class = 'input2'; $this->onSuccess[] = array($this, 'formSubmited'); }
public function __construct($parent, $name) { parent::__construct($parent, $name); $renderer = $this->getRenderer(); $renderer->wrappers['controls']['container'] = NULL; $renderer->wrappers['pair']['container'] = 'div'; $renderer->wrappers['label']['container'] = NULL; $renderer->wrappers['control']['container'] = NULL; $this->getElementPrototype()->class[] = 'input-box-form'; $this->addText('company', 'Firma:')->setRequired(); $this->addText('headquarters', 'Sídlo firmy:'); $this->addText('major_interest', 'Hlavní obor činnosti:'); $this->addTextArea('cooperation_field', 'Zájem o spolupráci v oblasti:'); $this->addText('contact_person', 'Kontaktní osoba:')->setRequired(); $this->addText('job', 'Pozice:'); $this->addText('phone', 'Telefon:'); $this->addText('email', 'Email:')->addRule(Form::EMAIL)->setRequired(); $this->addTextArea('comments', 'Komentář:'); $this->addCheckbox('agree', 'Souhlasím se zpracováním osobních údajů pro účely výběrového řízení.')->addRule(Form::FILLED, 'Musíte souhlasit se zpracováním osobních údajů'); $this->addSubmit('send', 'Odeslat'); $this->onSuccess[] = array($this, 'formSubmited'); }
public function __construct($parent, $name) { parent::__construct($parent, $name); $renderer = $this->getRenderer(); $renderer->wrappers['controls']['container'] = NULL; $renderer->wrappers['pair']['container'] = 'div'; $renderer->wrappers['label']['container'] = NULL; $renderer->wrappers['control']['container'] = NULL; $this->getElementPrototype()->class[] = 'input-box-form'; $this->addGroup('Osobní údaje'); $this->addText('name', 'Jméno')->setRequired(); $this->addText('surname', 'Příjmení')->setRequired(); $this->addText('title', 'Titul'); $this->addText('date_birth', 'Datum narození')->setRequired(); $this->addText('address', 'Adresa')->setRequired(); $this->addGroup(' '); $this->addText('city', 'Město')->setRequired(); $this->addText('zip', 'PSČ')->setRequired(); $this->addText('phone', 'Telefon')->setRequired(); $this->addText('email', 'Email')->addRule(Form::EMAIL, 'Email není ve správném formátu')->setRequired('Zadejte, prosím, Váš email'); $edicationList = array('zakladni' => 'základní', 'stredoskolske' => 'středoškolské', 'vyssi' => 'vyšší', 'vysokoskolske' => 'vysokoškolské'); $this->addSelect('education', 'Vzdělání', $edicationList)->setPrompt('-- vyberte --')->setRequired(); $this->addUpload('cv', 'CV:')->addRule(Form::MAX_FILE_SIZE, 'Maximální velikost souboru je 1 MB.', 1 * 1024 * 1024); $this->addGroup('Jazykové znalosti'); $langSkils = array('0' => 'výborná - 0', 'B' => 'dobrá - B', 'C' => 'ucházející - C', 'S' => 'základní - S'); $this->addSelect('first_language', 'První jazyk', $langSkils)->setPrompt('-- vyberte --'); $this->addSelect('second_language', 'Druhý jazyk', $langSkils)->setPrompt('-- vyberte --'); $this->addGroup(' '); $this->addText('previous_job', 'Předcházející zaměstnání')->setRequired(); $this->addText('entry', 'Možnost nástupu')->setRequired(); $this->addText('position', 'Poptávaná pozice')->setRequired(); $this->addCheckbox('agree', 'Souhlasím se zpracováním osobních údajů pro účely výběrového řízení.')->addRule(Form::FILLED, 'Musíte souhlasit se zpracováním osobních údajů'); $this->setCurrentGroup(NULL); $this->addSubmit('send', 'Odeslat'); $this->onSuccess[] = array($this, 'formSubmited'); }