You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
961 B

  1. <?php
  2. /**
  3. * Class helper_plugin_bureaucracy_fieldhiddenautoinc
  4. *
  5. * Creates an invisible field with a number that increases by 1 on each form submit
  6. */
  7. class helper_plugin_bureaucracy_fieldhiddenautoinc extends helper_plugin_bureaucracy_fieldnumber {
  8. /**
  9. * Arguments:
  10. * - cmd
  11. * - label
  12. *
  13. * @param array $args The tokenized definition, only split at spaces
  14. */
  15. function initialize($args) {
  16. $args[] = '++';
  17. parent::initialize($args);
  18. }
  19. /**
  20. * Render the field as XHTML
  21. *
  22. * Outputs the represented field using the passed Doku_Form object.
  23. *
  24. * @param array $params Additional HTML specific parameters
  25. * @param Doku_Form $form The target Doku_Form object
  26. * @param $formid
  27. */
  28. function renderfield($params, Doku_Form $form, $formid) {
  29. $this->_handlePreload();
  30. $form->addHidden($params['name'], $this->getParam('value') . '');
  31. }
  32. }