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


PHP form::select方法代码示例

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


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

示例1: action_create

 public function action_create()
 {
     if ($this->user) {
         //cannot create new accounts when a user is logged in
         $this->action_index();
     }
     $post = $_POST;
     // Create a new user
     $user = ORM::factory('user')->values($post);
     if ($user->check()) {
         $user->save();
         // user  created, show login form
         $this->action_login();
     } else {
         //show form
         echo form::open();
         echo 'username:' . form::input('username') . '<br>';
         echo 'password:' . form::password('password') . '<br>';
         echo 'password confirm:' . form::password('password_confirm') . '<br>';
         echo 'role:' . form::select('role', array('user' => 'user', 'admin' => 'admin')) . '<br>';
         echo form::submit('create', 'create');
         echo form::close();
         echo Kohana::debug($user->validate()->errors());
     }
 }
开发者ID:Wouterrr,项目名称:A2ACLdemo,代码行数:25,代码来源:a2demo.php

示例2: meta_acpt_slide_options

function meta_acpt_slide_options()
{
    $form = new form('slide', null);
    $form->image('image', array('label' => 'Image URL', 'help' => 'Upload an Image that is 940px by 350px for best results', 'button' => 'Add Your Slide'));
    $form->text('headline', array('label' => 'Headline'));
    $form->textarea('description', array('label' => 'Description'));
    $form->select('showText', array('Yes', 'No'), array('label' => 'Show Headline and Description'));
}
开发者ID:juan88ac,项目名称:foundation_s,代码行数:8,代码来源:index.php

示例3: meta_custom

function meta_custom()
{
    $form = new form('details', null);
    $form->text('name', array('label' => 'Text Field'));
    $form->image('image', array('label' => 'Image Field', 'button' => 'Add Your Image'));
    $form->file('file', array('label' => 'File Field', 'button' => 'Select a File'));
    $form->textarea('address', array('label' => 'Textarea', 'validate' => 'html'));
    $form->select('rooms', array('one', 'two', 'three'), array('label' => 'Select List'));
    $form->radio('baths', array('blue', 'green', 'red'), array('label' => 'Radio Buttons'));
    $form->editor('baths', 'WYSIWYG Editor');
}
开发者ID:juan88ac,项目名称:foundation_s,代码行数:11,代码来源:index.php

示例4: buildForm

 private function buildForm()
 {
     $options = array('method' => "POST", 'enctype' => "multipart/form-data", 'action' => '/blog/formular/add', 'width' => '400px');
     $form = new \form('testing', $options);
     $form->label('checkbox');
     $form->checkbox('checkbox test', 'testcheckbox', 'check', '');
     $form->checkbox('checkbox test2', 'testcheckbox', 'check2', true);
     $form->label('radio');
     $form->radio('radio test', 'testradio', 'radio', '');
     $form->radio('radio test 2', 'testradio', 'radio2', true);
     $form->label('textarea');
     $form->text('textarea', ' ', ['error' => $this->error['textarea']]);
     $form->select('autos', ['a' => 'audi', 'b' => 'vw', 'c' => 'toyota'], 'b', ['label' => 'auto select']);
     $form->text('username', '', ['placeholder' => 'username', 'label' => 'Username', 'error' => $this->error['username']]);
     $form->password('password', '', ['label' => 'Password', 'error' => $this->error['password']]);
     $form->button('senden', ['type' => 'submit']);
     return $form;
 }
开发者ID:karimo255,项目名称:blog,代码行数:18,代码来源:formular.php

示例5: getHtmlField

 public function getHtmlField($aPostedData)
 {
     $return = '';
     switch ($this->type) {
         # Champ texte
         default:
         case 1:
             $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::text($this->html_id, 60, 255, $aPostedData[$this->id]) . '</p>';
             break;
             # Zone de texte
         # Zone de texte
         case 2:
             $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::textarea($this->html_id, 58, 10, $aPostedData[$this->id]) . '</p>';
             break;
             # Menu déroulant
         # Menu déroulant
         case 3:
             $values = array_filter((array) unserialize($this->value));
             $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::select($this->html_id, array_flip($values), $aPostedData[$this->id]) . '</p>';
             break;
             # Boutons radio
         # Boutons radio
         case 4:
             $values = array_filter((array) unserialize($this->value));
             $str = '';
             foreach ($values as $k => $v) {
                 $str .= '<li><label>' . form::radio(array($this->html_id, $this->html_id . '_' . $k), $k, $k == $aPostedData[$this->id]) . html::escapeHTML($v) . '</label></li>';
             }
             $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<span class="fake-label">' . html::escapeHTML($this->title) . '</span></p>' . '<ul class="checklist">' . $str . '</ul>';
             break;
             # Cases à cocher
         # Cases à cocher
         case 5:
             $values = array_filter((array) unserialize($this->value));
             $str = '';
             foreach ($values as $k => $v) {
                 $str .= '<li><label>' . form::checkbox(array($this->html_id . '[' . $k . ']', $this->html_id . '_' . $k), $k, in_array($k, $aPostedData[$this->id])) . html::escapeHTML($v) . '</label></li>';
             }
             $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<span class="fake-label">' . html::escapeHTML($this->title) . '</span></p>' . '<ul class="checklist">' . $str . '</ul>';
             break;
     }
     return $return;
 }
开发者ID:jewelhuq,项目名称:okatea,代码行数:43,代码来源:class.users.fields.recordset.php

示例6: setFilterOrderBy

 protected function setFilterOrderBy()
 {
     if (isset($_GET['order_direction'])) {
         $this->params->show_filters = true;
         if (strtolower($_GET['order_direction']) == 'desc') {
             $this->params->order_direction = 'desc';
         } else {
             $this->params->order_direction = 'asc';
         }
         $_SESSION[$this->sess_prefix . 'order_direction'] = $this->params->order_direction;
     } elseif (isset($_SESSION[$this->sess_prefix . 'order_direction'])) {
         $this->params->show_filters = true;
         $this->params->order_direction = $_SESSION[$this->sess_prefix . 'order_direction'];
     }
     if (isset($_GET['order_by'])) {
         $this->params->order_by = $_GET['order_by'];
         $_SESSION[$this->sess_prefix . 'order_by'] = $this->params->order_by;
         $this->params->show_filters = true;
     } elseif (isset($_SESSION[$this->sess_prefix . 'order_by'])) {
         $this->params->order_by = $_SESSION[$this->sess_prefix . 'order_by'];
         $this->params->show_filters = true;
     }
     $this->fields['order_by'] = array($this->form_id . '_order_by', 'Triés par', form::select(array('order_by', $this->form_id . '_order_by'), $this->order_by_array, $this->params->order_by));
     $this->fields['order_direction'] = array($this->form_id . '_order_direction', 'Ordre', form::select(array('order_direction', $this->form_id . '_order_direction'), array('décroissant' => 'desc', 'croissant' => 'asc'), $this->params->order_direction));
     switch ($this->params->order_by) {
         default:
         case 'id':
             $this->get_estimates_params['order'] = 'e.id';
             break;
         case 'created_at':
             $this->get_estimates_params['order'] = 'e.created_at';
             break;
         case 'updated_at':
             $this->get_estimates_params['order'] = 'e.updated_at';
             break;
     }
     $this->get_estimates_params['order'] .= ' ' . strtoupper($this->params->order_direction);
 }
开发者ID:jewelhuq,项目名称:okatea,代码行数:38,代码来源:class.estimate.filters.php

示例7: __

        echo '<p>' . __('No detail') . '</p>';
    } else {
        echo '<ul>';
        foreach ($file->media_meta as $k => $v) {
            if ((string) $v) {
                echo '<li><strong>' . $k . ':</strong> ' . html::escapeHTML($v) . '</li>';
            }
        }
        echo '</ul>';
    }
}
if ($file->editable && $core_media_writable) {
    if ($file->media_type == 'image') {
        echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Update thumbnails') . '</legend>' . '<p>' . __('This will create or update thumbnails for this image.') . '</p>' . '<p><input type="submit" name="thumbs" value="' . __('update thumbnails') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
    }
    if ($file->type == 'application/zip') {
        $inflate_combo = array(__('Extract in a new directory') => 'new', __('Extract in current directory') => 'current');
        echo '<form class="clear" id="file-unzip" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Extract archive') . '</legend>' . '<ul>' . '<li><strong>' . __('Extract in a new directory') . '</strong> : ' . __('This will extract archive in a new directory that should not exists yet.') . '</li>' . '<li><strong>' . __('Extract in current directory') . '</strong> : ' . __('This will extract archive in current directory and will overwrite existing files or directory.') . '</li>' . '</ul>' . '<p><label class="classic">' . __('Extract mode:') . ' ' . form::select('inflate_mode', $inflate_combo, 'new') . '</label> ' . '<input type="submit" name="unzip" value="' . __('c_c_action_extract') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
    }
    echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Change media properties') . '</legend>' . '<p class="field"><label>' . __('File name:') . '</label>' . form::text('media_file', 30, 255, html::escapeHTML($file->basename)) . '</p>' . '<p class="field"><label>' . __('File title:') . '</label>' . form::text('media_title', 30, 255, html::escapeHTML($file->media_title)) . '</p>' . '<p class="field"><label>' . __('File date:') . '</label>' . form::text('media_dt', 16, 16, html::escapeHTML($file->media_dtstr)) . '</p>' . '<p class="field"><label class="classic">' . form::checkbox('media_private', 1, $file->media_priv) . ' ' . __('Private') . '</label></p>' . '<p class="field"><label>' . __('New directory:') . '</label>' . form::select('media_path', $dirs_combo, dirname($file->relname)) . '</p>' . '<p><input type="submit" value="' . __('c_c_action_save') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
    echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post" enctype="multipart/form-data">' . '<fieldset><legend>' . __('Change file') . '</legend>' . '<div>' . form::hidden(array('MAX_FILE_SIZE'), OKT_MAX_UPLOAD_SIZE) . '</div>' . '<p class="field"><label for="upfile">' . __('Choose a file:') . '</label>' . '<input type="file" id="upfile" name="upfile" size="35" /></p>' . '<p class="note">' . sprintf(__('c_c_maximum_file_size_%s'), util::l10nFileSize(OKT_MAX_UPLOAD_SIZE)) . '</p>' . '<p><input type="submit" value="' . __('c_c_action_send') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>';
}
echo '</div>';
echo '</div>';
echo '</div>';
# Pied-de-page
if ($popup) {
    require OKT_ADMIN_FOOTER_SIMPLE_FILE;
} else {
    require OKT_ADMIN_FOOTER_FILE;
}
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:item.php

示例8: L

</td>
	</tr>
     <?php 
    }
}
?>
</tbody>
     </table>
    <div class="btn"><label for="check_box"><?php 
echo L('selected_all');
?>
/<?php 
echo L('cancel');
?>
</label> <?php 
echo form::select($types, '', 'name="typeid" id="typeid"', L('please_choose_type'));
?>
<span id="msg_id"></span> <input type="submit" name="dosubmit" id="dosubmit" class="button" value="<?php 
echo L('import');
?>
" /> </div>
    <div id="pages"><?php 
echo $pages;
?>
</div>
</form>
</div>
</div>
</body>
</html>
<script type="text/javascript">
开发者ID:klj123wan,项目名称:czsz,代码行数:31,代码来源:import_content.tpl.php

示例9: array

<?php

/**
 * Edit
 */
if ($edit) {
    $options = $column->get_options();
    $selected = $row[$column->get_name()];
    $attributes = array('id' => $form_field_name);
    echo form::select($form_field_name, $options, $selected, $attributes);
    if ($column->get_comment()) {
        echo '<ul class="notes">' . '<li><strong>' . $column->get_comment() . '</strong></li>' . '</ul>';
    }
    /**
     * Don't edit
     */
} else {
    echo $row[$column->get_name()];
}
开发者ID:halka139,项目名称:kohana_webdb,代码行数:19,代码来源:enum.php

示例10: L

		<th width="80"><strong><?php 
echo L('boardtype');
?>
:</strong></th>
		<td><input name="space[name]" class="input-text" id="name" type="text" value="<?php 
echo htmlspecialchars($info['name']);
?>
" size="25"></td>
	</tr>
	<tr>
		<th><strong><?php 
echo L('ads_type');
?>
:</strong></th>
		<td><?php 
echo form::select($TYPES, $info['type'], 'name="space[type]" id="type" onchange="AdsType(this.value)"');
?>
&nbsp;&nbsp;<span id="ScrollSpan" style="padding-left:30px;display:none;"><label><input type="checkbox" id="ScrollBox" name="setting[scroll]"<?php 
if ($setting['scroll']) {
    ?>
 checked<?php 
}
?>
 value='1'/> <?php 
echo L('rolling');
?>
</label></span>
      <span id="AlignSpan" style="padding-left:30px;display:none;"><label><input type="checkbox" <?php 
if ($setting['align']) {
    ?>
 checked<?php 
开发者ID:cfhb,项目名称:MIS,代码行数:31,代码来源:space_edit.tpl.php

示例11: L

			<td><?php 
echo L('point');
?>
</td>
			<td>
			<input type="text" name="info[point]" value="" class="input-text" id="point" size="10"></input>
			</td>
		</tr>
		<tr>
			<td><?php 
echo L('member_model');
?>
</td>
			<td>
			<?php 
echo form::select($modellist, '44', 'name="info[modelid]"', '');
?>
			</td>
		</tr>
		<tr>
			<td><?php 
echo L('vip');
?>
</td>
			<td>
			<?php 
echo L('isvip');
?>
 <input type="checkbox" name="info[vip]" value=1 />
			<?php 
echo L('overduedate');
开发者ID:klj123wan,项目名称:czsz,代码行数:31,代码来源:member_add.tpl.php

示例12: L

echo L('drop_down_style');
?>
&nbsp;&nbsp;<input name="info[style]" value="1" type="radio">&nbsp;<?php 
echo L('pop_style');
?>
</td>
</tr>

<tr>
<td><?php 
echo L('sites');
?>
</td>
<td>
<?php 
echo form::select($sitelist, '', 'name="info[siteid]"', L('all_sites'));
?>
</td>
</tr>
</table>

    <div class="bk15"></div>
    <input name="dosubmit" type="submit" value="<?php 
echo L('submit');
?>
" class="dialog" id="dosubmit">
</form>
</div>
</div>
</body>
</html>
开发者ID:klj123wan,项目名称:czsz,代码行数:31,代码来源:linkage_add.tpl.php

示例13: get_typelist

 /**
  *
  * 传入的站点ID,读取站点下的邮件链接分类 ...
  * @param $siteid 选择的站点ID
  */
 public function get_typelist($siteid = '1', $value = '', $id = '')
 {
     $data = $arr = array();
     $data = $this->type_db->select(array('module' => 'ysqgk', 'siteid' => $siteid));
     pc_base::load_sys_class('form', '', 0);
     foreach ($data as $r) {
         $arr[$r['typeid']] = $r['name'];
     }
     $html = $id ? ' id="typeid" onchange="$(\'#' . $id . '\').val(this.value);"' : 'name="typeid", id="typeid"';
     return form::select($arr, $value, $html, L('please_select'));
 }
开发者ID:baowzh,项目名称:renfang,代码行数:16,代码来源:ysqgk_tag.class.php

示例14: defined

<?php

defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header');
?>
<div class="pad_10">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">
		<?php 
echo L('select_pdo_op');
?>
 <?php 
echo form::select($pdos, $pdoname, 'name="pdo_select" onchange="show_tbl(this)"', L('select_pdo'));
?>
		<input type="submit" value="<?php 
echo L('pdo_look');
?>
" class="button" name="dosubmit">
		</div>
		</td>
		</tr>
    </tbody>
</table>
<div class="table-list">
<form method="post" id="myform" name="myform" >
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
开发者ID:boylzj,项目名称:omguitar,代码行数:31,代码来源:database_import.tpl.php

示例15: is_int

				<li><?php 
    echo is_int($link) ? $title : HTML::anchor($link, $title);
    ?>
</li>
			<?php 
}
?>
			</ul>
		</div>

		<div class="translations span-6 last">
			<?php 
echo form::open(NULL, array('method' => 'get'));
?>
				<?php 
echo form::select('lang', $translations, I18n::$lang);
?>
			<?php 
echo form::close();
?>
		</div>
	</div>
</div>

<div id="docs" class="container clear">
	<div id="content" class="span-17 suffix-1 colborder">
		<?php 
echo $content;
?>

		<?php 
开发者ID:Tidwell,项目名称:HMXSongs-PHP-API,代码行数:31,代码来源:template.php


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