本文整理汇总了PHP中form_label函数的典型用法代码示例。如果您正苦于以下问题:PHP form_label函数的具体用法?PHP form_label怎么用?PHP form_label使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了form_label函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例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');
}
示例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;
}
示例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;
}
示例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;
}
}
示例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);
}
示例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']);
}
示例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;
}
示例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;
}
示例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";
}
}
示例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;
}
示例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;
}
示例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;
}