Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <?php
  2.  
  3. $form = $this->form;
  4.  
  5. $form->get('title')->setAttributes([
  6. 'class'=>'form-control',
  7. 'placeholder'=>'What needs to be done?'
  8. ]);
  9.  
  10. $form->get('completed')->setAttribute([
  11. 'class' => 'form-control',
  12. 'placeholder' => '',
  13. ], false);
  14.  
  15. $form->get('submit')->setAttributes(['class'=>'btn btn-primary']);
  16. $form->get('submit')->setValue('Save');
  17. $form->prepare();
  18. ?>
  19.  
  20. <h1>Edit todo</h1>
  21.  
  22. <div class="row">
  23. <div class="col-md-6">
  24. <?= $this->form()->openTag($form); ?>
  25.  
  26. <div class="form-group">
  27. <?= $this->formLabel($form->get('title')); ?>
  28. <?= $this->formElement($form->get('title')); ?>
  29. <?= $this->formElementErrors($form->get('title')); ?>
  30. </div>
  31.  
  32. <div class="form-group">
  33. <?= $this->formLabel($form->get('completed')); ?>
  34. <?= $this->formElement($form->get('completed')); ?>
  35. <?= $this->formElementErrors($form->get('completed')); ?>
  36. </div>
  37.  
  38. <?= $this->formElement($form->get('submit')); ?>
  39.  
  40. <?= $this->form()->closeTag(); ?>
  41. </div>
  42. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement