Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2.  
  3. // Add "completed" field
  4. $this->add(array(
  5. 'type' => 'checkbox',
  6. 'name' => 'completed',
  7. 'attributes' => [
  8. 'id' => 'completed',
  9. ],
  10. 'options' => array(
  11. 'label' => 'Completed',
  12. // 'use_hidden_element' => true,
  13. 'checked_value' => '1',
  14. 'unchecked_value' => '0'
  15. )
  16. ));// Add input filter for the "completed" field
  17. $inputFilter->add([
  18. 'name' => 'completed',
  19. 'required' => true,
  20. 'validators' => [
  21. [
  22. 'name' => 'Digits',
  23. ]
  24. ],
  25. ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement