本文整理汇总了PHP中form::textarea方法的典型用法代码示例。如果您正苦于以下问题:PHP form::textarea方法的具体用法?PHP form::textarea怎么用?PHP form::textarea使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类form
的用法示例。
在下文中一共展示了form::textarea方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: meta_acpt_slide_options
function meta_acpt_slide_options()
{
$form = new form('slide', null);
$form->image('image', array('label' => 'Image URL', 'help' => 'Upload an Image that is 940px by 350px for best results', 'button' => 'Add Your Slide'));
$form->text('headline', array('label' => 'Headline'));
$form->textarea('description', array('label' => 'Description'));
$form->select('showText', array('Yes', 'No'), array('label' => 'Show Headline and Description'));
}
示例2: render
public function render(&$upload, $errors = array())
{
// Load base template and attributes
$result = parent::render($render_variables, $errors);
$result['template']->element = form::textarea($result['attributes'], $this->value);
// Return the resulting output
return (string) $result['template']->render();
}
示例3: meta_custom
function meta_custom()
{
$form = new form('details', null);
$form->text('name', array('label' => 'Text Field'));
$form->image('image', array('label' => 'Image Field', 'button' => 'Add Your Image'));
$form->file('file', array('label' => 'File Field', 'button' => 'Select a File'));
$form->textarea('address', array('label' => 'Textarea', 'validate' => 'html'));
$form->select('rooms', array('one', 'two', 'three'), array('label' => 'Select List'));
$form->radio('baths', array('blue', 'green', 'red'), array('label' => 'Radio Buttons'));
$form->editor('baths', 'WYSIWYG Editor');
}
示例4: edit
public function edit($url)
{
$display_name = ucwords(str_replace('_', ' ', $url));
$this->__set_heading("Editing Theme file - " . $display_name);
$view = new View('zest/content');
$content = form::open('admin/snippets/save/' . $url);
$html = zest::template_to_html(THEME_PATH . $url);
$content .= form::label('content', 'Code');
$content .= '<p><small>This is only for advanced users. To edit <a onclick="$(\'#content\').toggle();return false;" href="#">click here</a></small></p>';
$content .= form::textarea('content', $html, 'id="content" class="fullWidth no-editor hside"');
$content .= form::submit('submit', 'Save', 'class="submit"');
$content .= form::close();
$view->content = $content;
$this->__set_content($view);
}
示例5: gui
public function gui($url)
{
$bls = $this->getServers();
if (isset($_POST['bls'])) {
try {
$this->core->blog->settings->setNameSpace('antispam');
$this->core->blog->settings->put('antispam_dnsbls', $_POST['bls'], 'string', 'Antispam DNSBL servers', true, false);
http::redirect($url . '&upd=1');
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
/* DISPLAY
---------------------------------------------- */
$res = '';
$res .= '<form action="' . html::escapeURL($url) . '" method="post">' . '<fieldset><legend>' . __('IP Lookup servers') . '</legend>' . '<p>' . __('Add here a coma separated list of servers.') . '</p>' . '<p>' . form::textarea('bls', 40, 3, html::escapeHTML($bls), 'maximal') . '</p>' . '<p><input type="submit" value="' . __('Save') . '" />' . $this->core->formNonce() . '</p>' . '</fieldset>' . '</form>';
return $res;
}
示例6: getHtmlField
public function getHtmlField($aPostedData)
{
$return = '';
switch ($this->type) {
# Champ texte
default:
case 1:
$return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::text($this->html_id, 60, 255, $aPostedData[$this->id]) . '</p>';
break;
# Zone de texte
# Zone de texte
case 2:
$return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::textarea($this->html_id, 58, 10, $aPostedData[$this->id]) . '</p>';
break;
# Menu déroulant
# Menu déroulant
case 3:
$values = array_filter((array) unserialize($this->value));
$return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::select($this->html_id, array_flip($values), $aPostedData[$this->id]) . '</p>';
break;
# Boutons radio
# Boutons radio
case 4:
$values = array_filter((array) unserialize($this->value));
$str = '';
foreach ($values as $k => $v) {
$str .= '<li><label>' . form::radio(array($this->html_id, $this->html_id . '_' . $k), $k, $k == $aPostedData[$this->id]) . html::escapeHTML($v) . '</label></li>';
}
$return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<span class="fake-label">' . html::escapeHTML($this->title) . '</span></p>' . '<ul class="checklist">' . $str . '</ul>';
break;
# Cases à cocher
# Cases à cocher
case 5:
$values = array_filter((array) unserialize($this->value));
$str = '';
foreach ($values as $k => $v) {
$str .= '<li><label>' . form::checkbox(array($this->html_id . '[' . $k . ']', $this->html_id . '_' . $k), $k, in_array($k, $aPostedData[$this->id])) . html::escapeHTML($v) . '</label></li>';
}
$return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<span class="fake-label">' . html::escapeHTML($this->title) . '</span></p>' . '<ul class="checklist">' . $str . '</ul>';
break;
}
return $return;
}
示例7: gui
public function gui($url)
{
$bls = $this->getServers();
if (isset($_POST['bls'])) {
try {
$this->core->blog->settings->addNamespace('antispam');
$this->core->blog->settings->antispam->put('antispam_dnsbls', $_POST['bls'], 'string', 'Antispam DNSBL servers', true, false);
dcPage::addSuccessNotice(__('The list of DNSBL servers has been succesfully updated.'));
http::redirect($url);
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
/* DISPLAY
---------------------------------------------- */
$res = dcPage::notices();
$res .= '<form action="' . html::escapeURL($url) . '" method="post" class="fieldset">' . '<h3>' . __('IP Lookup servers') . '</h3>' . '<p><label for="bls">' . __('Add here a coma separated list of servers.') . '</label>' . form::textarea('bls', 40, 3, html::escapeHTML($bls), 'maximal') . '</p>' . '<p><input type="submit" value="' . __('Save') . '" />' . $this->core->formNonce() . '</p>' . '</form>';
return $res;
}
示例8: foreach
echo "<fieldset>";
foreach (array('gname', 'sname', 'badge', 'dob', 'email', 'phone', 'cell', 'city', 'prov', 'econtact', 'ephone') as $field) {
if (!@$fields[$field]) {
continue;
}
echo new View('global/_form_field', array('field' => $field, 'fieldData' => $fields[$field], 'value' => $form[$field], 'hasError' => isset($errors[$field]) && $errors[$field]));
}
echo '</fieldset>';
echo '<h1>' . HTML::chars(__('convention.registration_select_pass_header')) . '</h1>';
echo '<p>' . HTML::chars(__('convention.registration_select_pass_desc')) . '</p>';
echo '<fieldset>';
$field = 'pass_id';
echo new View('global/_form_field', array('field' => $field, 'fieldData' => $fields[$field], 'value' => $form[$field], 'hasError' => isset($errors[$field]) && $errors[$field]));
echo '</fieldset>';
echo '<h1>' . HTML::chars(__('convention.registration_tac_header')) . '</h1>';
echo '<p>' . HTML::chars(__('convention.registration_tac_desc')) . '</p>';
echo '<fieldset>';
echo form::textarea('agree_toc', __('convention.registration_tac'), array('rows' => 15, 'style' => 'width:95%; margin-left: 2%;'));
$field = 'agree_toc';
$fields[$field]['type'] = 'boolean';
$fields[$field]['required'] = true;
if (!isset($form[$field])) {
$form[$field] = 0;
}
echo new View('global/_form_field', array('field' => $field, 'fieldData' => $fields[$field], 'value' => $form[$field], 'hasError' => isset($errors[$field]) && $errors[$field]));
echo '</fieldset>';
echo "<fieldset class='left'>";
echo form::submit(null, __('convention.registration_submit'));
echo '</fieldset>';
echo form::close();
echo '</div>';
示例9: _editor
private function _editor($blog)
{
if ($blog->validate($_POST)) {
$blog->user_id = $this->a2->get_user()->id;
$blog->save();
return $this->index();
}
//show form
echo form::open();
echo 'text:' . form::textarea('text', $blog->text) . '<br>';
echo form::submit(array('value' => 'post'));
echo form::close();
}
示例10:
Advogado:<br>
<?php
echo form::dropdown('advogado_id', $advogados, $procedimento->advogado_id);
?>
</div>
<div class="grid_6 omega">
Tipo de procedimento:<br>
<?php
echo form::dropdown('tipo_procedimento_id', $tipo_procedimentos, $procedimento->tipo_procedimento_id);
?>
</div>
<div class="clear"></div>
<div class="grid_12 omega alpha">
Observações:<br>
<?php
echo form::textarea(array('id' => 'observacoes', 'name' => 'observacoes', 'rows' => '5'), $procedimento->observacoes);
?>
</div>
<div class="clear"></div>
<div class="grid_10 alpha">
</div>
<div class="grid_2 omega">
<br>
<?php
echo form::submit('btn_save', 'Gravar');
?>
</div>
<?php
echo form::close();
示例11: htmlspecialchars
:</a></h4>
<?php
echo form::input('action_email_subject', '');
?>
</div>
<div class="tab_form_item" id="action_form_email_body" style="margin-right:75px;">
<h4><a href="#" class="tooltip" title="<?php
echo htmlspecialchars(Kohana::lang("tooltips.actions.email_body"));
?>
"><?php
echo Kohana::lang('ui_admin.body');
?>
:</a></h4>
<?php
echo form::textarea('action_email_body', '');
?>
</div>
<div class="tab_form_item" id="action_form_add_category" style="margin-right:75px;">
<h4><a href="#" class="tooltip" title="<?php
echo htmlspecialchars(Kohana::lang("tooltips.actions.add_to_category"));
?>
"><?php
echo Kohana::lang('ui_admin.add_to_category');
?>
:</a></h4>
<?php
// categories, selected_categories, form field name, number of columns
echo category::tree($categories, FALSE, array(), 'action_add_category', 2);
?>
示例12: isset
echo form::text(array('p_name_seo[' . $aLanguage['code'] . ']', 'p_name_seo_' . $aLanguage['code']), 60, 255, isset($okt->partners->config->name_seo[$aLanguage['code']]) ? html::escapeHTML($okt->partners->config->name_seo[$aLanguage['code']]) : '');
?>
</p>
<p class="field" lang="<?php
echo $aLanguage['code'];
?>
"><label for="p_meta_keywords_<?php
echo $aLanguage['code'];
?>
"><?php
$okt->languages->unique ? _e('c_c_seo_meta_keywords') : printf(__('c_c_seo_meta_keywords_in_%s'), html::escapeHTML($aLanguage['title']));
?>
<span class="lang-switcher-buttons"></span></label>
<?php
echo form::textarea(array('p_meta_keywords[' . $aLanguage['code'] . ']', 'p_meta_keywords_' . $aLanguage['code']), 57, 5, isset($okt->partners->config->meta_keywords[$aLanguage['code']]) ? html::escapeHTML($okt->partners->config->meta_keywords[$aLanguage['code']]) : '');
?>
</p>
<?php
}
?>
</fieldset>
<fieldset>
<legend><?php
_e('c_c_seo_schema_url');
?>
</legend>
示例13: catch
$core->blog->delComment($comment_id);
http::redirect($core->getPostAdminURL($rs->post_type, $rs->post_id) . '&co=1#c' . $comment_id, false);
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
}
if (!$can_edit) {
$core->error->add(__("You can't edit this comment."));
}
}
/* DISPLAY
-------------------------------------------------------- */
dcPage::open(__('Edit comment'), dcPage::jsConfirmClose('comment-form') . dcPage::jsToolBar() . dcPage::jsLoad('js/_comment.js'));
if ($comment_id) {
if (!empty($_GET['upd'])) {
echo '<p class="message">' . __('Comment has been successfully updated.') . '</p>';
}
$comment_mailto = '';
if ($comment_email) {
$comment_mailto = '<a href="mailto:' . html::escapeHTML($comment_email) . '?subject=' . rawurlencode(sprintf(__('Your comment on my blog %s'), $core->blog->name)) . '&body=' . rawurlencode(sprintf(__("Hi!\n\nYou wrote a comment on:\n%s\n\n\n"), $rs->getPostURL())) . '">' . __('Send an e-mail') . '</a>';
}
echo '<h2>' . html::escapeHTML($core->blog->name) . ' › ' . __('Edit comment') . '</h2>';
echo '<p><a class="back" href="' . $core->getPostAdminURL($post_type, $post_id) . '&co=1#c' . $comment_id . '"> ' . sprintf(__('Back to "%s"'), $post_title) . '</a></p>';
echo '<form action="comment.php" method="post" id="comment-form">' . '<p><label>' . __('IP address:') . '</label> ' . '<a href="comments.php?ip=' . $comment_ip . '">' . $comment_ip . '</a></p>' . '<p><label>' . __('Date:') . '</label> ' . dt::dt2str(__('%Y-%m-%d %H:%M'), $comment_dt) . '</p>' . '<p><label class="required" title="' . __('Required field') . '">' . __('Author:') . form::field('comment_author', 30, 255, html::escapeHTML($comment_author)) . '</label></p>' . '<p><label>' . __('Email:') . form::field('comment_email', 30, 255, html::escapeHTML($comment_email)) . $comment_mailto . '</label></p>' . '<p><label>' . __('Web site:') . form::field('comment_site', 30, 255, html::escapeHTML($comment_site)) . '</label></p>' . '<p><label>' . __('Status:') . form::combo('comment_status', $status_combo, $comment_status, '', '', !$can_publish) . '</label></p>' . $core->callBehavior('adminAfterCommentDesc', $rs) . '<p class="area"><label for="comment_content">' . __('Comment:') . '</label> ' . form::textarea('comment_content', 50, 10, html::escapeHTML($comment_content)) . '</p>' . '<p>' . form::hidden('id', $comment_id) . $core->formNonce() . '<input type="submit" accesskey="s" name="update" value="' . __('save') . '" /> ';
if ($can_delete) {
echo '<input type="submit" name="delete" value="' . __('delete') . '" />';
}
echo '</p>' . '</form>';
}
dcPage::helpBlock('core_comments');
dcPage::close();
示例14:
<div class="org_contact_row">
<h4>Email:</h4>
<?php
print form::input('email', $form['email'], ' class="text long"');
?>
</div>
<div class="org_contact_row">
<h4>Phone:</h4>
<?php
print form::input('phone', $form['phone'], ' class="text long"');
?>
</div>
<div class="org_contact_row">
<h4>Message:</h4>
<?php
print form::textarea('message', $form['message'], ' rows="4" cols"20" class="textarea long" ');
?>
</div>
<div class="org_contact_row">
<h4>Security Code:</h4>
<?php
print $captcha->render();
?>
<br />
<?php
print form::input('captcha', $form['captcha'], ' class="text"');
?>
</div>
<div class="org_contact_row">
<input class="btn_blue" type="submit" value="Send Message" />
</div>
示例15:
?>
<h4><?php
echo Kohana::lang('ui_main.reports_title');
?>
<span class="required">*</span> </h4>
<?php
print form::input('incident_title', $form['incident_title'], ' class="text long"');
?>
</div>
<div class="report_row">
<h4><?php
echo Kohana::lang('ui_main.reports_description');
?>
<span class="required">*</span> </h4>
<?php
print form::textarea('incident_description', $form['incident_description'], ' rows="10" class="textarea long" ');
?>
</div>
<div class="report_row" id="datetime_default">
<h4>
<a href="#" id="date_toggle" class="show-more"><?php
echo Kohana::lang('ui_main.modify_date');
?>
</a>
<?php
echo Kohana::lang('ui_main.date_time');
?>
:
<?php
echo Kohana::lang('ui_main.today_at') . " " . "<span id='current_time'>" . $form['incident_hour'] . ":" . $form['incident_minute'] . " " . $form['incident_ampm'] . "</span>";
?>