Function __global->form_input_upload_multi_source

Definitions

sources/form_templates.php

  • Get the Tempcode for a multi-set upload, allowing selection from multiple different sources.Mainly for images, used with post_param_image or post_param_multi_source_upload.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$set_title mixed No No required parameter N/A N/A A human intelligible name for this input field, provided in plain-text format or as HTML via do_lang_tempcode/protect_from_escaping (string or Tempcode)
$set_description mixed No No required parameter N/A N/A A description for this input field, provided in HTML format (string or Tempcode)
&$hidden Tempcode Yes No required parameter N/A N/A A reference to where we're putting hidden fields
$set_name ID_TEXT No No image N/A N/A The name which this input field is for (actually, this is a prefix put in front of different input types)
$theme_image_type ?ID_TEXT No No Null N/A N/A The directory of theme images to provide selection from (null: do not support theme images)
$required boolean No No True N/A N/A Whether this is a required input field. Set this to false if you are using this field on an edit form and already have an uploaded file -- therefore you'd know no new file would mean not to replace the existing file
$default ?string No No Null N/A N/A The default value for the field (null: none) (blank: none). Should only be passed if $required is false, because it creates a delete button for the existing file, implying that leaving it with no file is valid
$support_syndication boolean No No False N/A N/A Whether to syndicate the file off
$filter ?string No No Null N/A N/A File type filter (null: autodetect)
$images_only ?integer No No 0 N/A N/A IMAGE_CRITERIA_* bitmask for images (null: not restricted to images)

Returns

  • The input field
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the Tempcode for a multi-set upload, allowing selection from multiple different sources.Mainly for images, used with post_param_image or post_param_multi_source_upload.
 *
 * @param  mixed $set_title A human intelligible name for this input field, provided in plain-text format or as HTML via do_lang_tempcode/protect_from_escaping (string or Tempcode)
 * @param  mixed $set_description A description for this input field, provided in HTML format (string or Tempcode)
 * @param  Tempcode $hidden A reference to where we're putting hidden fields
 * @param  ID_TEXT $set_name The name which this input field is for (actually, this is a prefix put in front of different input types)
 * @param  ?ID_TEXT $theme_image_type The directory of theme images to provide selection from (null: do not support theme images)
 * @param  boolean $required Whether this is a required input field. Set this to false if you are using this field on an edit form and already have an uploaded file -- therefore you'd know no new file would mean not to replace the existing file
 * @param  ?string $default The default value for the field (null: none) (blank: none). Should only be passed if $required is false, because it creates a delete button for the existing file, implying that leaving it with no file is valid
 * @param  boolean $support_syndication Whether to syndicate the file off
 * @param  ?string $filter File type filter (null: autodetect)
 * @param  ?integer $images_only IMAGE_CRITERIA_* bitmask for images (null: not restricted to images)
 * @return Tempcode The input field
 */

function form_input_upload_multi_source($set_title, $set_description, object &$hidden, string $set_name = 'image', ?string $theme_image_type = null, bool $required = true, ?string $default = null, bool $support_syndication = false, ?string $filter = null, ?int $images_only = 0) : object