Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions helper/fieldhidden.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* Allows adding a single struct field as a bureaucracy hidden field
*
* This class is used when a field of the type struct_fieldhidden is encountered in the
* bureaucracy syntax.
*/
class helper_plugin_struct_fieldhidden extends helper_plugin_struct_field {
/**
* Render the field as XHTML
*
* Outputs the represented field using the passed Doku_Form object.
*
* @param array $params Additional HTML specific parameters
* @param Doku_Form $form The target Doku_Form object
* @param int $formid unique identifier of the form which contains this field
*/
function renderfield($params, Doku_Form $form, $formid) {
$this->_handlePreload();
$form->addHidden($params['name'], $this->getParam('value') . '');
}
}