Function __global->actual_add_catalogue_field

Definitions

sources/catalogues2.php

  • Add a field to the specified catalogue, without disturbing any other data in that catalogue.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: int

Parameters

Name Type Default Set Range Description
$c_name ID_TEXT required parameter N/A N/A The codename of the catalogue the field is for
$name mixed required parameter N/A N/A The name of the field (either language string map or string)
$description mixed Blank (empty string) N/A N/A A description (either language string map or string)
$type ID_TEXT short_text N/A N/A The type of the field
$order ?integer Null N/A N/A The field order (the field order determines what order the fields are displayed within an entry) (null: next)
$defines_order BINARY 0 N/A N/A Whether this field defines the catalogue order
$visible BINARY 1 N/A N/A Whether this is a visible field
$sensitive BINARY 0 N/A N/A Whether this field may contain sensitive or personal data
$default LONG_TEXT Blank (empty string) N/A N/A The default value for the field
$required BINARY 0 N/A N/A Whether this field is required
$is_sortable BINARY 0 N/A N/A Whether the field is sortable
$include_in_main_search BINARY 0 N/A N/A Whether the field is included in main search
$allow_template_search BINARY 0 N/A N/A Whether to allow template search
$put_in_category BINARY 1 N/A N/A Whether the field is to be shown in category views (not applicable for the list display type)
$put_in_search BINARY 1 N/A N/A Whether the field is to be shown in search views (not applicable for the list display type)
$options SHORT_TEXT Blank (empty string) N/A N/A Field options
$id ?AUTO_LINK Null N/A N/A Force this ID (null: auto-increment as normal)

Return

  • Field ID
  • Type: AUTO_LINK
  • Set: N/A
  • Range: N/A