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


PHP form_multiselect函数代码示例

本文整理汇总了PHP中form_multiselect函数的典型用法代码示例。如果您正苦于以下问题:PHP form_multiselect函数的具体用法?PHP form_multiselect怎么用?PHP form_multiselect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了form_multiselect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


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