• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP form_field函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中form_field函数的典型用法代码示例。如果您正苦于以下问题:PHP form_field函数的具体用法?PHP form_field怎么用?PHP form_field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了form_field函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: form_field

							<form id="form-edit-user" class="form-horizontal" enctype="multipart/form-data" action="" method="post" role="form">
								<div class="message-container"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="username">Username</label>
									<div class="col-sm-4">
										<input type="text" name="username" id="username" class="form-control" value="<?php 
echo form_field('username', $data);
?>
">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="email">Email</label>
									<div class="col-sm-4">
										<input type="email" name="email" id="email" class="form-control" value="<?php 
echo form_field('email', $data);
?>
">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="password">Password</label>
									<div class="col-sm-4">
										<input type="password" name="password" id="password" class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="cpassword">Confirm Password</label>
									<div class="col-sm-4">
										<input type="password" name="cpassword" id="rpassword" class="form-control">
									</div>
开发者ID:ArpanTanna,项目名称:outsourceplatform,代码行数:31,代码来源:edituser.php


示例2: stripslashes

">
									</div>
								</div>
								<div class="form-group clearfix">
									<label class="col-sm-2 control-label" for="content">Content</label>
									<div class="col-lg-6 col-sm-10">
										<textarea name="content" id="content" class="form-control ckeditor" rows="5"><?php 
echo stripslashes(form_field('content', $data));
?>
</textarea>
									</div>
								</div>
								<div class="form-group clearfix">
									<div class="col-sm-4 col-sm-offset-2">
										<input type="hidden" name="id" value="<?php 
echo form_field('id', $data);
?>
" />
										<input type="submit" name="save" value="Save" class="btn btn-primary" />
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
		<link href="<?php 
echo SITE_URL;
?>
admin/css/uploadifive.css" media="screen" rel="stylesheet" type="text/css" />
开发者ID:ArpanTanna,项目名称:outsourceplatform,代码行数:31,代码来源:editstep.php


示例3: form_field

echo form_field($_field, 'Keep this below 100 characters');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'seo_description';
$_field['label'] = 'Description';
$_field['placeholder'] = 'Search Engine Optimised description';
$_field['type'] = 'textarea';
$_field['default'] = !empty($item->seo_description) ? $item->seo_description : '';
echo form_field($_field, 'Keep this relevant and below 140 characters');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'seo_keywords';
$_field['label'] = 'Keywords';
$_field['placeholder'] = 'Comma separated keywords';
$_field['default'] = !empty($item->seo_keywords) ? $item->seo_keywords : '';
echo form_field($_field, 'Comma seperated keywords. Try to keep to 10 or fewer.');
?>
			</fieldset>
		</div>

	</section>
	<p>
	<?php 
$_action = empty($item->id) ? lang('action_create') : lang('action_save_changes');
echo form_submit('submit', $_action);
?>
	</p>
	<?php 
echo form_close();
?>
</div>
开发者ID:nailsapp,项目名称:module-admin,代码行数:31,代码来源:edit.php


示例4: form_field

							<form id="form-add-step" class="form-horizontal" enctype="multipart/form-data" action="" method="post" role="form">
								<div class="message-container"></div>
								<div class="form-group clearfix">
									<label class="col-sm-2 control-label" for="name">Name</label>
									<div class="col-lg-6 col-sm-10">
										<input type="text" name="name" id="name" class="form-control" value="<?php 
echo form_field('name', $data);
?>
">
									</div>
								</div>
								<div class="form-group clearfix">
									<label class="col-sm-2 control-label" for="content">Content</label>
									<div class="col-lg-6 col-sm-10">
										<textarea name="content" id="content" class="form-control ckeditor" rows="5"><?php 
echo form_field('content', $data);
?>
</textarea>
									</div>
								</div>
								<div class="form-group clearfix">
									<label class="col-sm-2 control-label" for="parent">Section</label>
									<div class="col-lg-6 col-sm-10">
										<select name="parent" id="parent" class="form-control">
											<?php 
option_html('', $sections);
?>
										</select>
									</div>
								</div>
								<div class="form-group clearfix">
开发者ID:ArpanTanna,项目名称:outsourceplatform,代码行数:31,代码来源:addstep.php


示例5: lang

	<legend><?php 
echo lang('accounts_edit_password_legend');
?>
</legend>

	<div class="box-container">
	<?php 
//	Reset Password
$_field = array();
$_field['key'] = 'password';
$_field['label'] = lang('accounts_edit_password_field_password_label');
$_field['default'] = '';
$_field['required'] = FALSE;
$_field['placeholder'] = lang('accounts_edit_password_field_password_placeholder');
echo form_field($_field, lang('accounts_edit_password_field_password_tip'));
// --------------------------------------------------------------------------
//	Require password update on log in
$_field = array();
$_field['key'] = 'temp_pw';
$_field['label'] = lang('accounts_edit_password_field_temp_pw_label');
$_field['default'] = FALSE;
$_field['required'] = FALSE;
$_options = array();
$_options[] = array('value' => 'TRUE', 'label' => lang('accounts_edit_password_field_temp_pw_yes'), 'selected' => $user_edit->temp_pw ? TRUE : FALSE);
$_options[] = array('value' => 'FALSE', 'label' => lang('accounts_edit_password_field_temp_pw_no'), 'selected' => !$user_edit->temp_pw ? TRUE : FALSE);
echo form_field_radio($_field, $_options);
?>
	</div>

</fieldset>
开发者ID:nailsapp,项目名称:module-admin,代码行数:30,代码来源:inc-password.php


示例6: form_field_datetime

 function form_field_datetime($field, $help = '')
 {
     $_field = $field;
     $_field['type'] = 'datetime';
     $_field['class'] = isset($field['class']) ? $field['class'] . ' datetime' : 'datetime';
     $_field['placeholder'] = 'YYYY-MM-DD HH:mm:ss';
     return form_field($_field, $help);
 }
开发者ID:nailsapp,项目名称:common,代码行数:8,代码来源:NAILS_form_helper.php


示例7: form_input_hidden

function form_input_hidden($name, $value = null, $custom_html = null)
{
    return form_field($name, $value, null, null, "hidden", $custom_html);
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:4,代码来源:form.inc.php


示例8: form_field

    echo form_field("int", "postInterval", 30);
    ?>
    <?php 
    echo form_field("int", "cookieDays", 365);
    ?>
    <?php 
    echo form_field("str", "layoutType", "liquid");
    ?>
    <?php 
    echo form_field("bol", "contRecording");
    ?>
    <?php 
    echo form_field("bol", "warn");
    ?>
    <?php 
    echo form_field("bol", "disabled");
    ?>
  </fieldset>
</form>

</body>
</html>
<?php 
} else {
    // process request
    $decoded = base64_decode($url);
    if ($decoded === FALSE) {
        $url = base64_encode($url);
    }
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'new') {
        header('Location: ' . INDEX_FILE_NAME . '?' . URL_PARAM_NAME . '=' . base64_encode($url));
开发者ID:jumacro,项目名称:Analytica,代码行数:31,代码来源:index.php


示例9: form_edit

 function form_edit($obj)
 {
     $dd = array($obj->id);
     $saved = 0;
     /* recupera post */
     $CI =& get_instance();
     $post = $CI->input->post();
     $cp = $obj->cp;
     /* Recupera dados do banco */
     $recupera = 0;
     /* recupera ACAO do post */
     $acao = '';
     if (!isset($post['acao'])) {
         $recupera = 1;
     }
     /* Save in table */
     if ($recupera == 0) {
         /* Valida */
         $saved = valida_post($cp);
     }
     $tela = '';
     $tela .= '<table class="tabela00" width="100%" border=0 >';
     $tela .= '<tr><td>' . form_open() . '</td></tr>';
     if ($recupera == 1) {
         /* recupera dados do banco */
         if (strlen($obj->tabela) > 0) {
             $data = le_dados($obj);
         } else {
             $recupera = 0;
         }
     } else {
         $data = array();
     }
     $tela .= 'Recupera = ' . $recupera;
     for ($r = 0; $r < count($cp); $r++) {
         /* Recupera dados */
         $vlr = '';
         if ($recupera == 1) {
             /* banco de dados */
             $fld = $cp[$r][1];
             if (isset($data->{$fld})) {
                 $vlr = $data->{$fld};
             }
         } else {
             if (isset($post['dd' . $r])) {
                 $vlr = $post['dd' . $r];
             }
         }
         $tela .= form_field($cp[$r], $vlr);
     }
     $tela .= '</table>';
     $tela .= form_close();
     $data = array('tela' => $tela, 'saved' => $saved);
     return $data;
 }
开发者ID:GCPUCPR,项目名称:CsF,代码行数:55,代码来源:form_sisdoc_helper.php


示例10: array

$_field['class'] = 'select2 weight-unit';
$_field['required'] = TRUE;
$_field['default'] = !empty($variation->shipping->weight_unit) ? $variation->shipping->weight_unit : 'G';
$_options = array();
$_options['G'] = 'Gram';
$_options['KG'] = 'Kilogram';
echo form_field_dropdown($_field, $_options);
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'variation[' . $_counter . '][shipping][weight]';
$_field['label'] = 'Boxed Weight';
$_field['placeholder'] = 'The weight of the item';
$_field['class'] = 'weight';
$_field['required'] = TRUE;
$_field['default'] = isset($variation->shipping->weight) ? $variation->shipping->weight : '';
echo form_field($_field, 'cock and balls');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'variation[' . $_counter . '][shipping][collection_only]';
$_field['label'] = 'Collection Only';
$_field['readonly'] = !app_setting('warehouse_collection_enabled', 'shop');
$_field['info'] = !app_setting('warehouse_collection_enabled', 'shop') ? '<strong>Warehouse Collection is disabled</strong>' : '';
$_field['info'] .= !app_setting('warehouse_collection_enabled', 'shop') && user_has_permission('admin[settings]') ? '<br />If you wish to allow customers to collect from your warehouse you must enable it in ' . anchor('admin/settings/shop', 'settings', 'class="confirm" data-title="Stop Editing?" data-body="Any unsaved changes will be lost."') . '.' : '';
$_field['class'] = 'collection-only';
$_field['default'] = isset($variation->shipping->collection_only) ? (bool) $variation->shipping->collection_only : FALSE;
$_tip = 'Items marked as collection only will be handled differently in checkout and reporting. They also dont contribute to the overall dimensions and weight of the order when calculating shipping costs.';
echo form_field_boolean($_field, $_tip);
// --------------------------------------------------------------------------
if ($is_first) {
    $_display = empty($num_variants) || $num_variants == 1 ? 'none' : 'block';
    echo '<p id="variation-sync-shipping" style="margin-top:1em;display:' . $_display . '">';
开发者ID:nailsapp,项目名称:module-admin,代码行数:31,代码来源:template-mustache-inventory-variant.php


示例11: form_select

function form_select($name, $object, $label, $options)
{
    return form_field($name, $object, $label, html_select($name, $options, $object->{$name}));
}
开发者ID:rickyw,项目名称:LiveReload2,代码行数:4,代码来源:render.php


示例12: form_field

$_field['placeholder'] = 'Maximum number of times this particular product can be added to the basket. Specify 0 for unlimited.';
echo form_field($_field, 'Limit the number of times an individual product can be added to an order. This only applies to a single product, i.e. an item with a limit of 1 can only be added once, but multiple (different) products of the same type can be added, but only once each. Specify 0 for unlimited.');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'max_variations';
$_field['label'] = 'Max Variations';
$_field['placeholder'] = 'The maximum number of variations this type of product can have. Specify 0 for unlimited.';
$_field['default'] = isset($product_type->max_variations) ? $product_type->max_variations : '';
echo form_field($_field, 'Define the number of variations this product can have. Specify 0 for unlimited variations.');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'ipn_method';
$_field['label'] = 'IPN Method';
$_field['placeholder'] = 'The IPN method to call upon notification of successfull payment.';
$_field['default'] = isset($product_type->ipn_method) ? $product_type->ipn_method : '';
echo form_field($_field, 'This method should be callable within the scope of `shop_order_model`. Do not include the `_process` method name prefix here.');
?>
			</fieldset>
			<p style="margin-top:1em;">
				<?php 
echo form_submit('submit', 'Save', 'class="awesome"');
?>
				<?php 
echo anchor('admin/shop/manage/product_type' . $is_fancybox, 'Cancel', 'class="awesome red confirm" data-title="Are you sure?" data-body="All unsaved changes will be lost."');
?>
			</p>
		</div>
	</section>
	<?php 
echo form_close();
?>
开发者ID:nailsapp,项目名称:module-admin,代码行数:31,代码来源:edit.php


示例13: form_field

    echo form_field($_field);
    if ($template->additional_fields) {
        foreach ($template->additional_fields as $field) {
            //	Set the default key
            $field['default'] = !empty($cmspage->draft->template_data->data->additional_fields->{$template->slug}->{$field['key']}) ? $cmspage->draft->template_data->data->additional_fields->{$template->slug}->{$field['key']} : '';
            //	Override the field key
            $field['key'] = 'additional_field[' . $template->slug . '][' . $field['key'] . ']';
            //	Tip?
            $_tip = !empty($field['tip']) ? $field['tip'] : '';
            switch ($field['type']) {
                case 'dropdown':
                    $_options = !empty($field['options']) ? $field['options'] : array();
                    echo form_field_dropdown($field, $_options, $_tip);
                    break;
                default:
                    echo form_field($field, $_tip);
                    break;
            }
        }
    }
    echo '</div>';
}
?>
	</fieldset>

	<fieldset>
		<legend>Page Content</legend>
		<p>
			Choose which area of the page you'd like to edit.
		</p>
		<p>
开发者ID:nailsapp,项目名称:module-admin,代码行数:31,代码来源:edit.php


示例14: form_field

							<form id="form-add-course" class="form-horizontal" enctype="multipart/form-data" action="" method="post" role="form">
								<div class="message-container"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="name">Name</label>
									<div class="col-sm-4">
										<input type="text" name="name" id="name" class="form-control" value="<?php 
echo form_field('name', $data);
?>
">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="description">Description</label>
									<div class="col-sm-4">
										<textarea name="description" id="description" class="form-control" rows="3"><?php 
echo form_field('description', $data);
?>
</textarea>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="">Image</label>
									<div class="col-sm-4">
										<input type="file" name="course_img_upload" id="course-img-upload" />
										<input type="hidden" name="file_change" class="file_change" value="" />
										<input type="hidden" name="image" id="image" value="" />
										<div class="img-preview clearfix">
											
										</div>
									</div>
								</div>
开发者ID:ArpanTanna,项目名称:outsourceplatform,代码行数:31,代码来源:addcourse.php


示例15: array

$_field = array();
$_field['key'] = 'default_homepage';
$_field['label'] = lang('accounts_groups_edit_basic_field_label_homepage');
$_field['default'] = $group->default_homepage;
$_field['required'] = TRUE;
$_field['placeholder'] = lang('accounts_groups_edit_basic_field_placeholder_homepage');
echo form_field($_field);
// --------------------------------------------------------------------------
//	Registration Redirect
$_field = array();
$_field['key'] = 'registration_redirect';
$_field['label'] = lang('accounts_groups_edit_basic_field_label_registration');
$_field['default'] = $group->registration_redirect;
$_field['required'] = FALSE;
$_field['placeholder'] = lang('accounts_groups_edit_basic_field_placeholder_registration');
echo form_field($_field, lang('accounts_groups_edit_basic_field_tip_registration'));
?>

		</fieldset>

		<!--	PERMISSIONS	-->
		<fieldset id="permissions">

			<legend><?php 
echo lang('accounts_groups_edit_permission_legend');
?>
</legend>

			<p class="system-alert message">
				<?php 
echo lang('accounts_groups_edit_permission_warn');
开发者ID:nailsapp,项目名称:module-admin,代码行数:31,代码来源:edit.php


示例16: form_input_hidden

function form_input_hidden($name, $value = false, $custom_html = false)
{
    return form_field($name, $value, 0, 0, "hidden", $custom_html);
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:4,代码来源:form.inc.php


示例17: form_edit

    function form_edit($obj)
    {
        $dd = array($obj->id);
        $saved = 0;
        /* recupera post */
        $CI =& get_instance();
        $post = $CI->input->post();
        $cp = $obj->cp;
        /* Recupera dados do banco */
        $recupera = 0;
        /* recupera ACAO do post */
        $acao = '';
        if (!isset($post['acao'])) {
            $recupera = 1;
        }
        /* Save in table */
        if ($recupera == 0) {
            /* Valida */
            $saved = valida_post($cp);
            if ($saved > 0) {
                form_save($obj);
            }
        }
        $tela = '';
        $tela .= '
			<table class="form_tabela" width="100%" border=0 >
			<tr>
				<td>' . form_open() . '</td>
			</tr>
			';
        if ($recupera == 1) {
            /* recupera dados do banco */
            if (strlen($obj->tabela) > 0) {
                $data = le_dados($obj);
            } else {
                $recupera = 0;
            }
        } else {
            $data = array();
        }
        //$tela .= 'Recupera = ' . $recupera;
        for ($r = 0; $r < count($cp); $r++) {
            /* Recupera dados */
            $vlr = '';
            if ($recupera == 1) {
                /* banco de dados */
                $fld = $cp[$r][1];
                if (isset($data->{$fld})) {
                    $vlr = $data->{$fld};
                }
            } else {
                if (isset($post['dd' . $r])) {
                    $vlr = $post['dd' . $r];
                }
            }
            $tela .= form_field($cp[$r], $vlr);
        }
        $tela .= '</table>';
        $tela .= "\n\t\t<script>\n\t\t\t\$(document).ready(function(){\n  \t\t\t\t\$('.date').mask('00/00/0000');\n  \t\t\t\t\$('.money').mask('000.000.000.000.000,00', {reverse: true});\n\t\t\t});\n\t\t</script>\n\t\t";
        $tela .= form_close();
        $data = array('tela' => $tela, 'saved' => $saved);
        return $data;
    }
开发者ID:CGPUCPR,项目名称:SwB-2nd,代码行数:63,代码来源:form_sisdoc_helper.php


示例18: app_setting

$_field['id'] = 'blog-settings-social-layout';
$_field['default'] = app_setting($_field['key'], 'blog') ? app_setting($_field['key'], 'blog') : 'HORIZONTAL';
$_options = array();
$_options['HORIZONTAL'] = 'Horizontal';
$_options['VERTICAL'] = 'Vertical';
$_options['SINGLE'] = 'Single Button';
echo form_field_dropdown($_field, $_options);
// --------------------------------------------------------------------------
$_display = app_setting($_field['key'], 'blog') && app_setting($_field['key'], 'blog') == 'SINGLE' ? 'block' : 'none';
echo '<div id="blog-settings-social-layout-single-text" style="display:' . $_display . '">';
$_field = array();
$_field['key'] = 'social_layout_single_text';
$_field['label'] = 'Button Text';
$_field['default'] = app_setting($_field['key'], 'blog') ? app_setting($_field['key'], 'blog') : 'Share';
$_field['placeholder'] = 'Specify what text should be rendered on the button';
echo form_field($_field);
echo '</div>';
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'social_counters';
$_field['label'] = 'Show Counters';
$_field['id'] = 'social-counters';
$_field['default'] = app_setting($_field['key'], 'blog') ? TRUE : FALSE;
echo form_field_boolean($_field);
?>
				</fieldset>
				<p style="margin-top:1em;margin-bottom:0;">
					<?php 
echo form_submit('submit', lang('action_save_changes'), 'style="margin-bottom:0;"');
?>
				</p>
开发者ID:nailsapp,项目名称:module-admin,代码行数:31,代码来源:blog.php


示例19: array

//	Description
$_field = array();
$_field['key'] = 'seo_description';
$_field['type'] = 'textarea';
$_field['label'] = 'Description';
$_field['default'] = isset($post->seo_description) ? $post->seo_description : '';
$_field['placeholder'] = 'The post\'s SEO description';
echo form_field($_field, 'This should be kept short (< 160 characters) and concise. It\'ll be shown in search result listings and search engines will use it to help determine the post\'s content.');
// --------------------------------------------------------------------------
//	Keywords
$_field = array();
$_field['key'] = 'seo_keywords';
$_field['label'] = 'Keywords';
$_field['default'] = isset($post->seo_keywords) ? $post->seo_keywords : '';
$_field['placeholder'] = 'Comma separated keywords relating to the content of the post.';
echo form_field($_field, 'SEO good practice recommend keeping the number of keyword phrases below 10 and less than 160 characters in total.');
?>
			</div>

		</section>

		<p>
			<?php 
echo form_submit('submit', lang('action_save_changes'));
?>
		</p>

	<?php 
echo form_close();
?>
</div>
开发者ID:nailsapp,项目名称:module-admin,代码行数:31,代码来源:edit.php



注:本文中的form_field函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP form_fieldset函数代码示例发布时间:2022-05-15
下一篇:
PHP form_errors函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap