当前位置: 首页>>代码示例>>PHP>>正文


PHP form_field函数代码示例

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


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


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