Function __global->get_attachments
Definitions
sources/form_templates.php
- Get what we need to get attachments in a form-field interface.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $posting_field_name | ID_TEXT | No | No | required parameter | N/A | N/A | The name of the field attachments are for |
| $true_attachment_ui | boolean | No | No | True | N/A | N/A | Include a true attachment UI (as opposed to something say on a contact form) |
Returns
- A pair: the attachments UI (Tempcode), the hidden attachment field
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get what we need to get attachments in a form-field interface.
*
* @param ID_TEXT $posting_field_name The name of the field attachments are for
* @param boolean $true_attachment_ui Include a true attachment UI (as opposed to something say on a contact form)
* @return array A pair: the attachments UI (Tempcode), the hidden attachment field
*/
function get_attachments(string $posting_field_name, bool $true_attachment_ui = true) : array
* Get what we need to get attachments in a form-field interface.
*
* @param ID_TEXT $posting_field_name The name of the field attachments are for
* @param boolean $true_attachment_ui Include a true attachment UI (as opposed to something say on a contact form)
* @return array A pair: the attachments UI (Tempcode), the hidden attachment field
*/
function get_attachments(string $posting_field_name, bool $true_attachment_ui = true) : array

