Function __global->append_form_custom_fields

Definitions

sources/fields.php

  • Append fields to content add/edit form for gathering custom fields.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$content_type ID_TEXT No No required parameter N/A N/A Content type hook codename
$id ?ID_TEXT No No required parameter N/A N/A Content entry ID (null: new entry)
&$fields Tempcode Yes No required parameter N/A N/A Fields (passed by reference)
&$hidden Tempcode Yes No required parameter N/A N/A Hidden Fields (passed by reference)
$field_filter ?array No No Null N/A N/A Limit fields to a set (null: no limit)
$field_filter_inclusion_list boolean No No True N/A N/A Whether $field_filter is a inclusion list (if false, it is a exclusion-list)
$add_separate_header boolean No No False N/A N/A Whether to add a separate header above the fields, so long as not all the fields are already under some other header

Preview

Code (PHP)

/**
 * Append fields to content add/edit form for gathering custom fields.
 *
 * @param  ID_TEXT $content_type Content type hook codename
 * @param  ?ID_TEXT $id Content entry ID (null: new entry)
 * @param  Tempcode $fields Fields (passed by reference)
 * @param  Tempcode $hidden Hidden Fields (passed by reference)
 * @param  ?array $field_filter Limit fields to a set (null: no limit)
 * @param  boolean $field_filter_inclusion_list Whether $field_filter is a inclusion list (if false, it is a exclusion-list)
 * @param  boolean $add_separate_header Whether to add a separate header above the fields, so long as not all the fields are already under some other header
 */

function append_form_custom_fields(string $content_type, ?string $id, object &$fields, object &$hidden, ?array $field_filter = null, bool $field_filter_inclusion_list = true, bool $add_separate_header = false)