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


PHP Form::email方法代码示例

本文整理汇总了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);
}
开发者ID:Pioneer-Web-Development,项目名称:MangoV2,代码行数:52,代码来源:forms.php

示例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);
 }
开发者ID:nkwsy,项目名称:ParkingAppeal,代码行数:16,代码来源:form.test.php

示例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();
开发者ID:kleitz,项目名称:brackets,代码行数:31,代码来源:index.blade.php

示例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&oacute;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 
}
?>
开发者ID:GazzD,项目名称:asoyaracuy,代码行数:31,代码来源:367c55d5f3bdbd177421fce7314012990297dcc8.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>
开发者ID:ruslankus,项目名称:lavarel-lessons,代码行数:31,代码来源:edit.blade.php

示例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>
开发者ID:yiannisSt,项目名称:mecha-cms,代码行数:10,代码来源:comment.form.email.php

示例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 
开发者ID:sendersys,项目名称:sendersys.ru,代码行数:31,代码来源:login.blade.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();
}
开发者ID:Pioneer-Web-Development,项目名称:MangoV2,代码行数:11,代码来源:preferences.php

示例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();
?>
开发者ID:AdrienLeveque,项目名称:Room_Project,代码行数:30,代码来源:72b94867262b88e394c831fdee9630de044fe7a4.php

示例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>
开发者ID:sendersys,项目名称:sendersys.ru,代码行数:31,代码来源:audience_segment.blade.php

示例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>
开发者ID:esskey,项目名称:Free_ads,代码行数:31,代码来源:compte.blade.php

示例12: array

					<div class="col-1">
						<div class="woocommerce-billing-fields">
							<h3>Informaci&oacute;n del usuario</h3>
							<label class="" for="house">Quinta</label>
							<?php 
echo Form::text('house', $user->house, ['readonly']);
?>

							<label class="" for="phone">Tel&eacute;fono</label>
							<?php 
echo Form::text('phone', $user->phone, array('placeholder' => 'Tel&eacute;fono'));
?>

							<label class="" for="email">Email</label>
							<?php 
echo Form::email('email', $user->email, array('placeholder' => 'Correo electrónico'));
?>

							<label class="" for="password">Contrase&ntilde;a</label>
							<?php 
echo Form::password('password', '');
?>

							<label class="" for="password_confirmation">Confirmaci&oacute;n de contrase&ntilde;a</label>
							<?php 
echo Form::password('password_confirmation', '');
?>

						</div>
					</div>
					<?php 
开发者ID:GazzD,项目名称:asoyaracuy,代码行数:31,代码来源:906f4d3a2a33c2d8c430b0c5b14a05ac8053f231.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'));
?>
开发者ID:moje-s,项目名称:anchor-cms,代码行数:31,代码来源:edit.php

示例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/>		
开发者ID:goodvibrations,项目名称:workshome,代码行数:31,代码来源:contacte.php

示例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 {
开发者ID:badchoice,项目名称:grog,代码行数:31,代码来源:Macros.php


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