Guest User

Untitled

a guest
Jan 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. <h2>Inscreva-se no evento</h2>
  2. <?php
  3. function newLine($value) {
  4. $replacee = "><";
  5. $replaceBy = ">\n<";
  6. return str_replace($replacee,$replaceBy,$value);
  7. }
  8.  
  9. $formFields = array(
  10. $this->Form->create('Inscricao',array(
  11. 'url' => array(
  12. 'controller' => 'inscricoes',
  13. 'action' => 'inscrever'))),
  14. $this->Form->input('nome', array(
  15. 'error' => array(
  16. 'notEmpty' => __('O Nome é obrigatório', true)),
  17. 'label' => 'Nome :',
  18. 'class' => 'form_field',
  19. 'tabindex' => '110',
  20. 'div' => array(
  21. 'class' => 'form_fields'),
  22. 'maxlength' => '50')),
  23. // $this->Form->error('nome'),
  24. $this->Form->input('email', array(
  25. 'label' => 'E-mail :',
  26. 'class' => 'form_field',
  27. 'tabindex' => '120',
  28. 'div' => array(
  29. 'class' => 'form_fields'),
  30. 'maxlength' => '100')),
  31. // $this->Form->error('email'),
  32. $this->Form->input('telefone', array(
  33. 'label' => 'Telefone :',
  34. 'class' => 'form_field',
  35. 'tabindex' => '130',
  36. 'div' => array(
  37. 'class' => 'form_fields'),
  38. 'maxlength' => '10')),
  39. // $this->Form->error('telefone'),
  40. $this->Form->input('endereco', array(
  41. 'label' => 'Endereço :',
  42. 'class' => 'form_field',
  43. 'tabindex' => '140',
  44. 'div' => array(
  45. 'class' => 'form_fields'),
  46. 'maxlength' => '100')),
  47. // $this->Form->error('endereco'),
  48. $this->Form->submit('inscreva-me', array(
  49. 'class' => 'InscricaoInscreverFormSubmit',
  50. 'tabindex' => '150',
  51. 'div' => array(
  52. 'class' => 'InscricaoInscreverFormSubmit'))));
  53. foreach($formFields as $value) {
  54. echo newLine($value) . PHP_EOL;
  55. // echo $value . PHP_EOL;
  56. }
  57. echo $this->Form->end();
  58. ?>
Add Comment
Please, Sign In to add comment