本文整理汇总了PHP中form_textarea函数的典型用法代码示例。如果您正苦于以下问题:PHP form_textarea函数的具体用法?PHP form_textarea怎么用?PHP form_textarea使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了form_textarea函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: search_form_widget_form
function search_form_widget_form($num = 1)
{
$widget = 'search_form_widget_' . $num;
// имя для формы и опций = виджет + номер
// получаем опции
$options = mso_get_option($widget, 'plugins', array());
if (!isset($options['header'])) {
$options['header'] = '';
}
if (!isset($options['text'])) {
$options['text'] = t('Что искать?');
}
if (!isset($options['submit'])) {
$options['submit'] = t('Поиск');
}
if (!isset($options['style_text'])) {
$options['style_text'] = '';
}
if (!isset($options['style_submit'])) {
$options['style_submit'] = '';
}
if (!isset($options['text_posle'])) {
$options['text_posle'] = '';
}
// вывод самой формы
$CI =& get_instance();
$CI->load->helper('form');
$form = mso_widget_create_form(t('Заголовок'), form_input(array('name' => $widget . 'header', 'value' => $options['header'])));
$form .= mso_widget_create_form(t('Текст подсказки'), form_input(array('name' => $widget . 'text', 'value' => $options['text'])));
$form .= mso_widget_create_form(t('Текст на кнопке'), form_input(array('name' => $widget . 'submit', 'value' => $options['submit'])));
$form .= mso_widget_create_form(t('CSS-стиль текста'), form_input(array('name' => $widget . 'style_text', 'value' => $options['style_text'])));
$form .= mso_widget_create_form(t('CSS-стиль кнопки'), form_input(array('name' => $widget . 'style_submit', 'value' => $options['style_submit'])));
$form .= mso_widget_create_form(t('Текст внизу'), form_textarea(array('name' => $widget . 'text_posle', 'value' => $options['text_posle'], 'rows' => '3')));
return $form;
}
开发者ID:Kmartynov,项目名称:cms,代码行数:35,代码来源:index.php
示例2: build
/**
* build (only) the field (widhout labels or borders)
*
* @access public
* @return void
*/
function build()
{
$output = "";
if (!isset($this->cols)) {
$this->cols = 42;
}
if (!isset($this->rows)) {
$this->rows = 15;
}
$this->_getValue();
switch ($this->status) {
case "disabled":
case "show":
if (!isset($this->value)) {
$output = RAPYD_FIELD_SYMBOL_NULL;
} elseif ($this->value == "") {
$output = "";
} else {
$output = '<span style="font-size:9px; width: 100%; height:100px; overflow: auto">' . nl2br(htmlspecialchars($this->value)) . '</span>';
//I know I know..
}
break;
case "create":
case "modify":
$attributes = array('name' => $this->name, 'id' => $this->name, 'cols' => $this->cols, 'rows' => $this->rows, 'onclick' => $this->onclick, 'onchange' => $this->onchange, 'class' => $this->css_class, 'style' => $this->style);
$output = form_textarea($attributes, $this->value) . $this->extra_output;
break;
case "hidden":
$output = form_hidden($this->name, $this->value);
break;
default:
}
$this->output = $output;
}
开发者ID:codethics,项目名称:proteoerp,代码行数:40,代码来源:textarea.php
示例3: generateForm
function generateForm()
{
$output = form_hidden('edit[step]', 'confirm');
$player = $this->registration->user();
if (!$player) {
return false;
}
$noneditable = array();
$noneditable[] = array('Name', l($player->fullname, url("person/view/{$player->id}")));
$noneditable[] = array('Member ID', $player->member_id);
$noneditable[] = array('Event', l($this->event->name, url("event/view/{$this->event->registration_id}")));
$noneditable[] = array('Registered Price', $this->registration->total_amount);
$form = '<div class="pairtable">' . table(NULL, $noneditable) . '</div>';
$pay_opts = getOptionsFromEnum('registrations', 'payment');
array_shift($pay_opts);
$form .= form_select('Registration Status', 'edit[payment]', $this->registration->payment, $pay_opts);
$form .= form_textarea('Notes', 'edit[notes]', $this->registration->notes, 45, 5);
$output .= form_group('Registration details', $form);
if ($this->formbuilder) {
$this->formbuilder->bulk_set_answers_sql('SELECT qkey, akey FROM registration_answers WHERE order_id = ?', array($this->registration->order_id));
if (count($this->formbuilder->_answers) > 0) {
$output .= form_group('Registration answers', $this->formbuilder->render_editable(true));
} else {
$output .= form_group('Registration answers', $this->formbuilder->render_editable(false));
}
}
$output .= form_submit('Submit') . form_reset('Reset');
return form($output);
}
开发者ID:roboshed,项目名称:leaguerunner,代码行数:29,代码来源:edit.php
示例4: form_control
function form_control(&$setting)
{
switch ($setting->type) {
default:
case 'text':
$form_control = form_input(array('id' => $setting->slug, 'name' => $setting->slug, 'value' => $setting->value, 'class' => 'text width-20'));
break;
case 'textarea':
$form_control = form_textarea(array('id' => $setting->slug, 'name' => $setting->slug, 'value' => $setting->value, 'class' => 'width-20'));
break;
case 'password':
$form_control = form_password(array('id' => $setting->slug, 'name' => $setting->slug, 'value' => $setting->value, 'class' => 'text width-20'));
break;
case 'select':
$form_control = form_dropdown($setting->slug, $this->_format_options($setting->options), $setting->value, 'class="width-20"');
break;
case 'checkbox':
case 'radio':
$func = $setting->type == 'checkbox' ? 'form_checkbox' : 'form_radio';
$form_control = '';
foreach ($this->_format_options($setting->options) as $value => $label) {
$form_control .= ' ' . form_radio(array('id' => $setting->slug, 'name' => $setting->slug, 'checked' => $setting->value == $value, 'value' => $value)) . ' ' . $label;
}
break;
}
return $form_control;
}
开发者ID:Tapha,项目名称:pyrocms,代码行数:27,代码来源:Settings.php
示例5: foundation_form_input
function foundation_form_input($name, $args = array())
{
$isValid = form_error($name) ? false : true;
if (!empty($args['default_value'])) {
$default_value = $args['default_value'];
} else {
$default_value = null;
}
$class = !empty($args['class']) ? $args['class'] : '';
$node = "<label>" . humanize($name);
if (!empty($args['as'])) {
switch ($args['as']) {
case 'collection':
if (!empty($args['collection'])) {
if ($args['allow_blank']) {
$args['collection'] = array_merge(array(" " => " "), $args['collection']);
}
$node .= form_dropdown($name, $args['collection'], set_value($name));
}
break;
case 'text':
$node .= form_textarea($name, set_value($name, $default_value));
break;
default:
# ...
break;
}
} else {
$node .= form_input($name, set_value($name, $default_value));
}
$node .= form_error($name, '<div class="error">', '</div>');
$node .= "</label>";
return $node;
}
开发者ID:chloereimer,项目名称:sleepy-me-hotel,代码行数:34,代码来源:foundation_form_helper.php
示例6: build
/**
* build (only) the field (widhout labels or borders)
*
* @access public
* @return void
*/
function build()
{
$output = "";
if (!isset($this->cols)) {
$this->cols = 42;
}
if (!isset($this->rows)) {
$this->rows = 15;
}
$this->_getValue();
switch ($this->status) {
case "disabled":
case "show":
if (!isset($this->value)) {
$output = RAPYD_FIELD_SYMBOL_NULL;
} elseif ($this->value == "") {
$output = "";
} else {
$output = '<div style=" font: 11px \'courier new\',tahoma; color: #111; width: 100%; overflow: auto"><pre>' . htmlspecialchars($this->value) . '</pre></div>';
}
break;
case "create":
case "modify":
$attributes = array('name' => $this->name, 'id' => $this->name, 'cols' => $this->cols, 'rows' => $this->rows, 'onclick' => $this->onclick, 'onchange' => $this->onchange, 'class' => $this->css_class, 'style' => 'font-size:9px;font: 11px \'courier new\',tahoma; color: #111;');
$output = form_textarea($attributes, $this->value) . $this->extra_output;
break;
case "hidden":
$output = "";
//form_hidden($this->name, $this->value);
break;
default:
}
$this->output = $output;
}
开发者ID:codethics,项目名称:proteoerp,代码行数:40,代码来源:html.php
示例7: centinelas
function centinelas()
{
$this->load->helper('directory');
$this->load->library('table');
$tmpl = array('row_start' => '<tr valign="top">');
$this->table->set_template($tmpl);
$map = directory_map('./system/logs/');
$lista = array();
foreach ($map as $file) {
if ($file != 'index.html') {
$lista[] = anchor("supervisor/mantenimiento/borracentinela/{$file}", 'X') . " <a href='javascript:void(0)' onclick=\"carga('{$file}')\" >{$file}</a>";
}
}
$copy = "<br><a href='javascript:void(0)' class='mininegro' onclick=\"copiar()\" >Copiar texto</a>";
$tadata = array('name' => 'sql', 'id' => 'log', 'rows' => '20', 'cols' => '60');
$form = form_open('ejecutasql/filteredgrid/process') . form_textarea($tadata) . '<br>' . form_submit('mysubmit', 'Ejecutar como SQL') . form_close();
$this->table->add_row(ul($lista), '<b id="fnom">Seleccione un archivo de centinela</b><br>' . $form);
$link = site_url('supervisor/mantenimiento/vercentinela');
$data['script'] = "<script>\n\t\t function carga(arch){\n\t\t link='{$link}'+'/'+arch;\n\t\t //alert(link);\n\t\t \$('#fnom').text(arch);\n\t\t \$('#log').load(link);\n\t\t };\n\t\t function copiar(){\n\t\t \$('#log').copy();\n\t\t };\n\t\t</script>";
$data['content'] = $this->table->generate();
$data['title'] = " Centinelas ";
//script('plugins/jquery.clipboard.pack.js')
$data["head"] = script("jquery.pack.js") . script('plugins/jquery.copy.min.js') . $this->rapyd->get_head() . style('marcos.css') . style('estilos.css');
$this->load->view('view_ventanas', $data);
}
开发者ID:enderochoa,项目名称:tortuga,代码行数:25,代码来源:mantenimiento.php
示例8: 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: options
// -------------------------------------
$options = $this->get_setting('options', $var_settings);
$r[] = array($this->setting_label(lang('variable_options'), lang('variable_options_help')), form_textarea(array('name' => $this->input_name('options'), 'value' => $options, 'rows' => '7', 'cols' => '40', 'style' => 'width:75%')));
// -------------------------------------
// Build setting: multiple?
// -------------------------------------
$multiple = $this->get_setting('multiple', $var_settings);
$r[] = array($this->setting_label(lang('allow_multiple_items')), '<label class="low-checkbox">' . form_checkbox($this->input_name('multiple'), 'y', $multiple == 'y', 'class="low-allow-multiple"') . lang('allow_multiple_items_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,代码行数:38,代码来源:vt.low_select.php
示例9: form_output
/**
* Output form input
*
* @param array
* @param array
* @return string
*/
public function form_output($data)
{
$options['name'] = $data['form_slug'];
$options['id'] = $data['form_slug'];
$options['value'] = $data['value'];
return form_textarea($options);
}
开发者ID:gamchantoi,项目名称:sisfo-ft,代码行数:14,代码来源:field.textarea.php
示例10: form_fckeditor
function form_fckeditor($data = '', $value = '', $extra = '')
{
$CI =& get_instance();
$fckeditor_basepath = $CI->config->item('fckeditor_basepath');
require_once $_SERVER["DOCUMENT_ROOT"] . '/' . $fckeditor_basepath . 'fckeditor.php';
$instanceName = is_array($data) && isset($data['name']) ? $data['name'] : $data;
$fckeditor = new FCKeditor($instanceName);
if ($fckeditor->IsCompatible()) {
$fckeditor->Value = html_entity_decode($value);
$fckeditor->BasePath = $fckeditor_basepath;
if ($fckeditor_toolbarset = $CI->config->item('fckeditor_toolbarset_default')) {
$fckeditor->ToolbarSet = $fckeditor_toolbarset;
}
if (is_array($data)) {
if (isset($data['value'])) {
$fckeditor->Value = html_entity_decode($data['value']);
}
if (isset($data['basepath'])) {
$fckeditor->BasePath = $data['basepath'];
}
if (isset($data['toolbarset'])) {
$fckeditor->ToolbarSet = $data['toolbarset'];
}
if (isset($data['width'])) {
$fckeditor->Width = $data['width'];
}
if (isset($data['height'])) {
$fckeditor->Height = $data['height'];
}
}
return $fckeditor->CreateHtml();
} else {
return form_textarea($data, $value, $extra);
}
}
开发者ID:abosmond,项目名称:simanis,代码行数:35,代码来源:MY_form_helper.php
示例11: display_field
function display_field($data)
{
// Set a boolean telling if we're in Grid AND this textarea has
// markItUp enabled
$grid_markitup = $this->content_type() == 'grid' && isset($this->settings['show_formatting_buttons']) && $this->settings['show_formatting_buttons'] == 1;
if ($grid_markitup) {
// Load the Grid cell display binding only once
if (!ee()->session->cache(__CLASS__, 'grid_js_loaded')) {
ee()->javascript->output('
Grid.bind("textarea", "display", function(cell)
{
var textarea = $("textarea.markItUp", cell);
// Only apply file browser trigger if a field was found
if (textarea.size())
{
textarea.markItUp(mySettings);
EE.publish.file_browser.textarea(cell);
}
});
');
ee()->session->set_cache(__CLASS__, 'grid_js_loaded', TRUE);
}
}
return form_textarea(array('name' => $this->name(), 'value' => $data, 'rows' => $this->settings['field_ta_rows'], 'dir' => $this->settings['field_text_direction'], 'class' => $grid_markitup ? 'markItUp' : ''));
}
开发者ID:kentonquatman,项目名称:iofa,代码行数:26,代码来源:ft.textarea.php
示例12: test_form_textarea
public function test_form_textarea()
{
$expected = <<<EOH
<textarea name="notes" cols="40" rows="10" >Notes</textarea>
EOH;
$this->assertEquals($expected, form_textarea('notes', 'Notes'));
}
开发者ID:rishikeshwalawalkar,项目名称:GetARide,代码行数:8,代码来源:form_helper_test.php
示例13: ShiftType_edit_view
function ShiftType_edit_view($name, $angeltype_id, $angeltypes, $description, $shifttype_id)
{
$angeltypes_select = ['' => _('All')];
foreach ($angeltypes as $angeltype) {
$angeltypes_select[$angeltype['id']] = $angeltype['name'];
}
return page_with_title($shifttype_id ? _('Edit shifttype') : _('Create shifttype'), [msg(), buttons([button(page_link_to('shifttypes'), shifttypes_title(), 'back')]), form([form_text('name', _('Name'), $name), form_select('angeltype_id', _('Angeltype'), $angeltypes_select, $angeltype_id), form_textarea('description', _('Description'), $description), form_info('', _('Please use markdown for the description.')), form_submit('submit', _('Save'))])]);
}
开发者ID:max-weller,项目名称:engelsystem,代码行数:8,代码来源:ShiftTypes_view.php
示例14: ShiftEntry_edit_view
/**
* Display form for adding/editing a shift entry.
* @param string $angel
* @param string $date
* @param string $location
* @param string $title
* @param string $type
* @param string $comment
*
* @return string
*/
function ShiftEntry_edit_view($angel, $date, $location, $title, $type, $comment, $freeloaded, $freeload_comment, $user_admin_shifts = false)
{
if ($user_admin_shifts) {
$freeload_form = array(form_checkbox('freeloaded', _("Freeloaded"), $freeloaded), form_textarea('freeload_comment', _("Freeload comment (Only for shift coordination):"), $freeload_comment));
} else {
$freeload_form = array();
}
return page_with_title(_("Edit shift entry"), array(form(array(form_info(_("Angel:"), $angel), form_info(_("Date, Duration:"), $date), form_info(_("Location:"), $location), form_info(_("Title:"), $title), form_info(_("Type:"), $type), form_textarea('comment', _("Comment (for your eyes only):"), $comment), join("", $freeload_form), form_submit('submit', _("Save"))))));
}
开发者ID:max-weller,项目名称:engelsystem,代码行数:20,代码来源:ShiftEntry_view.php
示例15: bsText
function bsText($title, $name, $value = '', $rows = 0, $cols = 0)
{
$cols = $cols == 0 ? 60 : $cols;
$rows = $rows == 0 ? 3 : $rows;
$data = array('name' => $name, 'id' => 'input_' . $name, 'value' => $value, 'class' => 'form-control', 'rows' => $rows, 'cols' => $cols);
$inp = form_textarea($data);
$str = '<div class="form-group">
<label for="input_' . $name . '">' . $title . '</label>' . $inp . '</div>';
return $str;
}
开发者ID:nmadipati,项目名称:secure,代码行数:10,代码来源:formtable_helper.php
示例16: rss_get_widget_form
function rss_get_widget_form($num = 1)
{
$widget = 'rss_get_widget_' . $num;
// имя для формы и опций = виджет + номер
// получаем опции
$options = mso_get_option($widget, 'plugins', array());
if (!isset($options['header'])) {
$options['header'] = t('RSS', 'plugins');
}
if (!isset($options['url'])) {
$options['url'] = 'http://www.google.com/search?q="MaxSite%20CMS"&hl=ru&client=news&tbm=blg&output=rss';
}
if (!isset($options['count'])) {
$options['count'] = 5;
}
if (!isset($options['time_cache'])) {
$options['time_cache'] = 180;
}
if (!isset($options['max_word_description'])) {
$options['max_word_description'] = '40';
}
if (!isset($options['format'])) {
$options['format'] = '<p><a rel="nofollow" target="_blank" href="[link]">[link-host]</a><br><em>[title]</em><br>[dc:date]</p>';
}
if (!isset($options['format_date'])) {
$options['format_date'] = 'd/m/Y H:i';
}
if (!isset($options['footer'])) {
$options['footer'] = '';
}
if (!isset($options['fields'])) {
$options['fields'] = 'title link description dc:date';
}
if (!isset($options['fields_items'])) {
$options['fields_items'] = 'items';
}
if (!isset($options['charset'])) {
$options['charset'] = 'UTF-8';
}
// вывод самой формы
$CI =& get_instance();
$CI->load->helper('form');
$form = mso_widget_create_form(t('Заголовок'), form_input(array('name' => $widget . 'header', 'value' => $options['header'])), '');
$form .= mso_widget_create_form(t('Адрес'), form_input(array('name' => $widget . 'url', 'value' => $options['url'])), '');
$form .= mso_widget_create_form(t('Количество записей'), form_input(array('name' => $widget . 'count', 'value' => $options['count'])), '');
$form .= mso_widget_create_form(t('Поля RSS'), form_input(array('name' => $widget . 'fields', 'value' => $options['fields'])), 'Поля, по которым будет строится формат вывода в виде [поле] или для вложенных [поле:субполе]');
$form .= mso_widget_create_form(t('Поле с записями'), form_input(array('name' => $widget . 'fields_items', 'value' => $options['fields_items'])), 'Обычно items');
$form .= mso_widget_create_form(t('Формат вывода'), form_textarea(array('name' => $widget . 'format', 'value' => $options['format'])), '');
$form .= mso_widget_create_form(t('Формат даты'), form_input(array('name' => $widget . 'format_date', 'value' => $options['format_date'])), '');
$form .= mso_widget_create_form(t('Количество слов'), form_input(array('name' => $widget . 'max_word_description', 'value' => $options['max_word_description'])), '');
$form .= mso_widget_create_form(t('Текст в конце блока'), form_textarea(array('name' => $widget . 'footer', 'value' => $options['footer'])), '');
$form .= mso_widget_create_form(t('Время кэша (минуты)'), form_input(array('name' => $widget . 'time_cache', 'value' => $options['time_cache'])), '');
$form .= mso_widget_create_form(t('Кодировка RSS'), form_input(array('name' => $widget . 'charset', 'value' => $options['charset'])), '');
return $form;
}
开发者ID:Kmartynov,项目名称:cms,代码行数:55,代码来源:index.php
示例17: form_textarea_and_label
function form_textarea_and_label($name, $value = '', $label = '', $extra = '', $div = 'pure-control-group')
{
$label = empty($label) ? lang($name) : $label;
$extra = $extra . ' placeholder="' . $label . '" id="' . $name . '"';
$value = $value || $value == 0 ? $value : '';
$div_start = empty($div) ? '' : '<div class="' . $div . '">';
$label = form_label($label, $name);
$error_box = form_error($name);
$input = form_textarea($name, set_value($name, $value), $extra . ' rows="5" cols="75"');
$div_end = empty($div) ? '' : '</div>';
return $div_start . $label . $input . $error_box . $div_end;
}
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:12,代码来源:MY_form_helper.php
示例18: smarty_function_textarea
function smarty_function_textarea($params, $template)
{
$CI =& get_instance();
$attr = get_attr($params, $template);
$value = $attr['value'];
if (isset($template->block_data)) {
$f = $template->block_data;
}
if ($f->state == 'readonly') {
return create_tag('div', array('class' => array('form-element', 'textarea', 'readonly')), array(), $value);
}
return form_textarea($attr, $value);
}
开发者ID:zhaoshengloveqingqing,项目名称:Ci,代码行数:13,代码来源:function.textarea.php
示例19: generate
public function generate($data, $value = "")
{
// variavel de config para achar a base do site, usado no kcfinder
if ($this->ci->config->item('assets.js_opener') == "\$(document).ready(function(){\n") {
Assets::add_js("});var site_url = '" . base_url() . "'; \$(document).ready(function(){", "inline", true);
} else {
Assets::add_js("var site_url = '" . base_url() . "'; ", "inline", true);
}
$value = empty($value) ? isset($data['value']) ? $data['value'] : "" : $value;
Assets::add_js("../plugins/ckeditor/ckeditor.js");
$data["class"] = "ckeditor";
return form_textarea($data, $value);
}
开发者ID:caina,项目名称:pando,代码行数:13,代码来源:ckeditor.php
示例20: form_output
/**
* Output form input
*
* @param array
* @param array
* @return string
*/
public function form_output($data)
{
// Set editor type
if (isset($data['custom']['editor_type'])) {
$options['class'] = 'wysiwyg-' . $data['custom']['editor_type'];
} else {
$options['class'] = 'wysiwyg-simple';
}
$options['name'] = $data['form_slug'];
$options['id'] = $data['form_slug'];
$options['value'] = html_entity_decode($data['value'], null, 'UTF-8');
return form_textarea($options);
}
开发者ID:rishikeshwalawalkar,项目名称:GetARide,代码行数:20,代码来源:field.wysiwyg.php
注:本文中的form_textarea函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论