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


PHP FormHelper::submit方法代码示例

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


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

示例1: submit

 public function submit($caption = null, $options = array())
 {
     $defaults = array('class' => 'btn', 'escape' => false);
     $options = array_merge($defaults, $options);
     list($caption, $options) = $this->_bootstrapGenerate($caption, $options);
     return parent::submit($caption, $options);
 }
开发者ID:laiello,项目名称:plankonindia,代码行数:7,代码来源:CroogoFormHelper.php

示例2: end

 public function end($string = 'Salvar', $options = array())
 {
     $optionsDefault = array('class' => 'btn btn-primary', 'div' => 'form-group');
     $options = array_merge_recursive($optionsDefault, $options);
     $retorno = parent::submit($string, $options);
     $retorno .= parent::end();
     return $retorno;
 }
开发者ID:brnagn7,项目名称:spydercake,代码行数:8,代码来源:CakePHPFTPFormHelper.php

示例3: tweet

 /**
  * create tweet box
  *
  * @param $fieldName
  * @param $options
  *      type: element type (default: textarea)
  *      maxLength:   text max length (default: 140)
  *      counterText: length message
  *      submit: submit button message. if set to false, not create.
  *      jqueryCharCount: path to charCount.js (jquery plugin)
  *      other keys set to input element options.
  */
 public function tweet($fieldName, $options = array())
 {
     $this->setEntity($fieldName);
     $domId = !empty($options['id']) ? $options['id'] : $this->domId($fieldName);
     $default = array('type' => 'textarea', 'maxlength' => 140, 'jqueryCharCount' => '/twitter_kit/js/charCount.js', 'counterText' => __d('twitter_kit', 'Characters left: ', true), 'submit' => __d('twitter_kit', 'Tweet', true));
     $options = am($default, $options);
     $inputOptions = $options;
     unset($inputOptions['jqueryCharCount']);
     unset($inputOptions['counterText']);
     unset($inputOptions['submit']);
     $out = $this->Html->script($options['jqueryCharCount']);
     $out .= $this->Form->input($fieldName, $inputOptions);
     $out .= $this->Js->buffer("\n            \$('#{$domId}').charCount({\n                limit: {$options['maxlength']},\n                counterText: '{$options['counterText']}',\n                exceeded: function(element) {\n                    \$('#{$domId}Submit').attr('disabled', true);\n                },\n                allowed: function(element) {\n                    \$('#{$domId}Submit').removeAttr('disabled');\n                }\n            });\n        ");
     if ($options['submit']) {
         $out .= $this->Form->submit($options['submit'], array('id' => $domId . 'Submit'));
     }
     return $this->output($out);
 }
开发者ID:hiromi2424,项目名称:twitter_kit,代码行数:30,代码来源:twitter.php

示例4: submit

 public function submit($caption = null, $options = array())
 {
     $defaultOptions = array('class' => 'btn btn-primary', 'div' => 'form-group', 'data-style' => 'expand-right', 'before' => '<div class="col-lg-offset-2 col-lg-10">', 'after' => '</div>');
     if (isset($options['bootstrap']) && $options['bootstrap'] == false) {
         $defaultOptions = array('class' => 'btn btn-primary');
         unset($options['bootstrap']);
     }
     if (!isset($options['bootstrap'])) {
         if (isset($options['confirm'])) {
             $options['onclick'] = 'confirmSubmitForm($(this), \'' . $options['confirm'] . '\'); return false;';
         }
         unset($options['confirm']);
     }
     $options = array_merge($defaultOptions, $options);
     $options['class'] .= ' ladda-button';
     return parent::submit($caption, $options);
 }
开发者ID:a0108393,项目名称:cms-system,代码行数:17,代码来源:BootstrapFormHelper.php

示例5: testSubmit

 public function testSubmit()
 {
     $html = $this->object->submit('element', 'value', array('class' => 'test-class-1', 'arbitrary' => 'arbitrary'), 'test-class-2');
     $this->assertAttributes($html, array('class' => array('test-class-1', 'test-class-2', 'ccm-input-submit'), 'value' => 'value'));
 }
开发者ID:notzen,项目名称:concrete5-tests,代码行数:5,代码来源:FormHelperTest.php

示例6: submit

 public function submit($value = 'Save', $options = array())
 {
     $defaults = array('class' => 'btn btn-primary');
     $options = Set::merge($defaults, $options);
     return parent::submit($value, $options);
 }
开发者ID:jet77,项目名称:DiabeteSavior,代码行数:6,代码来源:BootstrapFormHelper.php

示例7: submit

 /**
  * Creates a submit button element. This method will generate `<input />` elements that
  * can be used to submit, and reset forms by using $options. image submits can be created by supplying an
  * image path for $caption.
  *
  * ### Options
  *
  * - `div` - Include a wrapping div?  Defaults to true. Accepts sub options similar to
  *   FormHelper::input().
  * - `before` - Content to include before the input.
  * - `after` - Content to include after the input.
  * - `type` - Set to 'reset' for reset inputs. Defaults to 'submit'
  * - Other attributes will be assigned to the input element.
  *
  * ### Options
  *
  * - `div` - Include a wrapping div?  Defaults to true. Accepts sub options similar to
  *   FormHelper::input().
  * - Other attributes will be assigned to the input element.
  *
  * @param string $caption The label appearing on the button OR if string contains :// or the
  *  extension .jpg, .jpe, .jpeg, .gif, .png use an image if the extension
  *  exists, AND the first character is /, image is relative to webroot,
  *  OR if the first character is not /, image is relative to webroot/img.
  * @param array $options Array of options. See above.
  * @return string A HTML submit button
  * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::submit
  */
 public function submit($caption = null, $options = array())
 {
     // CUSTOMIZE ADD 2016/06/08 ryuring
     // >>>
     /*** beforeInput ***/
     $event = $this->dispatchEvent('beforeSubmit', array('id' => $this->__id, 'caption' => $caption, 'options' => $options), array('class' => 'Form', 'plugin' => ''));
     if ($event !== false) {
         $options = $event->result === null || $event->result === true ? $event->data['options'] : $event->result;
     }
     $output = parent::submit($caption, $options);
     /*** afterInput ***/
     $event = $this->dispatchEvent('afterSubmit', array('id' => $this->__id, 'caption' => $caption, 'out' => $output), array('class' => 'Form', 'plugin' => ''));
     if ($event !== false) {
         $output = $event->result === null || $event->result === true ? $event->data['out'] : $event->result;
     }
     return $output;
     // <<<
 }
开发者ID:baserproject,项目名称:basercms,代码行数:46,代码来源:BcFormHelper.php

示例8: submit

 /**
  * @example of use
  * 		echo $appForm->end();
  * @example of output
  * 			</table>
  *		</form>
  *
  */
 function submit($caption = null, $options = array())
 {
     $defaults = array('appBefore' => null, 'appAfter' => null);
     $options = array_merge($defaults, $options);
     $before = $options['appBefore'];
     $after = $options['appAfter'];
     unset($options['appBefore'], $options['appAfter']);
     $out = "<tr><th>&nbsp;</th><td class='vtop'>\n";
     $out .= $before . parent::submit($caption, $options) . $after;
     $out .= "</td></tr>\n";
     return $out;
 }
开发者ID:masayukiando,项目名称:googlemap-search_ActionScript3.0,代码行数:20,代码来源:app_form.php

示例9: submit

 /**
  * Submit button
  *
  * @param string $label
  *
  * @return string
  */
 public function submit($label = null, $options = array())
 {
     $defaults = array('div' => 'actions', 'class' => 'btn btn-primary');
     $options = array_merge($defaults, $options);
     return parent::submit($label, $options);
 }
开发者ID:josephbergdoll,项目名称:berrics,代码行数:13,代码来源:BootstrapFormHelper.php

示例10: array

<h2>Editar cliente</h2>
<?php 
$id = Request::value('ident');
global $db;
$c = $db->query("select * from cliente where id=" . $id, true);
FormHelper::create('formCliente', '/' . APP_DIR . 'cliente/endereco');
FormHelper::input('nome', 'Nome <strong>*</strong>', $c['nome'], array('placeholder' => 'Digite o nome do cliente'));
FormHelper::input('documento', "Documento (CPF/CNPJ) <strong>*</strong>", $c['documento'], array('placeholder' => 'Digite o documento', 'onkeyup' => 'App.Util.FormatarDocumento(this)'));
FormHelper::input('site', "Site <strong>*</strong>", $c['site'], array('placeholder' => 'www.site.com'));
?>
<input type="hidden" id="ident" name="ident" value="<?php 
echo $c['id'];
?>
"/>
<div class="well-sm alert-danger hide">
    Há problemas no formulário
</div>
<?php 
FormHelper::submit('formClienteSubmit', "Adicionar endereços <span class='glyphicon glyphicon-chevron-right'></span> ", array('class' => 'btn-primary btn-lg', 'onclick' => 'App.Cliente.Submit()', 'type' => 'button'));
开发者ID:neurosoftbrasil,项目名称:adminns,代码行数:19,代码来源:editar.php

示例11: submit

 /**
  * See FormHelper::submit
  */
 function submit($name, $options = array())
 {
     return parent::submit($name, $options) . "\n";
 }
开发者ID:stripthis,项目名称:BlackRabbit,代码行数:7,代码来源:my_form.php

示例12: submit

 /**
  * Submit
  *
  * @param string $name
  * @param array $settings
  * @return string
  * @access public
  * @since 1.0
  */
 public function submit($name = null, $settings = array())
 {
     $caption = $name;
     $options = $settings;
     if (!$this->_hasComponent()) {
         return '';
     }
     return parent::submit($caption, $options);
 }
开发者ID:ederdsr,项目名称:civisindicadores,代码行数:18,代码来源:FilterFormHelper.php

示例13: search

 function search()
 {
     return parent::submit('Search', array('class' => 'submit tiny'));
 }
开发者ID:morrislaptop,项目名称:advindex,代码行数:4,代码来源:AdvindexHelper.php

示例14: submit

 public function submit($title = null, $options = [])
 {
     $title = $this->generateButtonTitle($title, $options);
     unset($options['ga_icon'], $options['ga_icon_after']);
     if (!isset($options['div'])) {
         $options['div'] = false;
     }
     $options = $this->addButtonClasses($options);
     return parent::submit($title, $options);
 }
开发者ID:gezeresolutionsweb,项目名称:cakeganache,代码行数:10,代码来源:GanacheFormHelper.php

示例15: submit

 /**
  * Creates a submit button element. This method will generate `<input />` elements that
  * can be used to submit, and reset forms by using $options. image submits can be created by supplying an
  * image path for $caption.
  *
  * ### Options
  *
  * - `div` - Include a wrapping div?  Defaults to true. Accepts sub options similar to
  *   FormHelper::input().
  * - `before` - Content to include before the input.
  * - `after` - Content to include after the input.
  * - `type` - Set to 'reset' for reset inputs. Defaults to 'submit'
  * - Other attributes will be assigned to the input element.
  *
  * ### Options
  *
  * - `div` - Include a wrapping div?  Defaults to true. Accepts sub options similar to
  *   FormHelper::input().
  * - Other attributes will be assigned to the input element.
  *
  * @param string $caption The label appearing on the button OR if string contains :// or the
  *  extension .jpg, .jpe, .jpeg, .gif, .png use an image if the extension
  *  exists, AND the first character is /, image is relative to webroot,
  *  OR if the first character is not /, image is relative to webroot/img.
  * @param array $options Array of options. See above.
  * @return string A HTML submit button
  */
 public function submit($caption = null, $options = array())
 {
     if ($this->cherry !== false) {
         if (!isset($options['class'])) {
             $options['class'] = 'btn btn-default';
         }
         if (!isset($options['div'])) {
             $options['div'] = 'form-group submit';
         }
         if ((!isset($options['div']) || $options['div']) && !isset($options['before']) && !isset($options['between']) && !isset($options['after']) && $this->cherry === 'form-horizontal') {
             $options['before'] = '<div class="col-md-offset-' . $this->labelCol . ' col-md-' . $this->inputCol . '">';
             $options['after'] = '</div>';
         }
     }
     return parent::submit($caption, $options);
 }
开发者ID:sumvee,项目名称:Cherry,代码行数:43,代码来源:CherryFormHelper.php


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