本文整理匯總了PHP中FORM::input方法的典型用法代碼示例。如果您正苦於以下問題:PHP FORM::input方法的具體用法?PHP FORM::input怎麽用?PHP FORM::input使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FORM
的用法示例。
在下文中一共展示了FORM::input方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: input
public static function input($name, array $options = array())
{
self::$_form_id++;
$config = Kohana::$config->load('tbform');
$attributes['id'] = $config['form_id_prefix'] . self::$_form_id;
$attributes['class'] = isset($options['class']) ? $options['class'] . ' span' . Arr::get($options, 'size', $config['input']['size']) : 'span' . Arr::get($options, 'size', $config['input']['size']);
$form_element = FORM::input($name, Arr::get(self::$_values, $name), $attributes);
$label = array('text' => Arr::get($options, 'label', $name), 'for' => $config['form_id_prefix'] . self::$_form_id);
$errors = self::get_errors($name);
return View::factory('standart_input')->set('errors', $errors)->set('form_element', $form_element)->set('options', $options)->set('label', $label)->set('help', Arr::get($options, 'help'))->set('horizontal', Arr::get($options, 'horizontal'))->render();
}
示例2: array
<?php
if (Core::config('general.recaptcha_active')) {
?>
<?php
echo Captcha::recaptcha_display();
?>
<div id="recaptcha1"></div>
<?php
} else {
?>
<dt> <?php
echo captcha::image_tag('contact');
?>
</dt>
<dd><?php
echo FORM::input('captcha', "", array('class' => 'form-control', 'placeholder' => __('Captcha'), 'id' => 'captcha', 'required'));
?>
</dd>
<?php
}
?>
</dl>
<?php
}
?>
</fieldset>
</div>
<div class="modal-footer text-center">
<?php
echo FORM::button('submit', _e('Send Message'), array('type' => 'submit', 'class' => 'btn btn-success', 'action' => Route::url('default', array('controller' => 'contact', 'action' => 'userprofile_contact', 'id' => $user->id_user))));
?>
示例3: __
<?php
if (core::config('advertisement.captcha') != FALSE) {
?>
<div class="form-group">
<div class="col-xs-10">
<?php
echo __('Captcha');
?>
*:<br />
<?php
echo captcha::image_tag('contact');
?>
<br />
<?php
echo FORM::input('captcha', "", array('class' => 'form-control', 'id' => 'captcha', 'required'));
?>
</div>
</div>
<?php
}
?>
<div class="modal-footer">
<?php
echo FORM::button('submit', __('Send Message'), array('type' => 'submit', 'class' => 'btn btn-success', 'action' => Route::url('default', array('controller' => 'contact', 'action' => 'user_contact', 'id' => $widget->id_ad))));
?>
</div>
</fieldset>
<?php
echo FORM::close();
示例4: __
echo FORM::label($forms['smtp_user']['key'], __('Smtp user'), array('class' => 'control-label col-sm-4', 'for' => $forms['smtp_user']['key']));
?>
<div class="col-sm-8">
<?php
echo FORM::input($forms['smtp_user']['key'], $forms['smtp_user']['value'], array('placeholder' => "", 'class' => 'tips form-control', 'id' => $forms['smtp_user']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => ''));
?>
</div>
</div>
<div class="form-group">
<?php
echo FORM::label($forms['smtp_pass']['key'], __('Smtp password'), array('class' => 'control-label col-sm-4', 'for' => $forms['smtp_pass']['key']));
?>
<div class="col-sm-8">
<?php
echo FORM::input($forms['smtp_pass']['key'], $forms['smtp_pass']['value'], array('placeholder' => "", 'type' => "password", 'class' => 'tips form-control', 'id' => $forms['smtp_pass']['key'], 'data-content' => '', 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => ''));
?>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="col-sm-8 col-sm-offset-4">
<?php
echo FORM::button('submit', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'email'))));
?>
</div>
示例5: __
<?php
echo FORM::label('email', __('Email'), array('class' => 'col-xs-4 control-label', 'for' => 'email'));
?>
<div class="col-sm-8">
<?php
echo FORM::input('email', $user->email, array('class' => 'form-control', 'id' => 'email', 'type' => 'email', 'required', 'placeholder' => __('Email')));
?>
</div>
</div>
<div class="form-group">
<?php
echo FORM::label('description', __('Description'), array('class' => 'col-xs-4 control-label', 'for' => 'description'));
?>
<div class="col-sm-8">
<?php
echo FORM::input('description', $user->description, array('class' => 'form-control', 'id' => 'description', 'type' => 'description', 'placeholder' => __('Description')));
?>
</div>
</div>
<?php
foreach ($custom_fields as $name => $field) {
?>
<div class="form-group" id="cf_new">
<?php
$cf_name = 'cf_' . $name;
?>
<?php
if ($field['type'] == 'select' or $field['type'] == 'radio') {
$select = array('' => '');
foreach ($field['values'] as $select_name) {
示例6: array
<?php
echo FORM::input('username', Arr::get($values, 'username'));
?>
<p class="help-block" style="color: red;"><?php
echo Arr::get($errors, 'username');
?>
</p>
</div>
</div>
<div class="control-group">
<label class="control-label">Email</label>
<div class="controls">
<?php
echo FORM::input('email', Arr::get($values, 'email'));
?>
<p class="help-block" style="color: red;"><?php
echo Arr::get($errors, 'email');
?>
</p>
</div>
</div>
<div class="control-group">
<label class="control-label">Администратор</label>
<div class="controls">
<label><?php
echo Form::checkbox('is_admin', null, Arr::get($values, 'is_admin', 0) == 0 ? false : true, array('id' => 'is_admin'));
?>
</label>
示例7: __
echo FORM::close();
?>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><?php
echo __('Find latitude & longitude');
?>
</h3>
</div>
<div class="panel-body">
<?php
echo FORM::input('address', Request::current()->post('address'), array('class' => 'form-control', 'id' => 'address', 'placeholder' => __('Type address')));
?>
<div class="popin-map-container">
<div class="map-inner" id="map"
data-lat="<?php
echo core::config('advertisement.center_lat');
?>
"
data-lon="<?php
echo core::config('advertisement.center_lon');
?>
"
data-zoom="<?php
echo core::config('advertisement.map_zoom');
?>
"
示例8: __
<div class="clearfix"></div>
<?php
echo __('Add names for multiple categories, for each one push enter.');
?>
<div class="clearfix"></div><br>
<?php
echo FORM::open(Route::url('oc-panel', array('controller' => 'category', 'action' => 'multy_categories')), array('class' => 'form-inline', 'role' => 'form', 'enctype' => 'multipart/form-data'));
?>
<div class="form-group">
<div class="">
<?php
echo FORM::label('multy_categories', __('Name') . ':', array('class' => 'control-label', 'for' => 'multy_categories'));
?>
<?php
echo FORM::input('multy_categories', '', array('placeholder' => __('Hit enter to confirm'), 'class' => 'form-control', 'id' => 'multy_categories', 'type' => 'text', 'data-role' => 'tagsinput'));
?>
</div>
</div>
<div class="clearfix"></div>
<?php
echo FORM::button('submit', __('Send'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'category', 'action' => 'multy_categories'))));
?>
<?php
echo FORM::close();
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
示例9: array
?>
<div class="col-sm-4">
<?php
echo FORM::select($forms['to_top']['key'], array(FALSE => "FALSE", TRUE => "TRUE"), $forms['to_top']['value'], array('placeholder' => "", 'class' => 'tips form-control', 'id' => $forms['to_top']['key'], 'data-content' => __("Bring to top Ad"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Brings your Ad to the top of the listing.")));
?>
</div>
</div>
<div class="form-group">
<?php
echo FORM::label($forms['pay_to_go_on_top']['key'], __('To top price'), array('class' => 'control-label col-sm-3', 'for' => $forms['pay_to_go_on_top']['key']));
?>
<div class="col-sm-4">
<div class="input-group">
<?php
echo FORM::input($forms['pay_to_go_on_top']['key'], $forms['pay_to_go_on_top']['value'], array('placeholder' => "", 'class' => 'tips form-control col-sm-3', 'id' => $forms['pay_to_go_on_top']['key'], 'data-content' => __("Pricing"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("How much the user needs to pay to top up an Ad")));
?>
<span class="input-group-addon"><?php
echo core::config('payment.paypal_currency');
?>
</span>
</div>
</div>
</div>
<div class="form-group">
<?php
echo FORM::label($forms['paypal_seller']['key'], "<a target='_blank' href='http://open-classifieds.com/2013/09/02/pay-directly-from-ad/'>" . __('User paypal link') . "</a>", array('class' => 'control-label col-sm-3', 'for' => $forms['paypal_seller']['key']));
?>
<div class="col-sm-4">
<?php
示例10: __
?>
</div>
</div>
<?php
}
?>
<?php
if (isset($options['keys']['secret'])) {
?>
<div class="form-group">
<?php
echo FORM::label($api . '_secret_label', __('secret'), array('class' => 'control-label col-sm-4', 'for' => $api));
?>
<div class="col-sm-8">
<?php
echo FORM::input($api . '_secret', $options['keys']['secret']);
?>
</div>
</div>
<?php
}
?>
<hr>
<?php
}
?>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<?php
echo FORM::button('submit', 'Update', array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'social', 'action' => 'index'))));
示例11: array
?>
<option value="<?php
echo $service->id;
?>
" <?php
echo $selected;
?>
><?php
echo $service->name;
?>
</option>
<?php
}
?>
</select>
<div id="selected_services"></div>
<p>Заголовок</p>
<?php
echo FORM::input('title', Arr::get($values, 'title'));
?>
</fieldset>
<fieldset>
<legend>Текст уведомления</legend>
<?php
echo FORM::textarea('text', Arr::get($values, 'text'), array('id' => 'text'));
?>
</fieldset>
<?php
echo FORM::submit(NULL, 'Сохранить', array('class' => 'submit'));
echo FORM::close();
示例12: __
echo FORM::label($forms['banned_words']['key'], __('Baned Words'), array('class' => 'control-label col-sm-3', 'for' => $forms['banned_words']['key']));
?>
<div class="col-sm-4">
<?php
echo FORM::input($forms['banned_words']['key'], $forms['banned_words']['value'], array('placeholder' => "word1,word2,word3", 'class' => 'tips form-control', 'id' => $forms['banned_words']['key'], 'data-content' => __("Baned words are separated with coma (,)"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("You need to write your baned words enable the service.")));
?>
</div>
</div>
<div class="form-group">
<?php
echo FORM::label($forms['banned_words_replacement']['key'], __('Baned Words Replacement'), array('class' => 'control-label col-sm-3', 'for' => $forms['banned_words_replacement']['key']));
?>
<div class="col-sm-4">
<?php
echo FORM::input($forms['banned_words_replacement']['key'], $forms['banned_words_replacement']['value'], array('placeholder' => "xxx", 'class' => 'tips form-control', 'id' => $forms['banned_words_replacement']['key'], 'data-content' => __("Replacement of a banedword"), 'data-trigger' => "hover", 'data-placement' => "right", 'data-toggle' => "popover", 'data-original-title' => __("Baned word replacement replaces selected array with string that you provided.")));
?>
</div>
</div>
<?php
echo FORM::button('submit', 'Update', array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'settings', 'action' => 'form'))));
?>
</fieldset>
<?php
echo FORM::close();
?>
</div><!--end well-->
示例13: defined
<?php
defined('SYSPATH') or die('No direct script access.');
echo Message::show_errors($errors);
echo FORM::open($url);
?>
<fieldset>
<legend>Параметры модели автомобиля</legend>
<div class="clearfix">
<label for="name">Название модели</label>
<div class="input">
<?php
echo FORM::input('name', Arr::get($values, 'name'), array('id' => 'name', 'class' => 'span5'));
?>
</div>
</div>
<div class="clearfix">
<label for="car_id">Марка автомобиля</label>
<div class="input">
<?php
echo FORM::select('car_id', $cars, Arr::get($values, 'car_id'));
?>
</div>
</div>
</fieldset>
<?php
echo FORM::submit(NULL, 'Сохранить', array('class' => 'btn large success'));
echo FORM::close();
示例14: array
<?php
echo FORM::input('from_email', '', array('placeholder' => __('from_email'), 'class' => 'form-control', 'id' => 'from_email'));
?>
</div>
</div>
<?php
}
?>
<div class="form-group">
<?php
echo FORM::label('seotitle', __('Seotitle'), array('class' => 'control-label col-md-2', 'for' => 'seotitle'));
?>
<div class="col-sm-4">
<?php
echo FORM::input('seotitle', '', array('placeholder' => __('seotitle'), 'class' => 'form-control', 'id' => 'seotitle'));
?>
</div>
</div>
<div class="form-group">
<div class="col-sm-4">
<?php
echo FORM::hidden('type', $type, array('placeholder' => __('Type'), 'class' => 'form-control', 'id' => 'type'));
?>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label class="status">
示例15: array
<div class="controls">
<?php
echo FORM::input('full_name', Arr::get($values, 'full_name'), array('class' => 'span5'));
?>
<span class="help-inline"><?php
echo Arr::get($errors, 'full_name');
?>
</span>
<p class="help-block">напр. юго западный административный округ</p>
</div>
</div>
<div class="control-group">
<label for="name" class="control-label">Аббревиатура</label>
<div class="controls">
<?php
echo FORM::input('abbreviation', Arr::get($values, 'abbreviation'), array('class' => 'span5'));
?>
<span class="help-inline"><?php
echo Arr::get($errors, 'abbreviation');
?>
</span>
<p class="help-block">напр. ЮЗАО</p>
</div>
</div>
<div class="form-actions">
<?php
echo FORM::submit(NULL, 'Сохранить', array('class' => 'btn btn-large btn-success'));
?>
<?php
echo FORM::submit('edit_content', 'Сохранить и перейти к редактированию страницы', array('class' => 'btn btn-large btn-primary'));
?>