本文整理汇总了PHP中form_multiselect函数的典型用法代码示例。如果您正苦于以下问题:PHP form_multiselect函数的具体用法?PHP form_multiselect怎么用?PHP form_multiselect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了form_multiselect函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _display_field
/**
* Display Field
*/
function _display_field($data, $field_name)
{
global $DSP;
$this->prep_field_data($data);
$r = form_hidden($field_name, 'n') . form_multiselect($field_name . '[]', $this->settings['options'], $data);
return $r;
}
开发者ID:pixelandtonic,项目名称:pt_field_pack,代码行数:10,代码来源:ft.pt_multiselect.php
示例2: display_field
function display_field($data)
{
$this->EE->load->helper('custom_field');
$values = decode_multi_field($data);
$field_options = $this->_get_field_options($data);
return form_multiselect($this->field_name . '[]', $field_options, $values, 'dir="' . $this->settings['field_text_direction'] . '" id="' . $this->field_id . '"');
}
开发者ID:rmdort,项目名称:adiee,代码行数:7,代码来源:ft.multi_select.php
示例3: _get_tpl_filter
/**
* Получение данных фильтра для вставки в шаблон
*/
private function _get_tpl_filter($filter = false)
{
$this->load->model('servers');
if (!$filter) {
$filter = $this->users->get_filter('servers_list');
}
$this->servers->select_fields('game, server_ip');
$games_array = array();
$ip_array = array();
if ($servers_list = $this->servers->get_list()) {
foreach ($servers_list as $server) {
if (!in_array($server['game'], $games_array)) {
$games_array[] = $server['game'];
}
if (!in_array($server['server_ip'], $ip_array)) {
$ip_array[$server['server_ip']] = $server['server_ip'];
}
}
}
if (empty($this->games->games_list)) {
$this->games->get_active_games_list();
}
foreach ($this->games->games_list as &$game) {
$games_option[$game['code']] = $game['name'];
}
$tpl_data['filter_name'] = isset($filter['name']) ? $filter['name'] : '';
$tpl_data['filter_ip'] = isset($filter['ip']) ? $filter['ip'] : '';
$tpl_data['filter_ip_dropdown'] = form_multiselect('filter_ip[]', $ip_array, $tpl_data['filter_ip']);
$default = isset($filter['game']) ? $filter['game'] : null;
$tpl_data['filter_games_dropdown'] = form_multiselect('filter_game[]', $games_option, $default);
return $tpl_data;
}
开发者ID:mefisto2009,项目名称:GameAP,代码行数:35,代码来源:index.php
示例4: display_field
function display_field($data)
{
ee()->load->helper('custom_field');
$values = decode_multi_field($data);
$field_options = $this->_get_field_options($data);
$text_direction = isset($this->settings['field_text_direction']) ? $this->settings['field_text_direction'] : 'ltr';
return form_multiselect($this->field_name . '[]', $field_options, $values, 'dir="' . $text_direction . '" class="multiselect_input" id="field_id_' . $this->field_id . '"');
}
开发者ID:ktbartholomew,项目名称:keithbartholomew.com,代码行数:8,代码来源:ft.multi_select.php
示例5: FilterArr
public function FilterArr()
{
$query = $this->Selectbd->query('FilterArr', $this->input->post('id'));
foreach ($query->result_array() as $row) {
$Temparr[] = $row[$this->Selectbd->ColTabel[$this->input->post('id')]];
}
echo form_multiselect('select', $Temparr);
}
开发者ID:AutoTeh,项目名称:termnew,代码行数:8,代码来源:Terminal.php
示例6: _display_field
/**
* Display Field
*/
function _display_field($data, $field_name)
{
if (empty($this->settings['options'])) {
return $this->no_options_set();
}
$this->prep_field_data($data);
$r = form_hidden($field_name, 'n') . form_multiselect($field_name . '[]', $this->settings['options'], $data);
return $r;
}
开发者ID:kentonquatman,项目名称:iofa,代码行数:12,代码来源:ft.fieldpack_multiselect.php
示例7: display_field
function display_field($data)
{
ee()->load->helper('custom_field');
$values = decode_multi_field($data);
$field_options = $this->_get_field_options($data);
$text_direction = isset($this->settings['field_text_direction']) ? $this->settings['field_text_direction'] : 'ltr';
if (REQ == 'CP') {
return ee('View')->make('multi_select:publish')->render(array('field_name' => $this->field_name, 'values' => $values, 'options' => $field_options));
}
return form_multiselect($this->field_name . '[]', $field_options, $values, 'dir="' . $text_direction . '" class="multiselect_input"');
}
开发者ID:vigm,项目名称:advancedMD,代码行数:11,代码来源:ft.multi_select.php
示例8: simbanic_multiselect
function simbanic_multiselect($multiselect_name, $options = array(), $default_selectmulti = array(), $data = array())
{
if (!empty($data)) {
$static_data = '';
foreach ($data as $key => $value) {
$static_data .= $key . '=' . '"' . $value . '" ';
}
} else {
$static_data = '';
}
return form_multiselect($multiselect_name, $options, $default_selectmulti, $static_data) . simbanic_validation($multiselect_name);
}
开发者ID:hardikpanseriya,项目名称:testing,代码行数:12,代码来源:input_helper.php
示例9: print_input_multiselect
function print_input_multiselect($input)
{
$extra = 'class="multiselect" ';
if (isset($input['id']) && $input['id'] != '') {
$extra .= 'id="' . $input['id'] . '" ';
}
if (isset($input['tabindex']) && $input['tabindex'] != '') {
$extra .= 'tabindex="' . $input['tabindex'] . '" ';
}
$html = form_multiselect($input['name'] . '[]', $input['options'], $input['value'], $extra);
return $html;
}
开发者ID:VeronaFabLabRepo,项目名称:comune-grezzana-app-backend,代码行数:12,代码来源:print_input_multiselect_helper.php
示例10: input_multiselect
function input_multiselect($name, $options, $value, $opt = array())
{
$opt['type'] = 'multiselect';
$input = input_merge_opt($name, $value, $opt);
$attr = attr(array_diff_key(clean_opt($input), array_fill_keys(array('name', 'value'), 0)));
foreach ($options as $val => $label) {
$label = lang($val);
if ($label) {
$options[$val] = $label;
}
}
$input['form_input'] = form_multiselect($input['name'], $options, explode('|', $input['value']), $attr);
return input_markup($input);
}
开发者ID:jayalfredprufrock,项目名称:winx,代码行数:14,代码来源:MY_form_helper.php
示例11: form_multiselect_and_label
function form_multiselect_and_label($name, $options, $selected = array(), $extra = '', $div = 'pure-control-group')
{
$label_name = lang($name);
if (empty($selected) && isset($_POST[$name])) {
$selected = $_POST[$name];
}
$oldname = $name;
$name .= '[]';
// CodeIgniter POST array syntax
$extra .= ' class="chosen-select" data-placeholder="' . $label_name . '"';
$div_start = empty($div) ? '' : '<div class="' . $div . '">';
$label = form_label($label_name, $name);
$dropdown = form_multiselect($name, $options, $selected, 'id="' . $name . '"' . $extra);
$error_box = form_error($oldname);
$div_end = empty($div) ? '' : '</div>';
return $div_start . $label . $dropdown . $error_box . $div_end;
}
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:17,代码来源:MY_form_helper.php
示例12: tes
function tes()
{
$options = array('small' => 'Small Shirt', 'med' => 'Medium Shirt', 'large' => 'Large Shirt', 'xlarge' => 'Extra Large Shirt');
echo '<!DOCTYPE html>
<html>
<body>
<form action="' . base_url() . 'index.php/dinas/tes_proses" method="post">
' . form_multiselect('shirts[]', $options, 'large') . '
<input type="submit" />
</form>
<p>Hold down the Ctrl (windows) / Command (Mac) button to select multiple options.</p>
</body>
</html> ';
}
开发者ID:ryderonil,项目名称:surat-masuk,代码行数:17,代码来源:dinas.php
示例13: display_settings
/**
* Display settings sub-form for this variable type
*
* @param mixed $var_id The id of the variable: 'new' or numeric
* @param array $var_settings The settings of the variable
* @return array
*/
function display_settings($var_id, $var_settings)
{
// -------------------------------------
// Init return value
// -------------------------------------
$r = array();
// -------------------------------------
// Check current value from settings
// -------------------------------------
$folders = $this->get_setting('folders', $var_settings);
// -------------------------------------
// Get all folders
// -------------------------------------
$all_folders = low_flatten_results($this->_get_upload_preferences(), 'name', 'id');
// -------------------------------------
// Build options setting
// -------------------------------------
$r[] = array($this->setting_label(lang('file_folders')), form_multiselect($this->input_name('folders', TRUE), $all_folders, $folders));
// -------------------------------------
// Build setting: Allow uploads?
// -------------------------------------
$upload_folders = array('0' => lang('no_uploads')) + $all_folders;
$upload = $this->get_setting('upload', $var_settings);
$overwrite = $this->get_setting('overwrite', $var_settings) == 'y';
$r[] = array($this->setting_label(lang('upload_folder'), lang('upload_folder_help')), form_dropdown($this->input_name('upload'), $upload_folders, $upload, 'id="low-select-upload-folder"') . '<label class="low-checkbox low-inline" id="low-overwrite-files">' . form_checkbox($this->input_name('overwrite'), 'y', $overwrite) . lang('overwrite_existing_files_label') . '</label>');
// -------------------------------------
// Build setting: multiple?
// -------------------------------------
$multiple = $this->get_setting('multiple', $var_settings) == 'y';
$r[] = array($this->setting_label(lang('allow_multiple_files')), '<label class="low-checkbox">' . form_checkbox($this->input_name('multiple'), 'y', $multiple, 'class="low-allow-multiple"') . lang('allow_multiple_files_label') . '</label>');
// -------------------------------------
// Build setting: separator
// -------------------------------------
$separator = $this->get_setting('separator', $var_settings);
$r[] = array($this->setting_label(lang('separator_character')), $this->separator_select($separator));
// -------------------------------------
// Build setting: multi interface
// -------------------------------------
$multi_interface = $this->get_setting('multi_interface', $var_settings);
$r[] = array($this->setting_label(lang('multi_interface')), $this->interface_select($multi_interface, array('drag-list-thumbs' => lang('drag-list-thumbs'))));
// -------------------------------------
// Return output
// -------------------------------------
return $r;
}
开发者ID:kentonquatman,项目名称:iofa,代码行数:52,代码来源:vt.low_select_files.php
示例14: display_settings
/**
* Display the settings form for each custom field
*
* @access public
* @param $data mixed The field settings
* @return string Override the field custom settings with custom html
*
* In this case we add an extra row to the table. Not sure how the table is built
*/
public function display_settings($data)
{
$this->EE->lang->loadfile('nsm_entry_select');
$this->EE->load->model('channel_model');
$data = array_merge(array("field_channels" => array(), "field_ui_mode" => FALSE, "field_size" => 1), $data);
$entry_channels_query = $this->EE->channel_model->get_channels()->result();
$entry_channels = array();
foreach ($entry_channels_query as $channel) {
$entry_channels[$channel->channel_id] = $channel->channel_title;
}
$this->EE->table->add_row(form_hidden($this->field_id . '_field_fmt', 'none') . form_hidden('field_show_fmt', 'n') . lang("Restrict entry selection to:", 'field_channels'), form_multiselect($this->field_id . '_field_settings[field_channels][]', $entry_channels, $data["field_channels"], "id='field_channels'"));
$select_opts = array();
foreach (self::$ui_modes as $key) {
$select_opts[$key] = lang($key);
}
$this->EE->table->add_row(lang("UI Mode:", 'field_ui_mode'), form_dropdown($this->field_id . '_field_settings[field_ui_mode]', $select_opts, $data["field_ui_mode"], "id='field_ui_mode'"));
$this->EE->table->add_row(lang("Size", 'field_size') . "<br />Determines the multi-select height and number of results returned in the autocomplete", form_input($this->field_id . '_field_settings[field_size]', $data["field_size"], "id='field_size'"));
}
开发者ID:newism,项目名称:nsm.entry_select.ee_addon,代码行数:27,代码来源:ft.nsm_entry_select.php
示例15: display_settings
/**
* Display settings sub-form for this variable type
*
* @param mixed $var_id The id of the variable: 'new' or numeric
* @param array $var_settings The settings of the variable
* @return array
*/
function display_settings($var_id, $var_settings)
{
// -------------------------------------
// Init return value
// -------------------------------------
$r = array();
// -------------------------------------
// Build setting: Channel ids
// First, get all channels for this site
// -------------------------------------
$query = $this->EE->db->query("SELECT channel_id, channel_title FROM exp_channels\n\t\t\t\t\t\t\tWHERE site_id = '" . $this->EE->db->escape_str($this->EE->config->item('site_id')) . "'\n\t\t\t\t\t\t\tORDER BY channel_title ASC");
$all_channels = $this->flatten_results($query->result_array(), 'channel_id', 'channel_title');
// -------------------------------------
// Then, get current channel ids from settings
// -------------------------------------
$current = $this->get_setting('channel_ids', $var_settings);
$r[] = array($this->setting_label(lang('channel_ids')), form_multiselect($this->input_name('channel_ids', TRUE), $all_channels, $current));
// -------------------------------------
// Build setting: multiple?
// -------------------------------------
$multiple = $this->get_setting('multiple', $var_settings);
$r[] = array($this->setting_label(lang('allow_multiple_channels')), '<label class="low-checkbox">' . form_checkbox($this->input_name('multiple'), 'y', $multiple, 'class="low-allow-multiple"') . lang('allow_multiple_channels_label') . '</label>');
// -------------------------------------
// Build setting: separator
// -------------------------------------
$separator = $this->get_setting('separator', $var_settings);
$r[] = array($this->setting_label(lang('separator_character')), $this->separator_select($separator));
// -------------------------------------
// Build setting: multi interface
// -------------------------------------
$multi_interface = $this->get_setting('multi_interface', $var_settings);
$r[] = array($this->setting_label(lang('multi_interface')), $this->interface_select($multi_interface));
// -------------------------------------
// Return output
// -------------------------------------
return $r;
}
开发者ID:thomasvandoren,项目名称:teentix-site,代码行数:44,代码来源:vt.low_select_channels.php
示例16: display_settings
/**
* Display settings sub-form for this variable type
*
* @param mixed $var_id The id of the variable: 'new' or numeric
* @param array $var_settings The settings of the variable
* @return array
*/
function display_settings($var_id, $var_settings)
{
// -------------------------------------
// Init return value
// -------------------------------------
$r = array();
// -------------------------------------
// Build setting: category groups
// First, get all groups for this site
// -------------------------------------
$query = ee()->db->select('group_id, group_name')->from('category_groups')->where('site_id', ee()->config->item('site_id'))->order_by('group_name')->get();
$all_groups = $this->flatten_results($query->result_array(), 'group_id', 'group_name');
// -------------------------------------
// Then, get current groups from settings
// -------------------------------------
$current = $this->get_setting('category_groups', $var_settings);
$r[] = array($this->setting_label(lang('category_groups')), form_multiselect($this->input_name('category_groups', TRUE), $all_groups, $current));
// -------------------------------------
// Build setting: multiple?
// -------------------------------------
$multiple = $this->get_setting('multiple', $var_settings);
$r[] = array($this->setting_label(lang('allow_multiple_categories')), '<label class="low-checkbox">' . form_checkbox($this->input_name('multiple'), 'y', $multiple, 'class="low-allow-multiple"') . lang('allow_multiple_categories_label') . '</label>');
// -------------------------------------
// Build setting: separator
// -------------------------------------
$separator = $this->get_setting('separator', $var_settings);
$r[] = array($this->setting_label(lang('separator_character')), $this->separator_select($separator));
// -------------------------------------
// Build setting: multi interface
// -------------------------------------
$multi_interface = $this->get_setting('multi_interface', $var_settings);
$r[] = array($this->setting_label(lang('multi_interface')), $this->interface_select($multi_interface));
// -------------------------------------
// Return output
// -------------------------------------
return $r;
}
开发者ID:kentonquatman,项目名称:iofa,代码行数:44,代码来源:vt.low_select_categories.php
示例17: form_error
?>
<?php
echo form_error($input['name']);
?>
<?php
}
?>
<?php
}
?>
<div id="extender">
<?php
echo form_multiselect('select1[]', $empleadosProyectos, '', 'id="select1"');
?>
<?php
echo form_multiselect('empleados[]', $empleadosNotas, '', 'id="select2"');
?>
<br>
<a href="#" id="add">Añadir <i class="icon-arrow-right"></i></a>
<a href="#" id="remove"><i class="icon-arrow-left"></i> Eliminar </a>
</div>
<br>
<div>
<?php
echo form_submit($boton, 'Guardar');
?>
</div>
<?php
echo form_close();
?>
开发者ID:jbgae,项目名称:bareaarquitectos,代码行数:30,代码来源:notas.php
示例18: site_url
<div class="span6">
<div class="widget">
<div class="widget-title">
<h4><i class="icon-reorder"></i>系統管理者設置</h4>
</div>
<div class="widget-body form">
<form action="<?php
echo site_url('/cash/config/update');
?>
" method="POST" class="form-horizontal">
<div class="control-group">
<label class="control-label">超級管理者</label>
<div class="controls">
<?php
echo form_multiselect("admin_ID[]", isset($admin_ID_select_options) ? $admin_ID_select_options : array(), isset($admin_ID) ? $admin_ID : array(), "class='span12 chosen'");
?>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">送出</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- END PAGE CONTENT-->
</div>
开发者ID:mengmeng7541,项目名称:cmnstelectronicsystem,代码行数:31,代码来源:edit_config.php
示例19: armar_tabla_dinamica
//.........这里部分代码省略.........
unset($campo["nombre_campo"]);
$tabla .= '<td>';
$tabla .= '<div class="input-group">
' . form_dropdown($campo['name'], $campo['options'], $selected, $attrs) . '
<span class="input-group-btn">
<button id="' . $id . 'Btn" class="btn btn-default" type="button">' . $button_text_icon . '</button>
</span>
</div>';
$tabla .= '</td>';
} else {
if ($campo['type'] == 'select-checkbox-addon') {
$campo['name'] = str_replace("[0]", '[' . $j . ']', $campo['name']);
preg_match('/\\[(.*?)\\]/i', $campo['name'], $matches);
$id = !empty($matches) ? $matches[1] : "";
$id = str_replace("]", "", $id);
$label = !empty($campo['label']) ? $campo['label'] . " " . $requerido : "";
$attrs = 'id="' . $campo["id"] . $j . '" class="' . $campo['class'] . ' chosen-select" data-placeholder="Seleccione" ' . (!empty($campo['multiple']) ? 'multiple="multiple" ' : "") . (!empty($campo['disabled']) ? 'disabled="disabled"' : "");
$selected = !empty($valor) ? $valor : "";
unset($campo['label']);
unset($campo['data-button-icon']);
unset($campo['data-button-text']);
unset($campo['label']);
unset($campo['data-addon-icon']);
unset($campo['data-addon-text']);
unset($campo['data-columns']);
unset($campo["nombre_campo"]);
$tabla .= '<td>';
$tabla .= '<div class="input-group">
<span class="input-group-addon">
<input type="checkbox" id="' . $id . 'Check">
</span>';
//Vertificar si es un select multiple
if (!empty($campo['multiple'])) {
$tabla .= form_multiselect($campo['name'], $campo['options'], $selected, $attrs);
} else {
$tabla .= form_dropdown($campo['name'], $campo['options'], $selected, $attrs);
}
$tabla .= '</div>';
$tabla .= '</td>';
} else {
if ($campo['type'] == 'select') {
$campo['name'] = str_replace("[0]", '[' . $j . ']', $campo['name']);
$attrs = 'id="' . $campo["id"] . $j . '" class="' . $campo['class'] . '"';
$selected = !empty($valor) ? $valor : "";
$tabla .= '<td>' . form_dropdown($campo['name'], $campo['options'], $selected, $attrs) . '</td>';
$selected = '';
} else {
if ($campo['type'] == 'radio') {
$div = '';
if (!empty($campo['values'])) {
foreach ($campo['values'] as $id_cat => $valor) {
if (empty($valor)) {
continue;
}
$campo["value"] = $id_cat;
unset($campo['values']);
$div .= '<label class="radio" style="margin-top:0px;margin-bottom:0px;">';
$div .= form_radio($campo) . " " . $valor;
$div .= '</label>';
}
}
$tabla .= '<td>' . $div . '</td>';
} else {
if ($campo['type'] == 'relate') {
$campo['name'] = str_replace("[0]", '[' . $j . ']', $campo['name']);
$attrs = 'class="' . $campo['class'] . '" id="' . $campo["id"] . '0"';
开发者ID:acampos1916,项目名称:corcione_produccion,代码行数:67,代码来源:Template.php
示例20: form_dropdown
</label>
<?php
echo form_dropdown('target', array('' => lang('nav:link_target_self'), '_blank' => lang('nav:link_target_blank')), $link->target);
?>
</li>
<li class="<?php
echo alternator('even', '');
?>
">
<label for="restricted_to[]"><?php
echo lang('nav:restricted_to');
?>
</label>
<?php
echo form_multiselect('restricted_to[]', array(0 => lang('global:select-any')) + $group_options, strpos($link->restricted_to, ",") ? explode(",", $link->restricted_to) : $link->restricted_to, 'size="' . (($count = count($group_options)) > 1 ? $count : 2) . '"');
?>
</li>
<li class="<?php
echo alternator('', 'even');
?>
">
<label for="class"><?php
echo lang('nav:class_label');
?>
</label>
<?php
echo form_input('class', $link->class);
?>
</li>
开发者ID:nockout,项目名称:tshpro,代码行数:31,代码来源:form.php
注:本文中的form_multiselect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论