本文整理汇总了PHP中form_label函数的典型用法代码示例。如果您正苦于以下问题:PHP form_label函数的具体用法?PHP form_label怎么用?PHP form_label使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了form_label函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display_configuration
function display_configuration($field_name, $field_label, $field_type, $data)
{
$config = array();
$config["label"] = form_label($field_label);
$config["value"] = "<p>" . form_dropdown($field_name, $data["data_fields"], isset($data["default_settings"]["cf"][$field_name]) ? $data["default_settings"]["cf"][$field_name] : '') . "</p><p>Field to match: " . NBS . form_dropdown($field_name . "_relationship_field", $data["all_fields"], (isset($data["default_settings"]["cf"][$field_name . "_relationship_field"]) ? $data["default_settings"]["cf"][$field_name . "_relationship_field"] : '') . "</p>");
return $config;
}
开发者ID:kentonquatman,项目名称:iofa,代码行数:7,代码来源:datagrab_relationship.php
示例2: revenueForm
function revenueForm()
{
$revenueForm = array();
$this->load->model('revenue_model');
$economic = $this->expenditure_model->exp_economic();
$donor = $this->agreement_model->getDonor();
$source = $this->expenditure_model->getsource_Ndese();
$budget = $this->agreement_model->getBudget();
//REVENUE MASTER-------------------------------------------------------------------------------------
$revenueForm['VOUCHER_NUM'] = array(form_label('भौचर नम्बर :', 'VOUCHER_NUM'), form_input(array('name' => 'VOUCHER_NUM', 'class' => 'number')));
$revenueForm['VOUCHER_EDATE'] = array(form_label('भौचर मिति :', 'VOUCHER_EDATE'), form_input(array('name' => 'VOUCHER_EDATE', 'class' => 'number', 'id' => 'rvoucherEdate')));
$revenueForm['VOUCHER_NDATE'] = array(form_input(array('name' => 'VOUCHER_NDATE', 'class' => 'number', 'id' => 'rvoucherNdate')));
$revenueForm['ACC_CODE'] = array(form_label('बुद्गेत सिर्सक ', 'ACC_CODE'), form_input(array('name' => 'ACC_CODE', 'id' => 'typeauto', 'class' => 'number')), form_input(array('name' => 'ACC_CODE', 'id' => 'autocomplete', 'width' => '500px')));
//form_dropdown('ACC_CODE', $budget, '', 'class="dropdown"'));
$revenueForm['CREATED_BY'] = array(form_label(' प्रतिपादन BY:', 'CREATED_BY'), form_input(array('name' => 'CREATED_BY')));
$revenueForm['CREATED_DATE'] = array(form_label('प्रतिपादन मिति :', 'CREATED_DATE'), form_input(array('name' => 'CREATED_DATE')));
$revenueForm['AGREEMENET_ID'] = array(form_label(' agreement id :', 'AGREEMENET_ID'), form_input(array('name' => 'AGREEMENET_ID')));
// REVENUE DETAIL--------------------------------------------------------------------------------------
// $revenueForm['INFO_ID'] = array(form_label('राजस्व कोड :', 'INFO_ID'), form_input(array('name' => 'INFO_ID[]', 'class' => 'number')));
$revenueForm['AMOUNT_EDESC'] = array(form_label('मूल्य EDESC :', 'AMOUNT_EDESC'), form_input(array('name' => 'AMOUNT_EDESC[]', 'class' => 'number')));
$revenueForm['AMOUNT_NDESC'] = array(form_input(array('name' => 'AMOUNT_NDESC[]', 'class' => 'number')));
$revenueForm['BANK_VOUCHER_NUM'] = array(form_label('बैंक भौचर नम्बर :', 'BANK_VOUCHER_NUM'), form_input(array('name' => 'BANK_VOUCHER_NUM[]', 'class' => 'number')));
$revenueForm['BANK_VOUCHER_DATE'] = array(form_label('बैंक भौचर मिति :', 'BANK_VOUCHER_DATE'), form_input(array('name' => 'BANK_VOUCHER_DATE[]', 'class' => 'number')));
$revenueForm['BANK_CODE'] = array(form_label('बैंक कोड :', 'BANK_CODE'), form_input(array('name' => 'BANK_CODE[]')));
// $revenueForm['REVENUE_DETAIL'] = array(form_label('revenu detail :', 'REVENUE_DETAIL'), form_input(array('name' => 'REVENUE_DETAIL', 'class' => 'REVENUE_DETAIL')));
// REVENUE DETAIL DROPDOWNS----------------------------------------------------------------------
$revenueForm['AMOUNT'] = array(form_label('मुल्य :', 'AMOUNT'), form_input(array('name' => 'AMOUNT[]', 'class' => 'AMOUNT')));
$revenueForm['ECONOMIC_CODE5'] = array(form_dropdown('ECONOMIC_CODE5[]', $economic, '', ' class="dropdown"', 'id="reve_economic"'));
$revenueForm['AMOUNT_TYPE'] = array(form_dropdown('AMOUNT_TYPE[]', array('d' => 'डेबिट ', 'c' => 'क्रेडिट ')));
$revenueForm['SOURCE_TYPE_CODE'] = array(form_dropdown('SOURCE_TYPE_CODE[]', $source, '', 'class="source"'));
$revenueForm['DONOR_CODE'] = array(form_dropdown('DONOR_CODE[]', $donor, '', 'class="donor"'));
$revenueForm['TRANSIT'] = array(form_dropdown('TRANSIT', array('कोलेनिका ', 'बा . ख '), '', 'class="transit"'));
$revenueForm['SUBMIT'] = array(form_submit('SUBMIT', 'Submit'));
return $revenueForm;
}
开发者ID:pshreez,项目名称:PHP,代码行数:35,代码来源:revenue.php
示例3: display_global_settings
/**
* global settings for the field instance set by installer
*/
function display_global_settings()
{
$val = array_merge($this->settings, $_POST);
$form = '<p>' . form_label('API Key', 'api_key') . form_input('api_key', $val['api_key']) . '</p>';
$form .= '<p>' . form_label('Stats cache expire time (hours)', 'cache_expire_hours') . form_input('cache_expire_hours', $val['cache_expire_hours']) . '</p>';
return $form;
}
开发者ID:ahebrank,项目名称:youtube-field,代码行数:10,代码来源:ft.youtube_field.php
示例4: index
public function index()
{
$this->load->helper('form');
$this->load->helper('url');
$aOptions = array('none' => '', 'hourly' => 'hourly', 'daily' => 'daily');
$sAttributes = 'id="select_type"';
$data['select_type'] = form_label("Select either hourly or daily predictions:", 'select_type') . form_dropdown('select_type', $aOptions, '', $sAttributes);
for ($i = 0; $i < 36; $i++) {
$aOptionsHour[$i] = $i;
if ($i < 10) {
$aOptionsDay[$i] = $i;
// Get at days while I'm at it.
$aOptionsPop[$i * 10] = $i * 10;
}
}
$sAttributesPop = 'id = "select_pop"';
$sAttributesDay = 'id="select_day"';
$sAttributesHour = 'id="select_hour"';
$data['sel_hour'] = form_label("Select how many hours ahead:", 'select_hour') . form_dropdown('sel_hour', $aOptionsHour, '', $sAttributesHour);
$data['sel_day'] = form_label("Select how many days ahead:", 'select_day') . form_dropdown('sel_day', $aOptionsDay, '', $sAttributesDay);
$data['sel_pop'] = form_label("Select percent of percipitation:", 'select_pop') . form_dropdown('sel_pop', $aOptionsPop, '', $sAttributesPop);
$sAttributesData = 'id="select_data"';
$aOptionsData = array('Temperature' => 'temp', 'Precipitation' => 'pop');
$data['sel_data'] = form_label("Select details on either POP or Temperature:", 'select_data') . form_dropdown('sel_data', $aOptionsData, '', $sAttributesData);
$this->load->view('header_view');
$this->load->view('weather_view', $data);
$this->load->view('footer_view');
}
开发者ID:vitallish,项目名称:clonetana,代码行数:28,代码来源:weather.php
示例5: tag_field
function tag_field($value = '')
{
$string = form_label('Tags', 'tags');
$input = array('name' => 'tags', 'id' => 'tags', 'size' => 40, 'value' => $value);
$string = form_input($input);
echo $string;
}
开发者ID:Ahmad-Hilali,项目名称:agilan,代码行数:7,代码来源:social_pi.php
示例6: display_configuration
/**
* Generate the form elements to configure this field
*
* @param string $field_name the field's name
* @param string $field_label the field's label
* @param string $field_type the field's type
* @param string $data array of data that can be used to select from
* @return array containing form's label and elements
* @author Andrew Weaver
*/
function display_configuration($field_name, $field_label, $field_type, $data)
{
$config = array();
$config["label"] = form_label($field_label);
$config["value"] = form_dropdown($field_name, $data["data_fields"], isset($data["default_settings"]["cf"][$field_name]) ? $data["default_settings"]["cf"][$field_name] : '');
return $config;
}
开发者ID:kentonquatman,项目名称:iofa,代码行数:17,代码来源:Datagrab_fieldtype.php
示例7: index
public function index($type = null)
{
switch ($type) {
case null:
$this->load->library('form_validation');
$this->form_validation->set_rules('verify', 'Verification Code', 'required|xss_clean|max_length[111]');
if ($this->form_validation->run() !== false) {
redirect('verify/code/' . $this->input->post('verify'));
}
$this->load->view('header');
echo form_open('verify');
echo form_label('Verify:', 'verify');
echo form_input('verify', '', 'id="verify_input"');
echo form_submit('submit', 'Verify');
echo form_close();
$this->load->view('footer');
break;
case 'newAccount':
echo "<h1>Verify New Account</h1>";
echo anchor('verify/send/newAccount', 'Send Confirmation Email', 'title="Send Confirmation Email"');
break;
case 'connectAccounts':
echo "<h1>Connect Accounts</h1><h2>An account with that email already exists.</h2>";
echo anchor('verify/send/connectAccounts', 'Connect Accounts', 'title="Connect Accounts"');
break;
}
}
开发者ID:AnchorActivism,项目名称:poetrystorm,代码行数:27,代码来源:verify.php
示例8: editar
public function editar()
{
if (!($this->dados['infos'] = $this->curso_model->listar($this->id))) {
redirect('../cursos/listar');
}
$dadosCurso = $this->dados['infos'][0];
$form = form_open('#', array('class' => 'niceform'));
$form .= '<table class="cadForm">';
$form .= '<tr>';
$form .= '<td>';
$form .= form_label('Nome:', '', array('for' => 'email'));
$form .= form_input('curso_nome', $dadosCurso['curso_nome'], array('size' => 30));
$form .= form_hidden('curso_id', $dadosCurso['curso_id']);
$form .= form_hidden('lixeira', $dadosCurso['lixeira']);
$form .= '</td>';
$form .= '<td>';
$form .= form_label('Quantidade de aulas:', '', array('for' => 'email'));
$form .= form_input('curso_qtd_aulas', $dadosCurso['curso_qtd_aulas'], array('size' => 20));
$form .= '</td>';
$form .= '</tr>';
$form .= '<tr>';
$form .= '<td></td>';
$form .= '<td>';
$form .= form_submit('cadastrar', 'Enviar', 'id="submit"');
$form .= '</td>';
$form .= '</tr>';
$form .= '</table>';
$form .= form_close();
$form .= '<span class="obs">Todos os campos são obrigatórios.</span>';
$this->dados['form'] = $form;
$this->load->view('editar', $this->dados);
}
开发者ID:adrisonluz,项目名称:syschool,代码行数:32,代码来源:Cursos.php
示例9: fpbx_form_input_check
/**
* Text Input Field With Enable/Disable Checkbox
*
* @access public
* @param mixed
* @param string
* @param string
* @param string
* @param string
* @param bool
* @return string
*/
function fpbx_form_input_check($data = '', $value = '', $extra = '', $label = 'Enable', $disabled_value = 'DEFAULT', $check_enables = true)
{
if (!is_array($data)) {
$data['name'] = $data['id'] = $data;
}
if (!isset($data['id'])) {
$data['id'] = $data['name'];
}
if (!isset($data['value'])) {
$data['value'] = $value;
}
if (!empty($data['disabled'])) {
$data['value'] = $disabled_value;
}
$cbdata['name'] = $data['name'] . '_cb';
$cbdata['id'] = $data['id'] . '_cb';
$cbdata['checked'] = isset($data['disabled']) ? !$data['disabled'] : true;
$cbdata['data-disabled'] = $disabled_value;
if ($check_enables) {
$cbdata['class'] = "input_checkbox_toggle_false";
} else {
$cbdata['class'] = "input_checkbox_toggle_true";
$cbdata['checked'] = !$cbdata['checked'];
}
return form_input($data) . form_checkbox($cbdata) . form_label($label, $cbdata['id']);
}
开发者ID:lidl,项目名称:framework,代码行数:38,代码来源:freepbx_helpers.php
示例10: display_configuration
function display_configuration($field_name, $field_label, $field_type, $data)
{
$config = array();
$config["label"] = form_label($field_label) . NBS . anchor("http://brandnewbox.co.uk/support/details/importing_into_playa_fields_with_datagrab", "(?)", 'class="help"');
$config["value"] = "<p>" . form_dropdown($field_name, $data["data_fields"], isset($data["default_settings"]["cf"][$field_name]) ? $data["default_settings"]["cf"][$field_name] : '') . "</p><p>Field to match: " . NBS . form_dropdown($field_name . "_playa_field", $data["all_fields"], (isset($data["default_settings"]["cf"][$field_name . "_playa_field"]) ? $data["default_settings"]["cf"][$field_name . "_playa_field"] : '') . "</p>");
return $config;
}
开发者ID:thomasvandoren,项目名称:teentix-site,代码行数:7,代码来源:datagrab_playa.php
示例11: getLoginForm
public function getLoginForm()
{
$this->CI->lang->load('basic', 'english');
$this->CI->load->helper('form');
$form = '<div id="LoginForm">';
$form.= '<p>'.$this->CI->lang->line('login_text').'</p>';
$form.= form_open(site_url('login'), array(
'id' => 'Login'
));
$form.= form_fieldset();
$form.= form_label('username');
$form.= form_input(array(
'maxlength' => 20,
'name' => 'username'
));
$form.= form_label('password');
$form.= form_input(array(
'maxlength' => 20,
'name' => 'password',
'type' => 'password'
));
$form.= form_submit('login_submit', $this->CI->lang->line('login_button'));
$form.= form_fieldset_close();
$form.= form_close();
$form.= '</div>';
return $form;
}
开发者ID:JohannesFischer,项目名称:adora-gallery,代码行数:29,代码来源:Content.php
示例12: bt_password
function bt_password($n, $name, $i = 12, $a = FALSE)
{
if ($a) {
return '<div class="form-group col-md-' . $i . '">' . "\n" . form_label($n) . "\n" . form_password(array('name' => $name, 'class' => 'form-control'), set_value($name), 'autofocus') . "\n" . '</div>' . "\n";
} else {
return '<div class="form-group col-md-' . $i . '">' . "\n" . form_label($n) . "\n" . form_password(array('name' => $name, 'class' => 'form-control'), set_value($name)) . "\n" . '</div>' . "\n";
}
}
开发者ID:jairomr,项目名称:Painel-Admin,代码行数:8,代码来源:bootstrap_helper.php
示例13: display_configuration
/**
* Create the form elements to map matrix fields
*
* @param string $field_name
* @param string $field_label
* @param string $field_type
* @param string $data
* @return void
* @author Andrew Weaver
*/
function display_configuration($field_name, $field_label, $field_type, $data)
{
$config = array();
$config["label"] = form_label($field_label) . BR . anchor("http://brandnewbox.co.uk/support/details/datagrab_and_matrix_fields", "Matrix notes", 'class="help"');
// Get list of matrix columns and map column id to label
$this->EE->db->select("col_id, col_label,col_type");
$query = $this->EE->db->get("exp_matrix_cols");
$matrix_columns = array();
$matrix_column_types = array();
foreach ($query->result_array() as $row) {
$matrix_columns[$row["col_id"]] = $row["col_label"];
$matrix_column_types[$row["col_id"]] = $row["col_type"];
}
$cells = form_hidden($field_name, "1");
// Loop over all columns
foreach ($data["field_settings"][$field_name]["col_ids"] as $col_id) {
// Get current settings if this is a saved import
if (isset($data["default_settings"]["cf"][$field_name . "_columns"])) {
$default_cells = $data["default_settings"]["cf"][$field_name . "_columns"];
} else {
$default_cells = array();
}
// Build configuration interface
$cells .= "<p>" . $matrix_columns[$col_id] . NBS . ":" . NBS;
$cells .= form_dropdown($field_name . "_columns[" . $col_id . "]", $data["data_fields"], isset($default_cells[$col_id]) ? $default_cells[$col_id] : '');
if ($matrix_column_types[$col_id] == "file") {
$cells .= NBS . NBS . "Upload folder: " . NBS;
// Get upload folders
if (!isset($folders)) {
$this->EE->db->select("id, name");
$this->EE->db->from("exp_upload_prefs");
$this->EE->db->order_by("id");
$query = $this->EE->db->get();
$folders = array();
foreach ($query->result_array() as $row) {
$folders[$row["id"]] = $row["name"];
}
}
$cells .= form_dropdown($field_name . "_extra1[" . $col_id . "]", $folders, isset($data["default_settings"]["cf"][$field_name . "_extra1"][$col_id]) ? $data["default_settings"]["cf"][$field_name . "_extra1"][$col_id] : '');
$cells .= NBS . NBS . "Fetch?: " . NBS;
$cells .= form_dropdown($field_name . "_extra2[" . $col_id . "]", array("No", "Yes"), isset($data["default_settings"]["cf"][$field_name . "_extra2"][$col_id]) ? $data["default_settings"]["cf"][$field_name . "_extra2"][$col_id] : '');
}
$cells .= "</p>";
}
// Pulldown menu to determin what to do for updates
$column_options = array();
$column_options["-1"] = "Delete all existing rows";
$column_options["0"] = "Keep existing rows and append new";
$sub_options = array();
foreach ($data["field_settings"][$field_name]["col_ids"] as $col_id) {
$sub_options[$col_id] = $matrix_columns[$col_id];
}
$column_options["Update the row if this column matches:"] = $sub_options;
$cells .= "<p>" . "Action to take when an entry is updated: " . form_dropdown($field_name . "_unique", $column_options, isset($data["default_settings"]["cf"][$field_name . "_unique"]) ? $data["default_settings"]["cf"][$field_name . "_unique"] : '') . "</p>";
// return config interface
$config["value"] = $cells;
return $config;
}
开发者ID:kentonquatman,项目名称:iofa,代码行数:68,代码来源:datagrab_matrix.php
示例14: display_configuration
function display_configuration($field_name, $field_label, $field_type, $data)
{
$config = array();
$config["label"] = "<p>" . form_label($field_label);
/* . NBS .
anchor("http://brandnewbox.co.uk/support/details/importing_into_playa_fields_with_datagrab", "(?)", 'class="help"');
*/
$config["value"] = "Price: " . NBS . form_dropdown($field_name, $data["data_fields"], isset($data["default_settings"]["cf"][$field_name]) ? $data["default_settings"]["cf"][$field_name] : '') . "</p><p>" . "SKU: " . NBS . form_dropdown($field_name . "_store_sku", $data["data_fields"], isset($data["default_settings"]["cf"][$field_name . "_store_sku"]) ? $data["default_settings"]["cf"][$field_name . "_store_sku"] : '') . "</p><p>" . "Sale Price: " . NBS . form_dropdown($field_name . "_store_sale_price", $data["data_fields"], isset($data["default_settings"]["cf"][$field_name . "_store_sale_price"]) ? $data["default_settings"]["cf"][$field_name . "_store_sale_price"] : '') . "</p><p>" . "Sale Price Enabled?: " . NBS . form_dropdown($field_name . "_store_sale_price_enabled", $data["data_fields"], isset($data["default_settings"]["cf"][$field_name . "_store_sale_price_enabled"]) ? $data["default_settings"]["cf"][$field_name . "_store_sale_price_enabled"] : '') . "</p><p>" . "Weight: " . NBS . form_dropdown($field_name . "_store_weight", $data["data_fields"], isset($data["default_settings"]["cf"][$field_name . "_store_weight"]) ? $data["default_settings"]["cf"][$field_name . "_store_weight"] : '') . "</p><p>" . "Free shipping: " . NBS . form_dropdown($field_name . "_store_free_shipping", $data["data_fields"], isset($data["default_settings"]["cf"][$field_name . "_store_free_shipping"]) ? $data["default_settings"]["cf"][$field_name . "_store_free_shipping"] : '') . "</p>";
return $config;
}
开发者ID:thomasvandoren,项目名称:teentix-site,代码行数:10,代码来源:datagrab_store.php
示例15: display_configuration
function display_configuration($field_name, $field_label, $field_type, $data)
{
$config = array();
$config["label"] = "<p>" . form_label($field_label);
/* . NBS .
anchor("http://brandnewbox.co.uk/support/details/importing_into_playa_fields_with_datagrab", "(?)", 'class="help"');
*/
$config["value"] = "Start date: " . NBS . form_hidden($field_name, "y") . form_dropdown($field_name . "_low_events_start_date", $data["data_fields"], isset($data["default_settings"]["cf"][$field_name . "_low_events_start_date"]) ? $data["default_settings"]["cf"][$field_name . "_low_events_start_date"] : '') . "</p><p>" . "Start time: " . NBS . form_dropdown($field_name . "_low_events_start_time", $data["data_fields"], isset($data["default_settings"]["cf"][$field_name . "_low_events_start_time"]) ? $data["default_settings"]["cf"][$field_name . "_low_events_start_time"] : '') . "</p><p>" . "End date: " . NBS . form_dropdown($field_name . "_low_events_end_date", $data["data_fields"], isset($data["default_settings"]["cf"][$field_name . "_low_events_end_date"]) ? $data["default_settings"]["cf"][$field_name . "_low_events_end_date"] : '') . "</p><p>" . "End time: " . NBS . form_dropdown($field_name . "_low_events_end_time", $data["data_fields"], isset($data["default_settings"]["cf"][$field_name . "_low_events_end_time"]) ? $data["default_settings"]["cf"][$field_name . "_low_events_end_time"] : '') . "</p><p>" . "All day?: " . NBS . form_dropdown($field_name . "_low_events_all_day", $data["data_fields"], isset($data["default_settings"]["cf"][$field_name . "_low_events_all_day"]) ? $data["default_settings"]["cf"][$field_name . "_low_events_all_day"] : '') . "</p>";
return $config;
}
开发者ID:kentonquatman,项目名称:iofa,代码行数:10,代码来源:datagrab_low_events.php
示例16: print_label
function print_label($label)
{
$html = (isset($label['hint']) && $label['hint'] != '' ? '<a href="#" class="hint"><span>' . $label['hint'] . '</span></a>' : '') . $label['label'] . (isset($label['mandatory']) && $label['mandatory'] ? ' <span class="mandatory">*</span>' : '');
$attributes = array();
$attributes['class'] = 'clearfix';
if (isset($label['labelClass'])) {
$attributes['class'] .= ' ' . $label['labelClass'];
}
return form_label($html, isset($label['labelFor']) ? $label['labelFor'] : '', $attributes);
}
开发者ID:VeronaFabLabRepo,项目名称:comune-grezzana-app-backend,代码行数:10,代码来源:print_label_helper.php
示例17: rateEditForm
function rateEditForm()
{
$rateEditForm = array();
$this->load->library('table');
$rateEditForm['ACTUAL_RATE'] = array(form_label('ब्याज दर:', 'ACTUAL_RATE'), form_input(array('name' => 'ACTUAL_RATE', 'class' => 'number', 'maxlength' => 9)));
$rateEditForm['NEW_RATE'] = array(form_label('new ब्याज दर:', 'NEW_RATE'), form_input(array('name' => 'NEW_RATE', 'class' => 'number')));
$rateEditForm['ALTERED_RATE'] = array(form_label('ब्याज दर difference:', 'ALTERED_RATE'), form_input(array('name' => 'ALTERED_RATE', 'class' => 'number')));
$rateEditForm['INTEREST_CHANGE'] = array(form_label('किस्ता रकम change:', 'INTEREST_CHANGE'), form_input(array('name' => 'INTEREST_CHANGE', 'class' => 'number')));
return $rateEditForm;
}
开发者ID:pshreez,项目名称:PHP,代码行数:10,代码来源:rateEdit.php
示例18: output
public function output($submit)
{
foreach ($this->inputs as $i->{$input}) {
$this->output .= form_label($this->labels[$i]);
$this->output .= form_input($input);
}
$this->output .= form_submit($submit);
$this->output .= form_close();
return $this->output;
}
开发者ID:jacovc86,项目名称:MaaseHoshev,代码行数:10,代码来源:FormBuilder.php
示例19: _showForm
/**
* Show form to user select table
**/
private function _showForm($tables)
{
$CI =& get_instance();
$CI->load->helper('form');
echo form_open($CI->uri->uri_string(), array("method" => "post"));
echo form_label('Table: ', 'table');
echo form_dropdown('table', $this->_tablesAsOptions($tables), array(), 'id="table"');
echo form_submit('', 'Submit');
echo form_close();
}
开发者ID:jeanlopes,项目名称:mostra-ifrs-poa,代码行数:13,代码来源:Scaffold.php
示例20: display_configuration
/**
* Create the form elements to map matrix fields
*
* @param string $field_name
* @param string $field_label
* @param string $field_type
* @param string $data
* @return void
* @author Andrew Weaver
*/
function display_configuration($field_name, $field_label, $field_type, $data)
{
$config = array();
$config["label"] = form_label($field_label) . BR . anchor("http://brandnewbox.co.uk/support/", "Grid notes", 'class="help"');
$config["value"] = "";
$config["value"] .= form_hidden($field_name, "1");
// Get current saved setting
if (isset($data["default_settings"]["cf"][$field_name . "_columns"])) {
$default = $data["default_settings"]["cf"][$field_name . "_columns"];
} else {
$default = array();
}
// Find columns for this grid
$this->EE->db->select("col_id, col_type, col_label");
$this->EE->db->from("exp_grid_columns g");
$this->EE->db->join("exp_channel_fields c", "g.field_id = c.field_id");
$this->EE->db->where("c.field_name", $field_name);
$this->EE->db->order_by("col_order ASC");
$query = $this->EE->db->get();
// Build ui
$grid_columns = $query->result_array();
foreach ($query->result_array() as $row) {
$config["value"] .= "<p>" . $row["col_label"] . NBS . ":" . NBS;
$config["value"] .= form_dropdown($field_name . "_columns[" . $row["col_id"] . "]", $data["data_fields"], isset($default[$row["col_id"]]) ? $default[$row["col_id"]] : '');
if ($row["col_type"] == "file") {
$config["value"] .= NBS . NBS . "Upload folder: " . NBS;
// Get upload folders
if (!isset($folders)) {
$this->EE->db->select("id, name");
$this->EE->db->from("exp_upload_prefs");
$this->EE->db->order_by("id");
$query = $this->EE->db->get();
$folders = array();
foreach ($query->result_array() as $folder) {
$folders[$folder["id"]] = $folder["name"];
}
}
$config["value"] .= form_dropdown($field_name . "_extra1[" . $row["col_id"] . "]", $folders, isset($data["default_settings"]["cf"][$field_name . "_extra1"][$row["col_id"]]) ? $data["default_settings"]["cf"][$field_name . "_extra1"][$row["col_id"]] : '');
$config["value"] .= NBS . NBS . "Fetch?: " . NBS;
$config["value"] .= form_dropdown($field_name . "_extra2[" . $row["col_id"] . "]", array("No", "Yes"), isset($data["default_settings"]["cf"][$field_name . "_extra2"][$row["col_id"]]) ? $data["default_settings"]["cf"][$field_name . "_extra2"][$row["col_id"]] : '');
}
$config["value"] .= "</p>";
}
$column_options = array();
$column_options["-1"] = "Delete all existing rows";
$column_options["0"] = "Keep existing rows and append new";
$sub_options = array();
foreach ($grid_columns as $row) {
$sub_options[$row["col_id"]] = $row["col_label"];
}
$column_options["Update the row if this column matches:"] = $sub_options;
$config["value"] .= "<p>" . "Action to take when an entry is updated: " . form_dropdown($field_name . "_unique", $column_options, isset($data["default_settings"]["cf"][$field_name . "_unique"]) ? $data["default_settings"]["cf"][$field_name . "_unique"] : '') . "</p>";
return $config;
}
开发者ID:kentonquatman,项目名称:iofa,代码行数:64,代码来源:datagrab_grid.php
注:本文中的form_label函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论