本文整理汇总了PHP中text_field_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP text_field_tag函数的具体用法?PHP text_field_tag怎么用?PHP text_field_tag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了text_field_tag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
$opts = array();
foreach (get_valid_languages() as $v) {
$opts[] = array($v, $v);
}
?>
<div class="pull-left">
<label>Language</label>
<?php
echo select_field_tag("language", "lang", array("options" => $opts, "selected" => $this->search_crit['lang']), array("class" => "span4 dropkick-select"));
?>
</div>
<div class="pull-left">
<?php
echo text_field_tag("owner", "owner", "Owner", array("placeholder" => "Project owner", "value" => $this->search_crit['owner']));
?>
</div>
<?php
echo submit("Filter", array("class" => "btn btn-large btn-primary pull-left"));
?>
</div>
<div class="span3">
<h3>Sort by</h3>
<?php
$opts = array();
foreach (t("sort_by") as $k => $v) {
$opts[] = array($k, $v);
}
?>
<?php
示例2: form_tag
<head>
<title>Test EasyRdf_HTTP_Client Get</title>
<style type="text/css">
.body
{
width: 800px;
font-family: monospace;
font-size: 0.8em;
}
</style>
</head>
<body>
<h1>Test EasyRdf_HTTP_Client Get</h1>
<?php
echo form_tag();
echo text_field_tag('uri', 'http://tomheath.com/id/me', array('size' => 50));
?>
<br />
<?php
echo label_tag('accept', 'Accept Header: ') . select_tag('accept', $accept_options);
echo submit_tag();
echo form_end_tag();
?>
<?php
if (isset($_REQUEST['uri'])) {
$client = new EasyRdf_Http_Client($_REQUEST['uri']);
$client->setHeaders('Accept', $_REQUEST['accept']);
$response = $client->request();
?>
示例3: form_tag
require_once "html_tag_helpers.php";
## Load the ARC2 parser
require_once "EasyRdf/Parser/Arc.php";
## Add the Google Vocab namespace
EasyRdf_Namespace::set('gv', 'http://rdf.data-vocabulary.org/#');
?>
<html>
<head><title>Review Extract</title></head>
<body>
<h1>Review Extract</h1>
<?php
echo form_tag();
?>
<p>Please enter the URI of a page with a review on it (marked up with Google Review RDFa):</p>
<?php
echo text_field_tag('uri', 'http://www.bbc.co.uk/music/reviews/2n8c.html', array('size' => 50));
?>
<br />
<?php
echo submit_tag();
echo form_end_tag();
?>
<?php
if (isset($_REQUEST['uri'])) {
$graph = new EasyRdf_Graph($_REQUEST['uri']);
$graph->load();
$reviews = $graph->allOfType('gv:Review');
$review = $reviews[0];
}
if (isset($review)) {
示例4: image_tag
<?php
if (CONFIG::can_see_post(User::$current, $post)) {
?>
<?php
echo image_tag($post->preview_url);
}
?>
<?php
echo form_tag("#destroy");
?>
<?php
echo hidden_field_tag("id", Request::$params->id);
?>
<label>Reason</label> <?php
echo text_field_tag("reason");
?>
<?php
if ($post->is_deleted()) {
?>
<?php
echo hidden_field_tag("destroy", "1");
?>
<?php
} else {
?>
<br />
<input type="hidden" name="destroy" value="0" />
<label for="post_destroy">Destroy completely</label> <input id="post_destroy" type="checkbox" name="destroy" value="1" /><br />
<?php
}
示例5: form_tag
return 'unknown';
}
}
## Add namespaces
EasyRdf_Namespace::set('mo', 'http://purl.org/ontology/mo/');
EasyRdf_Namespace::set('bio', 'http://purl.org/vocab/bio/0.1/');
EasyRdf_TypeMapper::set('mo:MusicArtist', 'Model_MusicArtist');
?>
<html>
<head><title>EasyRdf Artist Info Example</title></head>
<body>
<h1>EasyRdf Artist Info Example</h1>
<?php
echo form_tag();
echo text_field_tag('uri', 'http://www.bbc.co.uk/music/artists/70248960-cb53-4ea4-943a-edb18f7d336f.rdf', array('size' => 50));
echo submit_tag();
echo form_end_tag();
?>
<?php
if (isset($_REQUEST['uri'])) {
$graph = EasyRdf_Graph::newAndLoad($_REQUEST['uri']);
$artist = $graph->primaryTopic();
}
if (isset($artist)) {
?>
<dl>
<dt>Artist Name:</dt><dd><?php
echo $artist->get('foaf:name');
示例6: text_field_with_autocomplete
/**
* Caja de texto con autocompletacion
*
* @param string $name id de la caja de texto
*
* action: accion a ejecutar
* after_update: despues de actualizar
* message: mensaje mientras se carga
*
* @return string
**/
function text_field_with_autocomplete($name)
{
$params = is_array($name) ? $name : Util::getParams(func_get_args());
/**
* Obtengo id, name y value
**/
if (isset($params[0])) {
$params = array_merge(get_id_and_name($params[0]), $params);
if (!isset($params['value'])) {
$value = get_value_from_action($params[0]);
if ($value) {
$params['value'] = $value;
}
}
}
$hash = md5(uniqid());
if (isset($params['after_update'])) {
$after_update = $params['after_update'];
unset($params['after_update']);
} else {
$after_update = 'function(){}';
}
if (isset($params['action'])) {
$action = $params['action'];
unset($params['action']);
} else {
$action = '';
}
if (isset($params['message'])) {
$message = $params['message'];
unset($params['message']);
} else {
$message = 'Consultando..';
}
$code = text_field_tag($params);
$code .= "\n\t<span id='indicator{$hash}' style='display: none'><img src='" . PUBLIC_PATH . "img/spinner.gif' alt='{$message}'/></span>\n\t<div id='{$params[0]}_choices' class='autocomplete'></div>\n\t<script type='text/javascript'>\n\t<!-- <![CDATA[\n\tnew Ajax.Autocompleter(\"{$params['id']}\", \"{$params['id']}_choices\", \"" . get_kumbia_url($action) . "\", { minChars: 2, indicator: 'indicator{$hash}', afterUpdateElement : {$after_update}});\n\t// ]]> -->\n\t</script>\n\t";
return $code;
}
示例7: text_field_tag
<?php
}
?>
<table>
<tr>
<th><label for="tag_alias_name">Name</label></th>
<td><?php
echo text_field_tag("tag_alias->name", array('size' => 40));
?>
</td>
</tr>
<tr>
<th><label for="tag_alias_alias">Alias to</label></th>
<td><?php
echo text_field_tag("tag_alias->alias", array('size' => 40));
?>
</td>
</tr>
<tr>
<th><label for="tag_alias_reason">Reason</label></th>
<td><?php
echo text_area("tag_alias->reason", array('size' => "40x2"));
?>
</td>
</tr>
<tr>
<td colspan="2"><?php
echo submit_tag("Submit");
?>
</td>
示例8: form_tag
<?php
echo form_tag("#update");
?>
<table class="form">
<tr>
<th width="15%"><label for="tag_name">Name</label></th>
<td width="85%">
<?php
echo text_field_tag('tag->name', $tag->name, array('size' => 30, 'autocomplete' => 'off'));
?>
<div class="auto_complete" id="tag_name_auto_complete" style="display: none"></div>
<script type="text/javascript">
//<![CDATA[
var tag_name_auto_completer = new Ajax.Autocompleter('tag_name', 'tag_name_auto_complete', '/tag/auto_complete_for_tag_name', {minChars:3})
//]]>
</script>
</td>
</tr>
<tr>
<th><label for="tag_type">Type</label></th>
<td><?php
echo select_tag('tag->tag_type', array_unique(CONFIG::$tag_types), $tag->tag_type);
?>
</td>
</tr>
<tr>
<th><label for="tag_is_ambiguous">Ambiguous</label></th>
<td><?php
示例9: form_tag
<h3>Create Pool</h3>
<?php
echo form_tag("#create", array('class' => 'need-signup'));
?>
<table class="form">
<tbody>
<tr>
<th><label for="pool_name">Name</label></th>
<td><?php
echo text_field_tag("pool[name]");
?>
</td>
</tr>
<tr>
<th><label for="pool_is_public">Public?</label></th>
<td><?php
echo checkbox_tag("pool{is_public]");
?>
</td>
</tr>
<tr>
<th><label for="pool_description">Description</label></th>
<td><?php
echo text_area("pool[description]", array('size' => "40x10"));
?>
</td>
</tr>
<tr>
<td colspan="2"><?php
echo submit_tag("Save");
示例10: text_field_tag
<p>Please remember your name will be easy to Google on this site.</p>
</th>
<td width="85%">
<?php
echo text_field_tag("user[name]", array('size' => 30));
?>
</td>
</tr>
<tr>
<th>
<label class="block" for="user_email">Email</label>
<p>Optional, for email notifications and password resets.</p>
</th>
<td>
<?php
echo text_field_tag("user[email]", array('size' => 30));
?>
</td>
</tr>
<tr>
<th>
<label class="block" for="user_password">Password</label>
<p>Minimum of five characters.</p>
</th>
<td>
<input type="password" size="30" name="user[password]" id="user_password" />
</td>
</tr>
<tr>
<th>
<label class="block" for="user_password_confirmation">Confirm password</label>
示例11: text_field
/**
* Returns an input tag of the "text" type.
*
* Example (<var>$this->post->title</var> returns "PHP for ever") :
* <code>text_field('post', 'title', $this->post, array('size' => 35));
* <input id="post_title" name="post[title]" size="35" type="text" value="PHP for ever" /></code>
*/
function text_field($objectName, $method, $object, $options = array())
{
$options = array_merge(array('size' => 30), $options);
list($name, $value, $options) = default_options($objectName, $method, $object, $options);
return text_field_tag($name, $value, $options);
}
示例12: form_tag
<h1>Admin login screen</h1>
<div class="well">
<?php
echo form_tag(login_admin_login_path(), "post");
?>
<?php
echo text_field_tag("username", "username", null, array("placeholder" => "Username"));
?>
<?php
echo password_field_tag("password", "pwd", array("placeholder" => "Password"));
?>
<?php
echo submit("Login", array("class" => "btn btn-primary"));
?>
<?php
echo form_end_tag();
?>
</div>
示例13: hidden_field_tag
<div class="palette palette-info-dark">
<?php
echo hidden_field_tag("owner_avatar", "owner_avatar");
?>
<?php
echo text_field($this->entity, "name", "Project's Name", array("class" => "span6"));
?>
<?php
echo textarea_field($this->entity, "description", "Project's description", array("class" => "span10"));
?>
<div class="one-line-form-elements">
<?php
echo text_field_tag("owner_name", "project_owner_name", "Project Owner");
?>
<?php
echo text_field($this->entity, "language");
?>
<?php
echo text_field($this->entity, "closed_issues", false, array("class" => "hidden"));
?>
<?php
echo text_field($this->entity, "open_issues", false, array("class" => "hidden"));
?>
<?php
echo text_field($this->entity, "stars", false, array("class" => "hidden"));
?>
<?php
示例14: form_tag
</p>
<?php
}
?>
<?php
echo form_tag("#authenticate");
?>
<?php
echo hidden_field_tag("url", Request::$params->url);
?>
<table class="form">
<tr>
<th width="15%"><label class="block" for="user_name">Name</label></th>
<td width="85%"><?php
echo text_field_tag("user->name", array('tabindex' => 1));
?>
</td>
</tr>
<tr>
<th><label class="block" for="user_password">Password</label></th>
<td><input type="password" id="user_password" name="user[password]" tabindex="1" /></td>
</tr>
<tr>
<td colspan="2"><?php
echo submit_tag("Login", array('tabindex' => 1));
?>
</td>
</tr>
</table>
</form>
示例15: form_tag
require_once "EasyRdf.php";
require_once "html_tag_helpers.php";
## Load the rapper based parser
require_once "EasyRdf/Parser/Rapper.php";
?>
<html>
<head><title>EasyRdf Graph Dumper</title></head>
<body>
<h1>EasyRdf Graph Dumper</h1>
<div style="margin: 10px">
<?php
echo form_tag();
?>
URI: <?php
echo text_field_tag('uri', 'http://metade.org/foaf.rdf', array('size' => 80));
?>
<br />
Format: <?php
echo label_tag('format_html', 'HTML') . ' ' . radio_button_tag('format', 'html', true);
?>
<?php
echo label_tag('format_text', 'Text') . ' ' . radio_button_tag('format', 'text');
?>
<br />
<?php
echo submit_tag();
?>
<?php
echo form_end_tag();