SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top