Function __global->build_keep_form_fields

Definitions

sources/urls.php

  • Get hidden fields for a form representing 'keep_x'. If we are having a GET form instead of a POST form, we need to do this. This function also encodes the page name, as we'll always want that.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$page ID_TEXT No No Blank (empty string) N/A N/A The page for the form to go to (blank: don't attach)
$keep_all boolean No No False N/A N/A Whether to keep all elements of the current URL represented in this form (rather than just the keep_ fields, and page)
$exclude array No No [] N/A N/A A list of parameters to exclude

Returns

  • The built-up hidden form fields
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get hidden fields for a form representing 'keep_x'. If we are having a GET form instead of a POST form, we need to do this. This function also encodes the page name, as we'll always want that.
 *
 * @param  ID_TEXT $page The page for the form to go to (blank: don't attach)
 * @param  boolean $keep_all Whether to keep all elements of the current URL represented in this form (rather than just the keep_ fields, and page)
 * @param  array $exclude A list of parameters to exclude
 * @return Tempcode The built-up hidden form fields
 */

function build_keep_form_fields(string $page = '', bool $keep_all = false, array $exclude = []) : object