当前位置: 首页>>代码示例>>PHP>>正文


PHP Form::addCheckBox方法代码示例

本文整理汇总了PHP中Nette\Application\UI\Form::addCheckBox方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::addCheckBox方法的具体用法?PHP Form::addCheckBox怎么用?PHP Form::addCheckBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Nette\Application\UI\Form的用法示例。


在下文中一共展示了Form::addCheckBox方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createComponentLoginForm

 public function createComponentLoginForm()
 {
     $form = new Nette\Application\UI\Form();
     $form->addText("username", "Jméno")->addRule(Nette\Application\UI\Form::FILLED, "Jméno musí být vyplněno");
     $form->addPassword("password", "Heslo")->addRule(Nette\Application\UI\Form::FILLED, "Heslo musí být vyplněno");
     $form->addCheckBox("remember", "Zůstat přihlášen");
     $form->addSubmit("submit", "Přihlásit se");
     $form->onSuccess[] = $this->loginFormSucceeded;
     return $form;
 }
开发者ID:honya121,项目名称:sklad-web,代码行数:10,代码来源:LoginPresenter.php

示例2: createComponentSignInForm

 protected function createComponentSignInForm()
 {
     $form = new Form();
     $form->getElementPrototype()->class('ajax');
     $form->addText('email')->setAttribute('class', 'input')->setAttribute('placeholder', 'E-mail');
     $form->addPassword('passwd')->setAttribute('class', 'input')->setAttribute('placeholder', 'Heslo');
     $form->addSubmit('signInBut', 'Přihlásit')->setAttribute('class', 'submit_button');
     $form->addCheckBox('stay_logged', 'Neodhlašovat');
     $form->onSuccess[] = array($this, 'signInFormSucceeded');
     return $form;
 }
开发者ID:romanbartl,项目名称:BusinessPlann,代码行数:11,代码来源:SigninPresenter.php

示例3: createComponentEditGuestApplicationForm

 public function createComponentEditGuestApplicationForm()
 {
     $token = $this->getParameter('token');
     $guest = $this->guestModel->getGuestByToken($token);
     $application = $this->applicationModel->getApplicationByGuest($guest->id);
     $races_appl = $this->applicationModel->getApplicationRaces($application->id);
     $services_appl = $this->applicationModel->getApplicationServices($application->id);
     $event = $this->eventModel->getEvent($application->event);
     $races = $this->eventModel->getEventRaces($event->id);
     $services = $this->eventModel->getEventServices($event->id);
     $form = new Nette\Application\UI\Form();
     $form->addText('name', 'Jméno závodníka')->addRule(Nette\Application\UI\Form::FILLED, 'Jméno závodníka musí být vyplněno')->setDefaultValue($guest->name);
     $form->addText('competitor_index', 'Index závodníka')->addRule(Nette\Application\UI\Form::FILLED, 'Index závodníka musí být vyplněn')->setDefaultValue($guest->competitor_index);
     $form->addText('sportident', 'Číslo čipu')->setDefaultValue($application->si);
     foreach ($races_appl as $key => $val) {
         $categories = $this->categoryModel->getRaceCategoriesArray($val->race);
         $raceInputName = 'race_' . $val->race;
         $categoryInputName = 'category_' . $val->race;
         $form->addCheckBox($raceInputName)->setDefaultValue($val->checked);
         $form->addSelect($categoryInputName, '', $categories)->setDefaultValue($val->category);
     }
     foreach ($services_appl as $key => $val) {
         $serviceInputName = 'service_' . $val->service;
         $form->addCheckBox($serviceInputName)->setDefaultValue($val->checked);
     }
     $form->addSubmit('submit', 'Upravit přihlášku');
     $form->addProtection();
     $form->onSuccess[] = $this->editGuestApplicationFormSucceeded;
     return $form;
 }
开发者ID:honya121,项目名称:prihlasky,代码行数:30,代码来源:ApplicationPresenter.php


注:本文中的Nette\Application\UI\Form::addCheckBox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。