Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Controller
- ------------------------
- public function action_contact(){
- // if(Input::post('send')){
- $email = \Email::forge();
- $email->from('catchall@xxx.com', 'My Name');
- $email->to('catchall@xxx.com', 'Johny Squid');
- $email->subject('This is the subject');
- $email->body('This is my message');
- $email->send();
- // Response::redirect('web/index');
- Session::set_flash('success', 'Contacto Enviado');
- // }
- $data = array();
- $this->template->title = 'No dudes en escribirnos';
- $this->template->content = View::forge('web/contact', $data);
- }
- ------------------------------------------------------------------------------------------------------------------------
- View
- ------------------------
- <?php echo Form::open('/web/contact'); ?>
- <?php echo Form::fieldset_open(
- array(
- 'class' => 'uk-form',
- 'style'=>'border: 0;',
- 'data-uk-margin'=>'')); ?>
- <div class="">
- <?php echo Form::input('name',
- Input::post('name'),
- array(
- 'type' => 'text',
- 'class'=> 'uk-width-1-1',
- 'placeholder'=>'Cuentanos como te llamas')); ?>
- </div>
- <div class="">
- <?php echo Form::input('telefono',
- Input::post('telefono'),
- array(
- 'type' => 'text',
- 'class'=> 'uk-width-1-1',
- 'placeholder'=>'Nos quieres dejar tu telefono para que te llamemos')); ?>
- </div>
- <div class="">
- <?php echo Form::input('email',
- Input::post('email'),
- array(
- 'type' => 'text',
- 'class'=> 'uk-width-1-1',
- 'placeholder'=>'Quieres que te enviemos la informacion a una casilla de mail')); ?>
- </div>
- <div class="">
- <?php echo Form::textarea('main',
- Input::post('main'),
- array(
- 'type' => 'textarea',
- 'style'=> 'height: 250px',
- 'class'=> 'uk-width-1-1',
- 'placeholder'=>'Que informacion o datos estarĂas necesitando que te brindemos')); ?>
- </div>
- <?php echo Form::submit('send', 'Enviar',
- array(
- 'type' => 'button',
- 'class' => 'uk-button uk-button-primary uk-button-large',
- 'style' => 'float:right; color: #F5F7F9')); ?>
- <?php echo Form::fieldset_close(); ?>
- <?php echo Form::close(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement