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


PHP Submit::setValue方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('timezone');
     $this->setAttribute('method', 'post');
     $name_timezone = new Element\Text('name_timezone');
     $name_timezone->setLabel('Timezone')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($name_timezone);
     $num_timezone = new Element\Text('num_timezone');
     $num_timezone->setLabel('Timezone Number')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($num_timezone);
     $bool_daylight_saving = new Element\Radio('bool_daylight_saving');
     $bool_daylight_saving->setLabel('Daylight Saving')->setLabelAttributes(array('class' => 'checkbox-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'));
     $this->add($bool_daylight_saving);
     $dt_summer_time_begin = new Element\Text('dt_summer_time_begin');
     $dt_summer_time_begin->setLabel('Summer Time Begin')->setAttributes(array('type' => 'datetime', 'id' => 'dt_summer_time_begin', 'class' => 'form-control input-sm'))->setOptions(array('datepickerOptions' => array('autoSize: true')));
     $this->add($dt_summer_time_begin);
     $dt_winter_time_begin = new Element\Text('dt_winter_time_begin');
     $dt_winter_time_begin->setLabel('Winter Time Begin')->setAttributes(array('type' => 'datetime', 'id' => 'dt_winter_time_begin', 'class' => 'form-control input-sm'))->setOptions(array('datepickerOptions' => array('autoSize: true')));
     $this->add($dt_winter_time_begin);
     $comment = new Element\Textarea('comment');
     $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($comment);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
开发者ID:shiqizhang,项目名称:php-sample,代码行数:30,代码来源:TimezoneForm.php

示例2: __construct

 public function __construct($name = null)
 {
     parent::__construct('users');
     $this->setAttribute('class', 'form-small');
     $this->setAttribute('method', 'post');
     $this->setAttribute('novalidate', true);
     $csrf = new Element\Csrf('csrf');
     $csrf_options = array('csrf_options' => array('timeout' => 1000));
     $csrf->setAttribute('id', 'csrf');
     $csrf->setOptions($csrf_options);
     $email = new Element\Email('email');
     $email->setLabel('Email')->setAttribute('id', 'email')->setAttribute('class', 'form-control')->setAttribute('maxlength', '200')->setAttribute('required', true)->setAttribute('placeholder', 'Email address');
     $password = new Element\Password('password');
     $password->setLabel('Password')->setAttribute('id', 'password')->setAttribute('class', 'form-control')->setAttribute('maxlength', '200')->setAttribute('required', true)->setAttribute('placeholder', 'Password');
     //        $rememberme = new Element\Checkbox('rememberme');
     //        $rememberme->setLabel(' Remember me')
     //                ->setAttribute('id', 'rememberme')
     //                ->setAttribute('class', '')
     //                ->setValue('1');
     $submit = new Element\Submit('submit');
     $submit->setValue('Log in')->setAttribute('id', 'submit')->setAttribute('class', 'btn btn-lg btn-primary btn-block');
     $this->add($csrf);
     $this->add($email);
     $this->add($password);
     //        $this->add($rememberme);
     $this->add($submit);
 }
开发者ID:tahmina8765,项目名称:zf2auth,代码行数:27,代码来源:LoginForm.php

示例3: __construct

 public function __construct()
 {
     parent::__construct('page');
     //Méthode d'envoie (GET,POST)
     $this->setAttribute('method', 'post');
     //Définition des champs
     //Menu Page
     //        $idField = new Element\Select('menu_id');
     //        $idField->setAttribute('class', 'browser-default');
     //        $idField->setLabel('Menu');
     //        $this->add($idField);
     $idField = new Element\Hidden('structure');
     $idField->setAttribute('id', 'structureform');
     $this->add($idField);
     $idField = new Element\Hidden('block_element');
     $idField->setAttribute('id', 'block-element');
     $this->add($idField);
     //Page Category
     $idField = new Element\Select('ctgr_id');
     $idField->setAttribute('class', 'browser-default');
     $idField->setLabel('Category');
     $this->add($idField);
     //Page Title
     $titleField = new Element\Text('title');
     $titleField->setLabel('Titre');
     $this->add($titleField);
     //Page Content
     $contentField = new Element\Textarea('content');
     $contentField->setLabel('Description');
     $this->add($contentField);
     $submitField = new Element\Submit('submit');
     $submitField->setValue('Envoyer');
     $submitField->setAttributes(array('id' => 'submitbutton', 'class' => 'btn waves-effect waves-light btn-submit-form-page'));
     $this->add($submitField);
 }
开发者ID:pinnackl,项目名称:zend-project,代码行数:35,代码来源:PageForm.php

示例4: __construct

 public function __construct($name = 'mailchimp-sub-form', $options = array())
 {
     parent::__construct($name, $options);
     $firstName = new Element\Text('firstName');
     $firstName->setLabel('First Name');
     $lastName = new Element\Text('lastName');
     $lastName->setLabel('Last Name');
     $email = new Element\Email('email');
     $email->setLabel('Email Address');
     $emailValidator = new Validator\EmailAddress(array('allow' => Validator\Hostname::ALLOW_DNS, 'domain' => true));
     $email->setValidator($emailValidator);
     $privacyPolicy = new Element\Checkbox('privacyPolicy');
     $privacyPolicy->setLabel('I accept the privacy policy and the terms of use');
     $csrf = new Element\Csrf('mcSubCSRF');
     $submit = new Element\Submit('submit');
     $submit->setValue('Subscribe');
     $this->add($firstName);
     $this->add($lastName);
     $this->add($email);
     $this->add($privacyPolicy);
     $this->add($csrf);
     $this->add($submit);
     $inputFilter = $this->getInputFilter();
     $inputFilter->get($firstName->getName())->setAllowEmpty(false)->setRequired(true);
     $inputFilter->get($lastName->getName())->setAllowEmpty(false)->setRequired(true);
 }
开发者ID:aaron4m,项目名称:zf2-mailchimp,代码行数:26,代码来源:SubscriptionForm.php

示例5: addSubmit

 public function addSubmit($label)
 {
     $submitButton = new Submit('form-submit');
     $submitButton->setValue($label);
     $submitButton->setAttributes(['type' => 'submit', 'class' => 'btn btn-default']);
     $this->add($submitButton);
 }
开发者ID:netsensia,项目名称:zf2-foundation,代码行数:7,代码来源:NetsensiaForm.php

示例6: __construct

 public function __construct($useOldPassword = true)
 {
     parent::__construct();
     $this->setAttribute('method', 'post');
     $this->setAttribute('class', 'panel-body');
     if ($useOldPassword) {
         $oldPassword = new Password('oldPassword');
         $oldPassword->setLabel('old.password');
         $oldPassword->setAttribute('class', 'form-control');
         $this->add($oldPassword);
     }
     $password = new Password('password');
     $password->setLabel('password');
     $password->setAttribute('class', 'form-control');
     $this->add($password);
     $password2 = new Password('password2');
     $password2->setLabel('repeat.password');
     $password2->setAttribute('class', 'form-control');
     $this->add($password2);
     $captcha = new Captcha('register_captcha');
     $imageAdapter = new Image(['font' => __DIR__ . '/../../fonts/arial.ttf']);
     $imageAdapter->setHeight(100);
     $imageAdapter->setWidth(400);
     $imageAdapter->setFontSize(48);
     $imageAdapter->setDotNoiseLevel(400);
     $imageAdapter->setLineNoiseLevel(40);
     $captcha->setCaptcha($imageAdapter);
     $captcha->setLabel('enter.text.from.the.picture');
     $captcha->setAttribute('class', 'form-control');
     $this->add($captcha);
     $submit = new Submit('save');
     $submit->setValue('save');
     $submit->setAttribute('class', 'btn btn-primary');
     $this->add($submit);
 }
开发者ID:zend-bricks,项目名称:bricks-user,代码行数:35,代码来源:ChangePasswordForm.php

示例7: __construct

 public function __construct($name = null)
 {
     parent::__construct('users');
     $this->setAttribute('class', '');
     $this->setAttribute('method', 'post');
     $id = new Element\Hidden('id');
     $id->setAttribute('class', 'primarykey');
     //        $username = new Element\Text('username');
     //        $username->setLabel('User Name')
     //                ->setAttribute('class', 'required inputfullwidth')
     //                ->setAttribute('maxlength', '100')
     //                ->setAttribute('placeholder', 'Username');
     $email = new Element\Email('email');
     $email->setLabel('Email')->setAttribute('class', 'required email inputfullwidth')->setAttribute('maxlength', '100')->setAttribute('placeholder', 'Email');
     $password = new Element\Password('password');
     $password->setLabel('Password')->setAttribute('class', 'required passValid inputfullwidth')->setAttribute('id', 'inputPassword')->setAttribute('maxlength', '100')->setAttribute('min', '6')->setAttribute('placeholder', 'Password');
     $repassword = new Element\Password('repassword');
     $repassword->setLabel('Confirm Password')->setAttribute('class', 'required inputfullwidth')->setAttribute('id', 'inputPassword')->setAttribute('maxlength', '100')->setAttribute('min', '6')->setAttribute('placeholder', 'Confirm Password');
     $first_name = new Element\Text('first_name');
     $first_name->setLabel('First Name')->setAttribute('class', 'required inputfullwidth')->setAttribute('maxlength', '100')->setAttribute('placeholder', 'First Name');
     $last_name = new Element\Text('last_name');
     $last_name->setLabel('Last Name')->setAttribute('class', 'required inputfullwidth')->setAttribute('maxlength', '100')->setAttribute('placeholder', 'Last Name');
     $submit = new Element\Submit('submit');
     $submit->setValue('Join Now')->setAttribute('class', 'btn btn-large btn-success btn-hossbrag join-now-home fullwidth');
     $this->add($id);
     $this->add($first_name);
     $this->add($last_name);
     // $this->add($username);
     $this->add($email);
     $this->add($password);
     $this->add($repassword);
     $this->add($submit);
 }
开发者ID:tahmina8765,项目名称:zf2auth,代码行数:33,代码来源:RegistrationForm.php

示例8: addElements

 public function addElements()
 {
     //-- E-mail current ------------------------------------
     $email_current = new Element\Email('email_current');
     $email_current->setAttribute('readonly', 'true');
     $email_current->setAttribute('class', 'form-control');
     $email_current->setAttribute('id', 'email-old');
     $email_current->setLabel('Current');
     $email_current->setLabelAttributes(array('class' => 'control-label', 'for' => 'email-current'));
     //-- E-mail new ---------------------------------------
     $email = new Element\Email('email');
     $email->setAttribute('placeholder', 'example@example.com');
     $email->setAttribute('required', 'true');
     $email->setAttribute('class', 'form-control');
     $email->setAttribute('id', 'email');
     $email->setLabel('New');
     $email->setLabelAttributes(array('class' => 'control-label', 'for' => 'email'));
     //-- Submit -------------------------------------
     $submit = new Element\Submit('submit');
     $submit->setAttribute('class', 'btn btn-success');
     $submit->setValue('Send');
     // Binding elements
     $this->add($email_current);
     $this->add($email);
     $this->add($submit);
 }
开发者ID:anton-phpcurs,项目名称:aperture,代码行数:26,代码来源:EmailForm.php

示例9: getSubmit

 protected function getSubmit()
 {
     $element = new Submit('logar');
     $element->setValue('Logar');
     $element->setAttributes(array('class' => 'btn btn-primary'));
     return $element;
 }
开发者ID:ericoautocad,项目名称:module-security-zf2,代码行数:7,代码来源:Login.php

示例10: __construct

 public function __construct(ServiceLocatorInterface $sm)
 {
     parent::__construct('formPost');
     // definindo variáveis
     $em = $sm->get('Doctrine\\ORM\\EntityManager');
     $arrCategorias = array("" => "Selecione");
     $repoCategoria = $em->getRepository('Admin\\Entity\\Categoria');
     $arrCategorias += $repoCategoria->fetchPairs();
     $categoria = new Select('categoria');
     $categoria->setLabel('Categoria')->setAttributes(array('id' => 'categoria', 'class' => 'form-control', 'options' => $arrCategorias));
     $this->add($categoria);
     $nome = new Text('nome');
     $nome->setLabel('Nome')->setAttributes(array('id' => 'nome', 'class' => 'form-control', 'placeholder' => 'Digite o seu nome'));
     $this->add($nome);
     $descricao = new Textarea('descricao');
     $descricao->setLabel('Descrição')->setAttributes(array('id' => 'descricao', 'class' => 'form-control', 'style' => 'height: 80px', 'placeholder' => 'Digite a descrição do post'));
     $this->add($descricao);
     $conteudo = new Textarea('conteudo');
     $conteudo->setLabel('Conteúdo')->setAttributes(array('id' => 'conteudo', 'class' => 'form-control', 'style' => 'min-height: 150px', 'placeholder' => 'Digite o conteúdo do post'));
     $this->add($conteudo);
     $tags = new Text('tags');
     $tags->setLabel('Tags')->setAttributes(array('id' => 'tags', 'class' => 'form-control', 'placeholder' => 'Digite as tags do conteúdo'));
     $this->add($tags);
     $submit = new Submit('submit');
     $submit->setValue('Salvar');
     $this->add($submit);
 }
开发者ID:RodrigoAngeloValentini,项目名称:curso-zf2,代码行数:27,代码来源:Post.php

示例11: __construct

 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('resp');
     $this->setAttribute('method', 'post');
     $name_resp = new Element\Text('name_resp');
     $name_resp->setLabel('Responsibility')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($name_resp);
     $nid_lov_resptype = new Element\Select('nid_lov_resptype');
     $nid_lov_resptype->setLabel('Type')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a type'));
     $this->add($nid_lov_resptype);
     $nid_timezone = new Element\Select('nid_timezone');
     $nid_timezone->setLabel('Time Zone')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a timezone'));
     $this->add($nid_timezone);
     $id_locale = new Element\Select('nid_locale');
     $id_locale->setLabel('Locale')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a locale'));
     $this->add($id_locale);
     $nid_language = new Element\Select('nid_language');
     $nid_language->setLabel('Language')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a language'));
     $this->add($nid_language);
     $comment = new Element\Textarea('comment');
     $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($comment);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
开发者ID:shiqizhang,项目名称:php-sample,代码行数:30,代码来源:RespForm.php

示例12: __construct

 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('orgtype');
     $this->setAttribute('method', 'post');
     $type_organization = new Element\Text('type_organization');
     $type_organization->setLabel('Organization Type')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($type_organization);
     $genre = new Element\Text('genre');
     $genre->setLabel('Genre')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($genre);
     $bool_unioned = new Element\Radio('bool_unioned');
     $bool_unioned->setLabel('Unioned ?')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'));
     $this->add($bool_unioned);
     $registered_location = new Element\Text('registered_location');
     $registered_location->setLabel('Registered Location')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($registered_location);
     $comment = new Element\Textarea('comment');
     $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($comment);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
开发者ID:shiqizhang,项目名称:php-sample,代码行数:27,代码来源:OrgtypeForm.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setAttribute('method', 'post');
     $this->setAttribute('class', 'panel-body');
     $mail = new Email('email');
     $mail->setLabel('email');
     $mail->setAttribute('class', 'form-control');
     $this->add($mail);
     $captcha = new Captcha('register_captcha');
     $imageAdapter = new Image(['font' => __DIR__ . '/../../fonts/arial.ttf']);
     $imageAdapter->setHeight(100);
     $imageAdapter->setWidth(400);
     $imageAdapter->setFontSize(48);
     $imageAdapter->setDotNoiseLevel(400);
     $imageAdapter->setLineNoiseLevel(40);
     $captcha->setCaptcha($imageAdapter);
     $captcha->setLabel('enter.text.from.the.picture');
     $captcha->setAttribute('class', 'form-control');
     $this->add($captcha);
     $submit = new Submit('send');
     $submit->setValue('send');
     $submit->setAttribute('class', 'btn btn-primary');
     $this->add($submit);
 }
开发者ID:zend-bricks,项目名称:bricks-user,代码行数:25,代码来源:SpecifyMailForm.php

示例14: __construct

 public function __construct($name = null)
 {
     parent::__construct('users');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->setAttribute('id', 'changePasswordForm');
     $this->setAttribute('novalidate', true);
     $this->setAttribute('autocomplete', false);
     $id = new Element\Hidden('id');
     $id->setAttribute('class', 'primarykey');
     $id->setAttribute('id', 'id');
     $cpassword = new Element\Password('cpassword');
     $cpassword->setLabel('Current Password')->setAttribute('class', 'required form-control')->setAttribute('id', 'cpassword')->setAttribute('placeholder', 'Current Password');
     $password = new Element\Password('password');
     $password->setLabel('New Password')->setAttribute('class', 'required form-control password_strength_check')->setAttribute('id', 'password')->setAttribute('placeholder', 'New Password');
     $repassword = new Element\Password('repassword');
     $repassword->setLabel('Re-type Password')->setAttribute('class', 'required form-control')->setAttribute('id', 'repassword')->setAttribute('placeholder', 'Re-type Password');
     $submit = new Element\Submit('submit');
     $submit->setValue('Change Password')->setAttribute('id', 'submit')->setAttribute('class', 'btn btn-lg btn-success btn-block');
     $this->add($id);
     $this->add($cpassword);
     $this->add($password);
     $this->add($repassword);
     //        $this->add($submit);
 }
开发者ID:tahmina8765,项目名称:zf2auth,代码行数:25,代码来源:ChangePasswordForm.php

示例15: __construct

 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('lov');
     $this->setAttribute('method', 'post');
     $this->add(new Element\Hidden('type_lov'));
     $new_type_lov = new Element\Text('new_type_lov');
     $new_type_lov->setLabel('List Type')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($new_type_lov);
     $nid_language = new Element\Select('nid_language');
     $nid_language->setLabel('Language')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a language'));
     $this->add($nid_language);
     $bool_translateable = new Element\Radio('bool_translateable');
     $bool_translateable->setLabel('Translateable')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'));
     $this->add($bool_translateable);
     $bool_controlbypoxn = new Element\Radio('bool_controlbypoxn');
     $bool_controlbypoxn->setLabel('Control by Poxn')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'));
     $this->add($bool_controlbypoxn);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
开发者ID:shiqizhang,项目名称:php-sample,代码行数:25,代码来源:LovChangeTypeForm.php


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