當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FormBuilder::hidden方法代碼示例

本文整理匯總了PHP中Collective\Html\FormBuilder::hidden方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormBuilder::hidden方法的具體用法?PHP FormBuilder::hidden怎麽用?PHP FormBuilder::hidden使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Collective\Html\FormBuilder的用法示例。


在下文中一共展示了FormBuilder::hidden方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: checkbox

 public function checkbox($name, $value = 1, $checked = null, $options = [])
 {
     $options['id'] = $name;
     return sprintf('
     <div class="input-field col l6 s8 offset-l3 offset-s2">
         %s
         %s
         %s
     </div>', parent::hidden($name, 0), parent::checkbox($name, $value, $checked, $options), parent::label($name, null, []));
 }
開發者ID:codificar,項目名稱:scaffolder-theme-material,代碼行數:10,代碼來源:MaterialThemeForm.php

示例2: hidden

 /**
  * Create a hidden input field.
  *
  * @param string $name
  * @param string $value
  * @param array $options
  * @return string 
  * @static 
  */
 public static function hidden($name, $value = null, $options = array())
 {
     return \Collective\Html\FormBuilder::hidden($name, $value, $options);
 }
開發者ID:alvarobfdev,項目名稱:BaseCRUDproject,代碼行數:13,代碼來源:_ide_helper.php

示例3: checkbox

 public function checkbox($name, $value = 1, $checked = null, $options = [])
 {
     return parent::hidden($name, 0) . call_user_func_array('parent::' . __FUNCTION__, func_get_args());
 }
開發者ID:IQ-RIA,項目名稱:scaffolder-theme-material,代碼行數:4,代碼來源:MaterialThemeForm.php

示例4: hidden

 /**
  * Create a hidden field.
  *
  * @param  string $name
  * @param  string $value
  * @param  array  $options
  *
  * @return string
  */
 public function hidden($name, $value = null, $options = [])
 {
     return $this->form->hidden($name, $value, $options);
 }
開發者ID:bnbwebexpertise,項目名稱:laravel-bootstrap-form,代碼行數:13,代碼來源:BootstrapForm.php

示例5: function

    return field_wrapper($name, $label, $element);
});
Form::macro('passwordFieldClean', function ($name, $label = NULL, $value = NULL, $attributes = []) {
    $attributes = array_merge($attributes, ['placeholder' => $label]);
    $element = Form::password($name, field_attributes($name, $attributes));
    return form_group($element, $name);
});
Form::macro('textareaField', function ($name, $label = NULL, $value = NULL, $attributes = []) {
    $attributes = array_merge($attributes, ['rows' => 4]);
    $element = Form::textarea($name, $value ? $value : old($name), field_attributes($name, $attributes));
    return field_wrapper($name, $label, $element);
});
Form::macro('tinymce', function ($name, $label = NULL, $value = NULL, $attributes = []) {
    $attributes = array_merge($attributes, ['rows' => 4, 'data-tinymce' => 'true']);
    $element = Form::textarea($name, $value ? $value : old($name), field_attributes($name, $attributes));
    $element .= Form::hidden($name . '_text', $value ? $value : old($name), ['id' => $name . '_text']);
    return field_wrapper($name, $label, $element);
});
Form::macro('fileField', function ($name, $label = NULL, $attributes = []) {
    $element = '<p>' . Form::file($name, field_attributes($name, $attributes, true)) . '</p>';
    return field_wrapper($name, $label, $element);
});
Form::macro('textareaFieldClean', function ($name, $label = NULL, $value = NULL, $attributes = []) {
    $attributes = array_merge($attributes, ['placeholder' => $label, 'rows' => 4]);
    $element = Form::textarea($name, $value ? $value : old($name), field_attributes($name, $attributes));
    return form_group($element, $name);
});
Form::macro('selectFieldClean', function ($name, $label = NULL, $options, $value = NULL, $attributes = []) {
    $attributes = array_merge($attributes, ['placeholder' => $label]);
    $element = Form::select($name, $options, $value ? $value : old($name), field_attributes($name, $attributes));
    return form_group($element, $name);
開發者ID:brunoti,項目名稱:html-macros,代碼行數:31,代碼來源:macros.php


注:本文中的Collective\Html\FormBuilder::hidden方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。