本文整理汇总了PHP中textarea_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP textarea_tag函数的具体用法?PHP textarea_tag怎么用?PHP textarea_tag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了textarea_tag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
$metaTitle = $this->metatag != null ? $this->metatag->getMetaTitle() : '';
$metaKeywords = $this->metatag != null ? $this->metatag->getMetaKeywords() : '';
$metaDescription = $this->metatag != null ? $this->metatag->getMetaDescription() : '';
return sprintf($this->skeleton, label_for('meta_title', __('Title:')), input_tag('w3s_meta_title', $metaTitle, 'size=34'), label_for('meta_meta_keywords', __('Keywords:')), textarea_tag('w3s_meta_keywords', $metaKeywords, 'size=31x10'), label_for('meta_meta_description', __('Description:')), textarea_tag('w3s_meta_description', $metaDescription, 'size=31x10'), link_to_function(__('Store metatags'), 'currentTab.save()', 'class="link_button"'));
}
示例2: object_textarea_tag
/**
* Returns a textarea html tag.
*
* @param object $object An object.
* @param string $method An object column.
* @param array $options Textarea options.
* @param string $default_value Textarea default value.
*
* @return string An html string which represents a textarea tag.
*
*/
function object_textarea_tag($object, $method, $options = array(), $default_value = null)
{
$options = _parse_attributes($options);
$value = _get_object_value($object, $method, $default_value);
return textarea_tag(_convert_method_to_name($method, $options), $value, $options);
}
示例3: getSlotEditor
public function getSlotEditor($slot)
{
$options = array('size' => '80x10', 'id' => 'edit_textarea' . $slot->getName(), 'tinymce_options' => sfConfig::get('app_sfSimpleCMS_tinymce_options', 'width: "100%"'));
$script = '';
if (sfConfig::get('app_sfSimpleCMS_rich_editing', false)) {
sfLoader::loadHelpers(array('Javascript'));
sfContext::getInstance()->getResponse()->addJavascript('/sfSimpleCMSPlugin/js/tiny_mce_AJAX.js', 'last');
$script = javascript_tag('setTextareaToTinyMCE("edit_textarea' . $slot->getName() . '");');
$options['rich'] = 'TinyMCE';
}
return $script . textarea_tag('slot_content', $slot->getValue(), $options);
}
示例4: input
function input($tag, $content, $data, $attributes)
{
$name = $attributes["name"];
$valueKey = $attributes["value"];
//(array_key_exists("value",$attributes)) ? $data->get($attributes["value"]) : "";
$value = TemplateLogic::content($valueKey, $data);
$options = Options::parse($attributes["options"]);
$validate = array_key_exists("validate", $attributes) ? $attributes["validate"] : false;
if ($validate) {
if (array_key_exists("class", $options)) {
$options["class"] = "validate(" . $validate . ") " . $options["class"];
} else {
$options["class"] = "validate(" . $validate . ")";
}
}
//$attributes["validate"];
//var_dump($validate);
switch ($tag) {
case "check":
$checked = array_key_exists("checked", $attributes) && $value == TemplateLogic::content($attributes["checked"], $data);
$result = check_tag($name, $value, $checked, $options);
break;
case "text":
$result = textarea_tag($name, $value, $options);
break;
case "file":
$result = filefield_tag($name, $options);
break;
case "field":
$result = textfield_tag($name, $value, $options);
break;
case "radio":
$checked = array_key_exists("checked", $attributes) && $value == TemplateLogic::content($attributes["checked"], $data);
$result = radio_tag($name, $value, $checked, $options);
break;
case "pass":
$result = password_tag($name, $value, $options);
break;
case "option":
$selected = $data->get("selected") == $value;
$result = option_tag($name, $value, $selected);
break;
case "hidden":
$result = hidden_tag($name, $value, $options);
break;
}
return $result;
}
示例5: form_error
<?php
}
?>
<?php
}
?>
<?php
echo form_error('body');
?>
<?php
echo label_for('body', __('Body', null, 'sfSimpleForum'));
?>
<?php
echo textarea_tag('body', '', 'id=topic_body');
?>
<?php
if (!isset($topic) && $sf_user->hasCredential('moderator')) {
?>
<div class="option">
<?php
echo checkbox_tag('is_sticked', '1');
?>
<?php
echo label_for('is_sticked', __('Sticked topic', null, 'sfSimpleForum'));
?>
</div>
<div class="option">
<?php
示例6: image_tag
?>
" alt="captcha" /></p>
<?php
}
?>
<p><?php
echo image_tag('star.png', array('alt' => '*'));
?>
i campi contrassegnati da asterisco sono obbligatori</p>
<?php
echo form_error('text');
?>
<p><label for="text">scrivi qui sotto il tuo commento</label><br/>
<?php
echo textarea_tag('text', $sf_request->hasErrors() ? $sf_params->get('text') : '', 'id=comment_text size=60x10');
?>
</p>
<p><?php
echo image_tag('arrow_mid.png', array('alt' => '>', 'align' => 'absmiddle'));
echo submit_tag('INVIA', array('class' => 'btn-submit'));
?>
</p>
</form>
<?php
if (sfConfig::get('app_comments_use_ajax', true)) {
?>
<script type="text/javascript" language="javascript">
示例7: getSlotEditor
public function getSlotEditor($slot)
{
return textarea_tag('slot_content', $slot->getValue(), 'size=80x10 id=edit_textarea' . $slot->getName());
}
示例8: setcookie
setcookie("redirection", "", time() - 3600, "/", sfConfig::get('app_cookies_domain'));
$_COOKIE["redirection"] = "";
?>
<?php
} else {
?>
<input name="thread_title" id="thread_title" value="" size="30" type="text" style="color:#000000">
<?php
}
?>
<h1 class="info" style="font-size:16px; font-weight:normal; margin:25px 0 15px 0">Question Full Description:</h1>
<?php
echo textarea_tag('post_body', '', array('size' => '60x35', 'rich' => 'fck'));
?>
</div>
<!--content-info-->
</div>
<div class="spacer"></div>
<div class="bottom"></div>
<input type="submit" name="Post" class="question-post">
<!-- <a class="question-post" href="#">post</a>-->
</div>
<div class="spacer"></div>
</div>
<div class="body-side">
<div class="box">
示例9: renderFormFieldByType
public static function renderFormFieldByType($f, $values)
{
$value = isset($values[$f['id']]) ? $values[$f['id']] : '';
$attributes = array();
switch ($f['type']) {
case 'file':
$html = '';
if ($value > 0) {
if ($a = Doctrine_Core::getTable('Attachments')->find($value)) {
$html = '<br>' . Attachments::getLink($a) . input_hidden_tag('extra_fields_files[' . $f['id'] . ']', $value) . '<br>' . input_checkbox_tag('extra_fields_files_delete[' . $f['id'] . ']', $value) . ' <label for="extra_fields_files_delete_' . $f['id'] . '">' . __('Delete') . '</label>';
$attributes['class'] = '';
}
}
return input_file_tag('extra_fields[' . $f['id'] . ']', '', $attributes) . $html;
break;
case 'number':
return input_tag('extra_fields[' . $f['id'] . ']', $value, $attributes);
break;
case 'text':
case 'url':
$attributes['size'] = '40';
return input_tag('extra_fields[' . $f['id'] . ']', $value, $attributes);
break;
case 'textarea':
return textarea_tag('extra_fields[' . $f['id'] . ']', $value, $attributes);
break;
case 'textarea_wysiwyg':
if (isset($attributes['class'])) {
$attributes['class'] .= ' editor';
} else {
$attributes['class'] = 'editor';
}
return textarea_tag('extra_fields[' . $f['id'] . ']', $value, $attributes);
break;
case 'date':
if (isset($attributes['class'])) {
$attributes['class'] .= ' datepicker';
} else {
$attributes['class'] = 'datepicker';
}
$attributes['size'] = '11';
return input_tag('extra_fields[' . $f['id'] . ']', $value, $attributes);
break;
case 'date_range':
if (isset($attributes['class'])) {
$attributes['class'] .= ' datepicker';
} else {
$attributes['class'] = 'datepicker';
}
$attributes['size'] = '11';
if (strlen($value) > 0) {
$value = explode('|', $value);
} else {
$value = array('', '');
}
return __('From') . ': ' . input_tag('extra_fields[' . $f['id'] . '][from]', $value[0], $attributes) . ' ' . __('To') . ': ' . input_tag('extra_fields[' . $f['id'] . '][to]', $value[1], $attributes);
break;
case 'date_time':
if (isset($attributes['class'])) {
$attributes['class'] .= ' datetimepicker';
} else {
$attributes['class'] = 'datetimepicker';
}
$attributes['size'] = '17';
return input_tag('extra_fields[' . $f['id'] . ']', $value, $attributes);
break;
case 'date_dropdown':
$years = range(date('Y') - 100, date('Y') + 20);
$w = new sfWidgetFormDate(array('years' => array_combine($years, $years), 'format' => __('Year') . ':%year% ' . __('Month') . ':%month% ' . __('Day') . ':%day%'));
return $w->render('extra_fields[' . $f['id'] . ']', $value, $attributes);
break;
case 'pull_down':
$choices = array();
foreach (explode("\n", $f['default_values']) as $v) {
$choices[trim($v)] = trim($v);
}
return select_tag('extra_fields[' . $f['id'] . ']', $value, array('choices' => $choices), $attributes);
break;
case 'checkbox':
$choices = array();
foreach (explode("\n", $f['default_values']) as $v) {
$choices[trim($v)] = trim($v);
}
return '<div id="checkboxesList' . $f['id'] . '" class="checkboxesList">' . select_tag('extra_fields[' . $f['id'] . ']', explode("\n", $value), array('choices' => $choices, 'expanded' => true, 'multiple' => true), $attributes) . '</div>';
break;
case 'radiobox':
$choices = array();
foreach (explode("\n", $f['default_values']) as $v) {
$choices[trim($v)] = trim($v);
}
return select_tag('extra_fields[' . $f['id'] . ']', $value, array('choices' => $choices, 'expanded' => true), $attributes);
break;
}
}
示例10: array
$t->like(textarea_tag('name[]', 'content', array('rich' => true, 'id' => 'test')), '/elements: "test",/', 'textarea_tag() can create a rich textarea tag based on tinyMCE using correct id');
class sfRichTextEditorSample extends sfRichTextEditor
{
public function toHTML()
{
return 'fake editor';
}
}
$t->like(textarea_tag('name', 'content', array('rich' => 'Sample')), '/fake editor/', 'textarea_tag() can create a rich textarea tag based on a custom editor');
sfConfig::set('sf_rich_text_editor_class', 'Sample');
$t->like(textarea_tag('name', 'content', array('rich' => true)), '/fake editor/', 'textarea_tag() can be configured to change the default editor by configuration');
class sfRichTextEditorSampleBis
{
}
try {
textarea_tag('name', 'content', array('rich' => 'SampleBis'));
$t->fail('textarea_tag() custom editor must extends sfRichTextEditor');
} catch (sfConfigurationException $e) {
$t->pass('textarea_tag() custom editor must extends sfRichTextEditor');
}
// checkbox_tag()
$t->diag('checkbox_tag()');
$t->is(checkbox_tag('name'), '<input type="checkbox" name="name" id="name" value="1" />', 'checkbox_tag() takes a name as its first argument');
$t->is(checkbox_tag('name', 'foo'), '<input type="checkbox" name="name" id="name" value="foo" />', 'checkbox_tag() takes a value as its second argument');
$t->is(checkbox_tag('name', null, true), '<input type="checkbox" name="name" id="name" value="" checked="checked" />', 'checkbox_tag() takes a boolean as its third argument');
// options
$t->is(checkbox_tag('name', null, false, array('class' => 'foo')), '<input type="checkbox" name="name" id="name" value="" class="foo" />', 'checkbox_tag() takes an array of attribute options as its fourth argument');
$t->is(checkbox_tag('name', null, false, array('id' => 'foo')), '<input type="checkbox" name="name" id="foo" value="" />', 'checkbox_tag() can override the "id" attribute');
// radiobutton_tag()
$t->diag('radiobutton_tag()');
$t->is(radiobutton_tag('name', 1), '<input type="radio" name="name" id="name_1" value="1" />', 'radiobutton_tag() takes a name as its first argument');
示例11: form_error
?>
form-error<?php
}
?>
">
<?php
if ($sf_request->hasError('parametro{cadena1}')) {
?>
<?php
echo form_error('parametro{cadena1}', array('class' => 'form-error-msg'));
?>
<?php
}
?>
<?php
$value = textarea_tag('parametro[cadena1]', $parametro->getCadena1(), array('size' => "30x3"));
echo $value ? $value : ' ';
?>
</div>
</div>
<?php
}
?>
<?php
// ###### FICHERO #######################################################
if ($parametro_def->getCampoFichero() != "") {
?>
<div class="form-row">
<?php
echo label_for('parametro[fichero]', $parametro_def->getCampoFichero(), 'class="" ');
示例12: textarea_tag
<?php
echo $name;
?>
<br />
<?php
}
?>
<br />
Enter any additional names below, one per line, that weren't identified from the page:
<br />
<br />
<?php
echo textarea_tag('manual_names', $sf_request->getParameter('manual_names'), 'size=60x8');
?>
<br />
<br />
<!-- ADD RELATIONSHIPS -->
<?php
} else {
?>
示例13: label_for
if ($sf_request->hasError('regarding')) {
echo '<span class="form-error">' . $sf_request->getError('regarding') . '</span>';
}
?>
<br />
<?php
echo label_for('regarding', 'What area would you like us to help with?'), input_tag('regarding', '', array());
?>
<?php
if ($sf_request->hasError('details')) {
echo '<span class="form-error">' . $sf_request->getError('details') . '</span>';
}
?>
<br />
<?php
echo label_for('details', 'Describe your question in depth'), textarea_tag('details');
?>
<?php
if ($sf_request->hasError('party')) {
echo '<span class="form-error">' . $sf_request->getError('party') . '</span>';
}
?>
<br />
<?php
echo label_for('party', 'Who would you like to give you assistance?'), select_tag('party', options_for_select(array(sfConfig::get('app_project_application_advice_public') => 'The Cothink community (Public, access to huge group of experts)', sfConfig::get('app_project_application_advice_cothink') => 'Cothink staff (highly confidential, takes longer)'), sfConfig::get('app_project_application_advice_public')));
?>
<?php
echo submit_tag('Submit for community help', array());
?>
示例14: backend_textarea
function backend_textarea($name, $input = null, $options = array(), $methode = null)
{
$code = getDivLabel($options, $name);
$isAdmin = 0;
$user = sfContext::getInstance()->getUser()->getSubscriber();
if ($user && $user->getType() == 'admin') {
$isAdmin = 1;
}
if ($options['richtext']) {
$options['id'] = 'richtext_' . $name;
$options['onclick'] = 'selectElement(this, ' . $isAdmin . '); ' . $options['onclick'];
}
if ($options['validate']) {
$errSpan = "<span id='" . $name . "Error'></span>";
}
$code .= textarea_tag($name, getVal($input, $methode, $name), clearOptions($options));
$code .= $errSpan;
return $code;
}
示例15: checkbox_tag
echo checkbox_tag('network_ids[]', $network['id'], $isChecked);
?>
<?php
echo $network['name'];
?>
<br />
<?php
}
?>
<br />
<?php
}
?>
<?php
echo textarea_tag('note[body]', $sf_request->getParameter('note[body]', $initialValue), 'id=note-body');
?>
<?php
echo submit_tag('Post');
?>
<?php
echo checkbox_tag('note[is_private]', true, isset($private) && $private);
?>
Private
<span class="form_help">(private notes can only be seen by you and alerted analysts)</span>
</div>