本文整理汇总了PHP中input_hidden_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP input_hidden_tag函数的具体用法?PHP input_hidden_tag怎么用?PHP input_hidden_tag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了input_hidden_tag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInputTag
public function getInputTag($paramName, $id)
{
$state = $this->getState($id);
$value = $state === true ? '1' : '0';
$inputName = 'sel_' . $paramName . '-' . $id;
return input_hidden_tag($inputName, $value);
}
示例2: object_input_auto_complete_tag
function object_input_auto_complete_tag($object, $method, $options = array(), $default_value = null)
{
$peer_table = _get_option($options, 'peer_table');
$peer_field = _get_option($options, 'peer_field');
$input_name = _convert_method_to_name($method, $options);
echo input_auto_complete_tag("{$peer_table}_{$peer_field}_search", '', sfContext::getInstance()->getModuleName() . "/autocomplete?table={$peer_table}&field={$peer_field}", array('autocomplete' => 'off'), array('use_style' => true, 'after_update_element' => "function (inputField, selectedItem) { \$('" . get_id_from_name($input_name) . "').value = selectedItem.id; }", 'method' => 'get'));
echo input_hidden_tag($input_name);
}
示例3: render
public function render($name, $value = null, $attributes = array(), $errors = array())
{
sfLoader::loadHelpers('Javascript');
if ($this->getOption("plain")) {
return $value . input_hidden_tag($name, $value);
} else {
return input_auto_complete_tag($name, $value, 'tag/searchTag?src=' . $this->getOption('src'), array('autocomplete' => 'off', 'size' => '15'), array('use_style' => 'true'));
}
}
示例4: sf_simple_cms_slot
function sf_simple_cms_slot($page, $slot, $default_text = null, $default_type = 'Text')
{
$context = sfContext::getInstance();
$request = $context->getRequest();
$culture = $request->getAttribute('culture');
$slot_object = $page->getSlot($slot, constant(sfConfig::get('app_sfSimpleCMS_escaping_strategy', 'ESC_RAW')));
if (!$slot_object) {
$slot_object = new sfSimpleCMSSlot();
$slot_object->setType($default_type);
$slot_object->setCulture($culture);
}
$slot_value = $slot_object->getValue();
$slot_type_name = $slot_object->getType();
$slot_type_class = 'sfSimpleCMSSlot' . $slot_type_name;
$slot_type = new $slot_type_class();
if ($request->getParameter('edit') == 'true' && !$request->getParameter('preview')) {
echo '<div class="editable_slot" title="' . __('Double-click to edit') . '" id="slot_' . $slot . '" onDblClick="Element.show(\'edit_' . $slot . '\');Element.hide(\'slot_' . $slot . '\');">';
if ($slot_value) {
// Get slot value from the slot type object
echo $slot_type->getSlotValue($slot_object);
} else {
// default text
echo $default_text ? $default_text : sfConfig::get('app_sfSimpleCMS_default_text', __('[add text here]'));
}
echo '</div>';
echo form_remote_tag(array('url' => 'sfSimpleCMS/updateSlot', 'script' => 'true', 'update' => 'slot_' . $slot, 'success' => 'Element.show(\'slot_' . $slot . '\');
Element.hide(\'edit_' . $slot . '\');
' . visual_effect('highlight', 'slot_' . $slot)), array('class' => 'edit_slot', 'id' => 'edit_' . $slot, 'style' => 'display:none'));
echo input_hidden_tag('slug', $page->getSlug(), 'id=edit_path' . $slot);
echo input_hidden_tag('slot', $slot);
if (sfConfig::get('app_sfSimpleCMS_use_l10n', false)) {
echo input_hidden_tag('sf_culture', $slot_object->getCulture());
}
// Get slot editor from the slot type object
echo $slot_type->getSlotEditor($slot_object);
echo label_for('slot_type', __('Type: '));
echo select_tag('slot_type', options_for_select(sfConfig::get('app_sfSimpleCMS_slot_types', array('Text' => __('Simple Text'), 'RichText' => __('Rich text'), 'Php' => __('PHP code'), 'Image' => __('Image'), 'Modular' => __('List of partials/components'))), $slot_type_name));
if ($rich = sfConfig::get('app_sfSimpleCMS_rich_editing', false)) {
// activate rich text if global rich_editing is true and is the current slot is RichText
$rich = $slot_type_name == 'RichText';
}
echo submit_tag('update', array('onclick' => $rich ? 'tinymceDeactivate()' . ';submitForm(\'edit_' . $slot . '\'); return false' : '', 'class' => 'submit_tag'));
echo button_to_function('cancel', 'Element.hide(\'edit_' . $slot . '\');Element.show(\'slot_' . $slot . '\');', 'class=submit_tag');
echo '</form>';
} else {
echo $slot_type->getSlotValue($slot_object);
}
}
示例5: use_helper
<?php
use_helper('Object', 'Validation', 'myHelper');
echo form_remote_tag(array('url' => 'course_sched/save', 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');this.subject_list_ser.value=Form.serialize(subject_list);", 'complete' => "hideIndicator()", 'name' => 'edit_form'));
echo include_partial('global/title', array('actions' => $actions, 'subtitle' => $subtitle . ($sf_request->hasErrors() ? '<div class=form_error>* ' . __('_FORM_HAS_ERROR_') . '</div>' : ''), 'type' => $type, 'title' => __('CourseSchedule')));
echo object_input_hidden_tag($course_schedule, 'getId');
echo input_hidden_tag('action_type', '');
echo input_hidden_tag('subject_list_ser');
?>
<table border="0" width="100%">
<tr>
<td width="39%" valign="top">
<!-- Course Schedule -->
<table class="form">
<tr><td class="form">
<table class="form_content" width="100%">
<tbody>
<tr>
<td class='first' width="25%" style="vertical-align:top;"><label><?php
echo __('Academic calendar');
?>
</label></td>
<td class="first" width="2%" style="text-align:center; vertical-align:top;">:</td>
<td class="first" style="vertical-align:top;">
<?php
echo my_object_select_tag($course_schedule, 'getAcademicCalendarId', AcademicCalendarPeer::getParents(), array('include_blank' => true, 'related_class' => 'AcademicCalendar', 'text_method' => '__toString', 'peer_method' => 'doSelectFiltered'));
?>
<?php
echo form_error('academic_calendar_id');
?>
</td>
示例6: form_tag
?>
</h2>
</div>
<?php
}
?>
<?php
echo form_tag('legajopedagogico/save', 'id=sf_admin_edit_form name=sf_admin_edit_form multipart=true');
?>
<?php
echo object_input_hidden_tag($legajopedagogico, 'getId');
echo input_hidden_tag('legajopedagogico[fk_alumno_id]', $alumno_id);
echo input_hidden_tag('aid', $alumno_id);
echo input_hidden_tag('cid', $legajo_categoria_id);
?>
<fieldset id="sf_fieldset_informacion_general" class="">
<h2><?php
echo __('Entrada');
?>
</h2>
<div class="form-row">
<?php
echo label_for('legajopedagogico[fecha]', __('Fecha:'), 'class="required" ');
?>
<div class="content<?php
示例7: form_error
?>
<?php
echo form_error('title');
?>
<?php
echo label_for('title', __('Title', null, 'sfSimpleForum'));
?>
<?php
echo input_tag('title', '', 'id=topic_title');
?>
<?php
if (isset($forum)) {
?>
<?php
echo input_hidden_tag('forum_name', $forum->getStrippedName());
?>
<?php
} else {
?>
<?php
echo label_for('forum', __('Forum', null, 'sfSimpleForum'));
?>
<?php
echo select_tag('forum_name', options_for_select(sfSimpleForumForumPeer::getAllAsArray()));
?>
<?php
}
?>
<?php
示例8: input_tag
echo input_tag('filters[NO_REG]', isset($filters['NO_REG']) ? $filters['NO_REG'] : null, array('size' => 12));
?>
</td>
<td class='filter'>
<?php
echo input_tag('filters[CODE]', isset($filters['CODE']) ? $filters['CODE'] : null, array('size' => 12));
?>
</td>
<td class='filter'>
<?php
echo input_tag('filters[NAME]', isset($filters['NAME']) ? $filters['NAME'] : null, array('size' => 25));
?>
</td>
<td class='filter'>
<?php
echo input_hidden_tag('filters[COL_ITEM_ID]', isset($filters['COL_ITEM_ID']) ? $filters['COL_ITEM_ID'] : null);
if (isset($filters['COL_ITEM_ID']) && $filters['COL_ITEM_ID']) {
echo input_auto_complete_tag('index', isset($filters['COL_ITEM_ID']) && $filters['COL_ITEM_ID'] ? ColItemPeer::retrieveByPk($filters['COL_ITEM_ID'])->getIndexNo() : '', '/col_item/getIndex', array('size' => 20), array('after_update_element' => 'function(f, s) {$("COL_ITEM_ID").updateFromInformalAutocomplete(f, s);}', 'min_chars' => 1));
} else {
echo input_auto_complete_tag('index', null, '/col_item/getIndex', array('size' => 20), array('after_update_element' => 'function(f, s) {$("filters_COL_ITEM_ID").updateFromInformalAutocomplete(f, s);}', 'min_chars' => 1));
}
?>
<?php
#echo object_select_tag(isset($filters['col_item_id']) ? $filters['col_item_id'] : null, null, array ( 'include_blank' => true, 'related_class' => 'ColItem', 'text_method' => '__toString', 'control_name' => 'filters[col_item_id]', 'style'=>"width: 80px;", ))
?>
</td>
<!--
<td class='filter'>
<?php
#echo object_select_tag(isset($filters['col_status_id']) ? $filters['col_status_id'] : null, null, array ( 'include_blank' => true, 'related_class' => 'ColStatus', 'text_method' => '__toString', 'control_name' => 'filters[col_status_id]', ))
?>
示例9: use_helper
<?php
use_helper('Object', 'Validation', 'myHelper');
$title = 'registrasi';
echo include_partial('global/tab', array('title' => $title));
?>
<div style="margin-bottom:10px;line-height:18px;" class="sim">
<?php
#echo form_tag('applicant/update');
echo form_remote_tag(array('url' => 'applicant/update', 'update' => 'content', 'script' => 'true', 'name' => 'edit_form'));
echo object_input_hidden_tag($applicant, 'getId');
echo object_input_hidden_tag($applicant, 'getTestApplicantDetailId');
echo input_hidden_tag('action_type', '');
echo input_hidden_tag('year', date('Y'));
?>
<div class="contentpaneopen">
<h2 class="contentheading">Biodata Calon Siswa</h2>
<p>Isi data berikut dengan lengkap dan benar.</p>
<fieldset>
<legend>Identitas Calon Siswa</legend>
<div>
<label style="width: 150px;">Nama *</label>
<?php
echo object_input_tag($applicant, 'getName', array('size' => 20, 'maxlength' => 20));
?>
<br />
<?php
echo form_error('name');
?>
<p style="font-size: 10px; margin-top: -7px; margin-left: 150px;">
示例10: ucwords
?>
<ul>
<li>
<?php
echo ucwords(__('to'));
?>
:<br />
<?php
echo ucwords(__('subject'));
?>
:
</li>
<li>
<?php
if ($message->getRecipientId()) {
echo '<em>(' . $message->getSfGuardUserRelatedByRecipientId()->getProfile()->getFullName() . ')</em><br />' . input_hidden_tag('user_recipient', $message->getSfGuardUserRelatedByRecipientId()->getProfile()->getFullName());
} else {
echo input_auto_complete_tag('user_recipient', '', 'user/autoMessageComplete?field=recipient', 'autocomplete=false', 'use_style=true') . '<br />';
}
?>
<?php
echo object_input_tag($message, 'getSubject', array('style' => 'width:100%;'));
?>
</li>
</ul>
<hr class="clear" />
<?php
echo object_textarea_tag($message, 'getBody', array('style' => 'width:100%;', 'rows' => '10'));
?>
<?php
echo submit_tag(ucwords(__('send')), array('class' => 'pswipebutton'));
示例11: input_hidden_tag
} else {
?>
<?php
echo input_hidden_tag('i', 1);
echo input_hidden_tag('love', 1);
echo input_hidden_tag('summer', 1);
?>
<p><strong>You typed in "<?php
echo $_request->getParameter('txtName');
?>
".</strong>
<?php
echo input_hidden_tag('reset', 1);
?>
<p><input type="submit" name="commit" value="Go back" class="JsAction-post" />
<?php
}
?>
</form>
<p><strong><?php
echo $_request->getMethodName();
?>
</strong> request:
<?php
示例12: use_helper
<?php
use_helper('Form');
use_helper('Object');
$type = $cs_setting->getType();
$name = isset($name) ? $name : 'cs_setting[' . $cs_setting['id'] . ']';
switch ($type) {
case 'checkbox':
echo input_hidden_tag($name, 0);
echo checkbox_tag($name, 1, $cs_setting->getValue());
break;
case 'input':
echo input_tag($name, $cs_setting->getValue(), 'size=55');
break;
case 'textarea':
echo textarea_tag($name, $cs_setting->getValue());
break;
case 'yesno':
echo 'Yes: ' . radiobutton_tag($name, 1, $cs_setting->getValue());
echo 'No: ' . radiobutton_tag($name, 0, $cs_setting->getValue() ? false : true);
break;
case 'select':
$options = _parse_attributes($cs_setting->getOptions());
echo select_tag($name, options_for_select($options, $cs_setting->getValue(), 'include_blank=true'));
break;
case 'model':
$config = _parse_attributes($cs_setting->getOptions());
$method = $cs_setting->getOption('table_method');
$method = $method ? $method : 'findAll';
$options = Doctrine::getTable($cs_setting->getOption('model', true))->{$method}();
echo select_tag($name, objects_for_select($options, 'getId', '__toString', $cs_setting->getValue()), 'include_blank=true');
示例13: include_partial
<?php
include_partial('global/section', array('title' => 'Search for a Member', 'pointer' => 'Enter a name to see if they\'re on this list'));
?>
<div class="padded">
<form action="<?php
echo url_for($list->getInternalUrl('findMember', null, true));
?>
">
<?php
echo input_hidden_tag('id', $list->id);
echo input_tag('member_search_terms', $sf_request->getParameter('member_search_terms'));
?>
<?php
echo submit_tag('Search', 'class=button_small');
?>
</form>
</div>
示例14: __
<?php
echo __('Show the route');
?>
</a>
</p> <!-- wizard_route_descr -->
<p class="wizard_tip"><?php
echo __('No route matching your search?') . ' ';
?>
<a href="#" onclick="window.location.href='/routes/edit/link/' + $('#summit_id').val(); return false;"><?php
echo __('Add your route');
?>
</a></p>
</div>
<div id="last_ok" style="display: none;">
<hr />
<h4><?php
echo __('Step 3: confirm to create outing');
?>
</h4>
<?php
echo form_tag('outings/edit', 'method=get');
echo input_hidden_tag('link', '0');
echo c2c_submit_tag(__('New outing'), array('onclick' => 'if ($("#wizard_type") == "summits") $("#link").val($("#routes").val());', 'title' => __('Add your outing'), 'picto' => 'action_create'));
?>
</form>
</div> <!-- last_ok -->
</div> <!-- outing_wizard -->
示例15: jq_input_auto_complete_tag
/**
* wrapper for jquery autocompleter.
* @param string name value of input field
* @param string default value for the input field
* @param string url to server script
* @param array input tag options. (size, autocomplete, etc...)
* @param array completion options. (use_style, etc...)
*
* @return string input field tag, div for completion results, and
* auto complete javascript tags
*/
function jq_input_auto_complete_tag($name, $value, $url, $tag_options = array(), $completion_options = array())
{
$context = sfContext::getInstance();
$tag_options = _convert_options($tag_options);
$response = sfContext::getInstance()->getResponse();
$response->addJavascript(sfConfig::get('app_mdToolsPlugin_jquery_ui_folder', '/mdToolsPlugin/js/jquery') . '/plugins/jquery-autocomplete');
//$comp_options = _convert_options($completion_options);
if (isset($comp_options['use_style']) && $comp_options['use_style'] == true) {
$response->addStylesheet(sfConfig::get('sf_prototype_web_dir') . '/css/input_auto_complete_tag');
}
$tag_options['id'] = get_id_from_name(isset($tag_options['id']) ? $tag_options['id'] : $name);
$javascript = input_tag($name, $value, $tag_options);
$javascript .= jq_javascript_tag("\$('#" . $name . "').autocomplete('{$url}', " . _jq_options_for_javascript($completion_options) . ");");
if (isset($comp_options['hidden_value']) && $comp_options['hidden_value'] == true) {
$javascript .= input_hidden_tag($name . '_value');
$javascript .= jq_javascript_tag('$(\'#' . $name . '\').result(function(event, data, formatted) {$(\'#' . $name . '_value\').val(data[1]);});');
}
return $javascript;
}