Function __global->get_posting_form
Definitions
sources/form_templates.php
- Creates a posting form, with attachment support.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $submit_name | mixed | No | No | required parameter | N/A | N/A | The title of the form submission button, provided in plain-text format (string or Tempcode) |
| $submit_icon | ID_TEXT | No | No | required parameter | N/A | N/A | The submit icon CSS class |
| $post | LONG_TEXT | No | No | required parameter | N/A | N/A | The default post to put in |
| $post_url | mixed | No | No | required parameter | N/A | N/A | Where the form is sent (URLPATH or Tempcode) |
| $hidden_fields | Tempcode | No | No | required parameter | N/A | N/A | A form_input_hidden buildup of hidden fields (additional parameters sent to the target URL) |
| $specialisation | Tempcode | No | No | required parameter | N/A | N/A | A buildup of leading extra fields, in a format compatible with the templates used by this function |
| $post_comment | ?mixed | No | No | Null | N/A | N/A | The post comment (string or Tempcode). This gives information about how you should post. (null: no post comment) |
| $extra | string | No | No | Blank (empty string) | N/A | N/A | Extra info to put on the posting form |
| $specialisation2 | ?Tempcode | No | No | Null | N/A | N/A | A buildup of trailing extra fields, in a format compatible with the templates used by this function. (null: none) |
| $default_parsed | ?Tempcode | No | No | Null | N/A | N/A | The parsed Comcode. (null: calculate) |
| $js_function_calls | array | No | No | [] | N/A | N/A | JavaScript functions to execute |
| $tabindex | ?integer | No | No | Null | N/A | N/A | The tab index of the field (null: not specified) |
| $required | boolean | No | No | True | N/A | N/A | Whether this is a required input field |
| $has_preview | boolean | No | No | True | N/A | N/A | Whether the form supports previewing |
| $support_wysiwyg | boolean | No | No | True | N/A | N/A | Whether to support WYSIWYG mode |
| $support_autosave | boolean | No | No | True | N/A | N/A | Whether to support auto-save |
| $specialisation2_hidden | boolean | No | No | False | N/A | N/A | Whether to hide trailing extra fields |
| $description | mixed | No | No | Blank (empty string) | N/A | N/A | A description for this input field, provided in HTML format (string or Tempcode) |
| $cancel_url | ?Tempcode | No | No | Null | N/A | N/A | Cancel URL for cancelling auto-save (null: no cancel button) |
| $staff_help_url | ?mixed | No | No | Null | N/A | N/A | URL staff can go to to get help (null: none) |
Returns
- The posting form
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Creates a posting form, with attachment support.
*
* @param mixed $submit_name The title of the form submission button, provided in plain-text format (string or Tempcode)
* @param ID_TEXT $submit_icon The submit icon CSS class
* @param LONG_TEXT $post The default post to put in
* @param mixed $post_url Where the form is sent (URLPATH or Tempcode)
* @param Tempcode $hidden_fields A form_input_hidden buildup of hidden fields (additional parameters sent to the target URL)
* @param Tempcode $specialisation A buildup of leading extra fields, in a format compatible with the templates used by this function
* @param ?mixed $post_comment The post comment (string or Tempcode). This gives information about how you should post. (null: no post comment)
* @param string $extra Extra info to put on the posting form
* @param ?Tempcode $specialisation2 A buildup of trailing extra fields, in a format compatible with the templates used by this function. (null: none)
* @param ?Tempcode $default_parsed The parsed Comcode. (null: calculate)
* @param array $js_function_calls JavaScript functions to execute
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @param boolean $required Whether this is a required input field
* @param boolean $has_preview Whether the form supports previewing
* @param boolean $support_wysiwyg Whether to support WYSIWYG mode
* @param boolean $support_autosave Whether to support auto-save
* @param boolean $specialisation2_hidden Whether to hide trailing extra fields
* @param mixed $description A description for this input field, provided in HTML format (string or Tempcode)
* @param ?Tempcode $cancel_url Cancel URL for cancelling auto-save (null: no cancel button)
* @param ?mixed $staff_help_url URL staff can go to to get help (null: none)
* @return Tempcode The posting form
*/
function get_posting_form($submit_name, string $submit_icon, string $post, $post_url, object $hidden_fields, object $specialisation, $post_comment = null, string $extra = '', ?object $specialisation2 = null, ?object $default_parsed = null, array $js_function_calls = [], ?int $tabindex = null, bool $required = true, bool $has_preview = true, bool $support_wysiwyg = true, bool $support_autosave = true, bool $specialisation2_hidden = false, $description = '', ?object $cancel_url = null, $staff_help_url = null) : object
* Creates a posting form, with attachment support.
*
* @param mixed $submit_name The title of the form submission button, provided in plain-text format (string or Tempcode)
* @param ID_TEXT $submit_icon The submit icon CSS class
* @param LONG_TEXT $post The default post to put in
* @param mixed $post_url Where the form is sent (URLPATH or Tempcode)
* @param Tempcode $hidden_fields A form_input_hidden buildup of hidden fields (additional parameters sent to the target URL)
* @param Tempcode $specialisation A buildup of leading extra fields, in a format compatible with the templates used by this function
* @param ?mixed $post_comment The post comment (string or Tempcode). This gives information about how you should post. (null: no post comment)
* @param string $extra Extra info to put on the posting form
* @param ?Tempcode $specialisation2 A buildup of trailing extra fields, in a format compatible with the templates used by this function. (null: none)
* @param ?Tempcode $default_parsed The parsed Comcode. (null: calculate)
* @param array $js_function_calls JavaScript functions to execute
* @param ?integer $tabindex The tab index of the field (null: not specified)
* @param boolean $required Whether this is a required input field
* @param boolean $has_preview Whether the form supports previewing
* @param boolean $support_wysiwyg Whether to support WYSIWYG mode
* @param boolean $support_autosave Whether to support auto-save
* @param boolean $specialisation2_hidden Whether to hide trailing extra fields
* @param mixed $description A description for this input field, provided in HTML format (string or Tempcode)
* @param ?Tempcode $cancel_url Cancel URL for cancelling auto-save (null: no cancel button)
* @param ?mixed $staff_help_url URL staff can go to to get help (null: none)
* @return Tempcode The posting form
*/
function get_posting_form($submit_name, string $submit_icon, string $post, $post_url, object $hidden_fields, object $specialisation, $post_comment = null, string $extra = '', ?object $specialisation2 = null, ?object $default_parsed = null, array $js_function_calls = [], ?int $tabindex = null, bool $required = true, bool $has_preview = true, bool $support_wysiwyg = true, bool $support_autosave = true, bool $specialisation2_hidden = false, $description = '', ?object $cancel_url = null, $staff_help_url = null) : object
