本文整理汇总了PHP中Form::email方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::email方法的具体用法?PHP Form::email怎么用?PHP Form::email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form
的用法示例。
在下文中一共展示了Form::email方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: page
function page()
{
global $db, $session;
//lets get a user
$user = $db->from('users')->where('id', 1);
$formOptions = array('action' => $_SERVER['PHP_SELF'], 'id' => 'testForm', 'data' => $user, 'files' => true, 'class' => 'form-horizontal', 'sidebar' => true, 'title' => '', 'description' => '');
$form = new Form($formOptions, $session);
$sidebar = array('class' => 'warning', 'title' => 'Be careful!', 'body' => 'Be sure you complete all fields');
$form->setSidebar($sidebar);
$emailValidation = array('required' => 'true', 'error' => 'Please supply a valid email address');
$email = array('field' => 'email', 'label' => "Email", 'description' => '', 'validation' => $emailValidation);
$form->email($email);
$firstNameValidation = array();
$firstName = array('field' => 'firstname', 'label' => "First Name", 'description' => '', 'validation' => $firstNameValidation);
$form->text($firstName);
$lastName = array('field' => 'lastname', 'label' => "Last Name", 'description' => 'Fill in your last name');
$form->text($lastName);
$taName = array('field' => 'descriptionField', 'label' => "Last Name", 'description' => 'Fill in your last name');
$form->textarea($taName);
$phoneOptions = array('field' => 'phone', 'label' => "Phone", 'description' => 'Home Phone');
$form->phone($phoneOptions);
$checkOptions = array('field' => 'checkTest', 'label' => "Check here", 'description' => 'You authorize everything');
$form->checkbox($checkOptions);
$passwordValidation = array('pattern' => '(?=^.{6,}$)((?=.*\\d)|(?=.*\\W+))(?![.\\n])(?=.*[A-Z])(?=.*[a-z]).*$');
$passwordOptions = array('field' => 'password', 'label' => "Password", 'description' => 'Enter a password at least 6 characters, with at least one symbol and number.', 'validation' => $passwordValidation);
$form->password($passwordOptions);
/*
$dateValidation = array('disabledDays'=>'0,1','disabledDates'=>array("11/23/2015", "12/25/2015"), 'minDate'=>'11/1/2015', 'maxDate'=>'1/30/2016');
$secondDateValidation = array('disabledDays'=>'0,1','disabledDates'=>array("11/23/2015", "12/25/2015"), 'minDate'=>'11/1/2015', 'maxDate'=>'1/30/2016');
$dateOptions = array('field'=>'startdate', 'label'=>'Start/Stop Dates', 'description' =>'Enter a start and stop date', 'validation' => $dateValidation,
'second_field'=>'enddate', 'second_validation' => $secondDateValidation );
$form->date($dateOptions);
$timeValidation = array('stepping'=>5,'disabledDays'=>'0,1','disabledDates'=>array("11/23/2015", "12/25/2015"), 'minDate'=>'11/1/2015', 'maxDate'=>'1/30/2016');
$secondTimeValidation = array('disabledDays'=>'0,1','disabledDates'=>array("11/23/2015", "12/25/2015"), 'minDate'=>'11/1/2015', 'maxDate'=>'1/30/2016');
$dateOptions = array('field'=>'starttime', 'label'=>'Start/Stop Times', 'description' =>'Enter a start and stop time', 'validation' => $timeValidation,
'second_field'=>'endtime', 'second_validation' => $secondTimeValidation );
$form->time($dateOptions);
*/
$timeValidation = array('stepping' => 5, 'disabledDays' => '0,1', 'disabledDates' => array("11/23/2015", "12/25/2015"), 'minDate' => '11/1/2015', 'maxDate' => '1/30/2016');
$secondTimeValidation = array('stepping' => 5, 'disabledDays' => '0,1', 'disabledDates' => array("11/23/2015", "12/25/2015"), 'minDate' => '11/1/2015', 'maxDate' => '1/30/2016');
$dateOptions = array('field' => 'startdatetime', 'label' => 'Start/Stop Date Times', 'description' => 'Enter a start and stop date time', 'validation' => $timeValidation, 'second_field' => 'enddatetime', 'second_validation' => $secondTimeValidation);
$form->datetime($dateOptions);
$options = array('field' => 'department', 'options' => array(0 => 'Advertising', 1 => "Circulation", 2 => 'Production'), 'label' => 'Department', 'description' => 'Select your department');
$form->select($options);
$options = array('field' => 'publications', 'url' => '/ajax/forms/publications.php', 'label' => 'Publication', 'description' => 'Select a publication');
$form->remoteSelect($options);
$form->generate();
//var_dump($this->formScripts);
//grab any form scripts and append them to the global scripts array
$GLOBALS['scripts'] = array_merge($GLOBALS['scripts'], $form->formScripts);
}
示例2: testFormEmail
/**
* Test the compilation of form email
*
* @group laravel
*/
public function testFormEmail()
{
$form1 = Form::input('email', 'foo');
$form2 = Form::email('foo');
$form3 = Form::email('foo', 'foobar');
$form4 = Form::email('foo', null, array('class' => 'span2'));
$this->assertEquals('<input type="email" name="foo" id="foo">', $form1);
$this->assertEquals($form1, $form2);
$this->assertEquals('<input type="email" name="foo" value="foobar" id="foo">', $form3);
$this->assertEquals('<input class="span2" type="email" name="foo" id="foo">', $form4);
}
示例3: array
@layout('layout/default')
@section('content')
<div id="mainTitle">
<h1>Bracket</h1>
<hr />
<h2 class="center">Sign into your<br /> Bracket account</h2>
<hr />
</div>
<div class="mediaBreak mediaBreakLeft45">
<?php
echo Form::open('home/login', 'POST', array('id' => 'loginForm', 'autocomplete' => 'off'));
?>
<fieldset>
<?php
echo Form::email('email', Input::old('email'), array('placeholder' => 'Your email address', 'class' => 'lg center', 'autocomplete' => 'off'));
?>
</fieldset>
<fieldset>
<?php
echo Form::password('password', array('placeholder' => 'Top Secret Password', 'class' => 'lg center', 'autocomplete' => 'off'));
?>
</fieldset>
<fieldset>
<?php
echo Form::submit('Let Me In', array('class' => 'btn med success span100'));
?>
</fieldset>
<?php
echo Form::close();
示例4: e
</strong>
</span>
<?php
}
?>
</div>
</div>
<div class="form-group<?php
echo e($errors->has('email') ? ' has-error' : '');
?>
">
<label class="col-md-4 control-label" for="email">Correo electrónico</label>
<div class="col-md-6">
<?php
echo Form::email('email', $user->email, array('placeholder' => 'example@mail.com', 'class' => 'form-control'));
?>
<?php
if ($errors->has('email')) {
?>
<span class="help-block">
<strong><?php
echo e($errors->first('email'));
?>
</strong>
</span>
<?php
}
?>
示例5:
?>
<div class="col-md-6">
<?php
echo Form::text('name', null, ['class' => ' form-control']);
?>
</div>
</div>
<div class="form-group">
<?php
echo Form::label('email', 'E-Mail Address', ['class' => 'col-md-4 control-label']);
?>
<div class="col-md-6">
<?php
echo Form::email('email', null, ['class' => ' form-control']);
?>
</div>
</div>
<div class="form-group">
<?php
echo Form::label('country_id', 'Country', ['class' => 'col-md-4 control-label']);
?>
<div class="col-md-6">
<?php
echo Form::select('country_id', $countrySelect, null, ['class' => 'form-control']);
?>
</div>
</div>
示例6: array
<label class="grid-group">
<span class="grid span-1 form-label"><?php
echo $speak->email;
?>
</span>
<span class="grid span-5"><?php
echo Form::email('email', Guardian::wayback('email'), null, array('class' => 'input-block'));
?>
</span>
</label>
示例7: array
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Авторизация</title>
<link rel="stylesheet" href="{{ URL::asset('assets/css/login_form/reset.css') }}">
<link rel="stylesheet" href="{{ URL::asset('assets/css/login_form/animate.css') }}">
<link rel="stylesheet" href="{{ URL::asset('assets/css/login_form/styles.css') }}">
</head>
<body>
<div id="container">
<h1 class = "login_title">Авторизация</h1>
<?php
echo Form::open(array('method' => 'post'));
?>
<label for="name">E-mail:</label>
<?php
echo Form::email('email', null, array('id' => 'email', 'required'));
?>
<label for="username">Пароль:</label>
<?php
echo Form::password('password', array('id' => 'password', 'required'));
?>
<?php
echo Form::checkbox('remember', '1');
?>
<label class="check" for="checkbox">Запомнить меня</label>
<?php
if (isset($errors) && $errors != null) {
?>
<p class = "login__errors"><?php
示例8: prefGeneral
function prefGeneral($prefs)
{
global $db;
$formOptions = array('action' => 'preferences/prefsGeneral.php', 'data' => $prefs, 'files' => true, 'title' => 'General System');
$prefForm = new Form($formOptions);
$options = array('field' => 'systemEmailFromAddress', 'label' => "Email From Address", 'description' => 'Enter the email address that indicates where system messages originate');
$prefForm->email($options);
$options = array('field' => 'cronSystemEnabled', 'label' => "Cron System", 'description' => 'Check to enable cron system');
$prefForm->checkbox($options);
$prefForm->generate();
}
示例9: array
?>
<br>
<div class="col-sm-offset-4 col-sm-4">
<div class="panel panel-info">
<div class="panel-heading">Inscription à la lettre d'information</div>
<div class="panel-body">
<?php
echo Form::open(['route' => 'storeEmail']);
?>
<div class="form-group <?php
echo $errors->has('email') ? 'has-error' : '';
?>
">
<?php
echo Form::email('email', null, array('class' => 'form-control', 'placeholder' => 'Entrez votre email'));
?>
<?php
echo $errors->first('email', '<small class="help-block">:message</small>');
?>
</div>
<?php
echo Form::submit('Envoyer !', ['class' => 'btn btn-info pull-right']);
?>
<?php
echo Form::close();
?>
示例10: array
}
?>
"><a href="/dashboard/subscribers_change_status/8">Отписались</a></li>
<li class="audience__status__element <?php
if ($subscribers_change_status == 9) {
echo 'audience__status__element_selected';
}
?>
"><a href="/dashboard/subscribers_change_status/9">Пожаловались</a></li>
</ul>
<div class="col-md-3">
<?php
echo Form::open(array('url' => URL::to('dashboard/find_subscribers/' . $current_segment, array(), true), 'method' => 'post', 'class' => 'find_subscribers'));
?>
<?php
echo Form::email('search', null, array('id' => 'search', 'required', 'class' => 'search_subscribers form-control', 'placeholder' => 'Поиск подписчиков по email', 'title' => 'Введите email'));
?>
<?php
echo Form::hidden('hidden_segment', $current_segment, array('id' => 'hidden_segment', 'required'));
?>
<?php
echo Form::submit('Найти', array('class' => 'search_button btn btn-default btn-xs center-block'));
?>
<?php
echo Form::close();
?>
</div>
</div>
示例11:
<div id="container">
@if (Session::has('message'))
<div id="message_success">
<p>{{ Session::get('message') }}</p>
</div>
@endif
<div id="mes_infos">
<h2>Modification compte</h2>
<?php
echo Form::open(array('action' => 'UsersController@modification'));
echo Form::label('lastname', 'Nom');
echo Form::text('lastname', $infosUser['lastname']);
echo Form::label('firstname', 'Prenom');
echo Form::text('firstname', $infosUser['firstname']);
echo Form::label('email', 'E-Mail Address');
echo Form::email('email', $infosUser['email']);
echo Form::submit('Modifier');
echo Form::close();
?>
<?php
echo Html::link('Users/' . $infosUser['id'] . '/delete', 'Désactiver compte');
?>
</div>
@if ($errors->any())
<div id="erreurs">
@foreach ( $errors->all() as $error )
<p>{{ $error }}</p>
@endforeach
</div>
@endif
</div>
示例12: array
<div class="col-1">
<div class="woocommerce-billing-fields">
<h3>Información del usuario</h3>
<label class="" for="house">Quinta</label>
<?php
echo Form::text('house', $user->house, ['readonly']);
?>
<label class="" for="phone">Teléfono</label>
<?php
echo Form::text('phone', $user->phone, array('placeholder' => 'Teléfono'));
?>
<label class="" for="email">Email</label>
<?php
echo Form::email('email', $user->email, array('placeholder' => 'Correo electrónico'));
?>
<label class="" for="password">Contraseña</label>
<?php
echo Form::password('password', '');
?>
<label class="" for="password_confirmation">Confirmación de contraseña</label>
<?php
echo Form::password('password_confirmation', '');
?>
</div>
</div>
<?php
示例13: array
<?php
echo Form::text('name', Input::previous('name', $comment->name), array('id' => 'label-name'));
?>
<em><?php
echo __('comments.name_explain');
?>
</em>
</p>
<p>
<label for="label-email"><?php
echo __('comments.email');
?>
:</label>
<?php
echo Form::email('email', Input::previous('email', $comment->email), array('id' => 'label-email'));
?>
<em><?php
echo __('comments.email_explain');
?>
</em>
</p>
<p>
<label for="label-text"><?php
echo __('comments.text');
?>
:</label>
<?php
echo Form::textarea('text', Input::previous('text', $comment->text), array('id' => 'label-text'));
?>
示例14: route
<?php
}
?>
<?php
echo Form::open(array('class' => 'form-signin', 'url' => route('enviar.email')));
?>
<?php
echo Form::text('nom', null, array('placeholder' => 'Nombre', 'class' => 'form-control', 'autofocus', 'required', 'maxlength' => '250'));
?>
<br/>
<?php
echo Form::email('from', null, array('placeholder' => 'Email', 'class' => 'form-control', 'required', 'maxlength' => '80'));
?>
<br/>
<?php
echo Form::label('txtSubject', 'Asunto:', array('style' => 'margin-top:10px; margin-bottom:0px;'));
?>
<?php
echo Form::select('subject', array('Nuevo centro' => 'Añadir nuevo centro', 'Peticion' => 'Petición', 'Duda' => 'Duda', 'Consejo' => 'Consejo', 'Publicidad' => 'Publicidad', 'Otro' => 'Otro'), null, array('
placeholder' => 'Asunto', 'class' => 'form-control', 'style' => 'display:inline-block; float:right; width:350px', 'required'));
?>
<br/>
<br/>
<br/>
示例15: function
<?php
Html::macro("configForm", function ($type, $model, $field, $showDesc = false, $selectArray = null, $multiple = false) {
if ($type == "text") {
$b = Form::text($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]);
} else {
if ($type == "textarea") {
$b = Form::textarea($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]);
} else {
if ($type == "email") {
$b = Form::email($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]);
} else {
if ($type == "date") {
$b = Form::date($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]);
} else {
if ($type == "time") {
$b = Form::time($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]);
} else {
if ($type == "url") {
$b = Form::url($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]);
} else {
if ($type == "number") {
$b = Form::number($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]);
} else {
if ($type == "color") {
$b = Form::color($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => 'colorpicker']);
$b .= Form::text($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]);
} else {
if ($type == "select" && !$multiple) {
$b = Form::select($field, $selectArray, $model->{$field}, ['id' => $field]);
} else {