Function Module_topics->get_poll_form_fields
Definitions
forum/pages/modules/topics.php
- Get Tempcode for a topic poll adding/editing form.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: object
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$forum_id | ?AUTO_LINK | Null | N/A | N/A | The ID of the forum to which the poll is being added (null: it is a private topic) |
$new_poll | boolean | True | N/A | N/A | Whether we are making a new poll opposed to editing a poll |
$question | SHORT_TEXT | Blank (empty string) | N/A | N/A | The poll question |
$answers | array | [] | N/A | N/A | A list of current answers for the poll |
$is_private | BINARY | 0 | N/A | N/A | Whether it is a private poll (blind poll, where the results aren't visible until made public) |
$is_open | BINARY | 1 | N/A | N/A | Whether the poll is open for voting |
$requires_reply | BINARY | 0 | N/A | N/A | Whether a reply to the poll topic is required before voting |
$minimum_selections | integer | 1 | N/A | N/A | The minimum number of selections for voters |
$maximum_selections | integer | 1 | N/A | N/A | The maximum number of selections for voters |
$poll_closing_time | ?TIME | Null | N/A | N/A | The time this poll will close voting (null: the poll will not close automatically) |
$view_member_votes | BINARY | 0 | N/A | N/A | Whether others should be able to view individual members' votes in the results |
$vote_revocation | BINARY | 1 | N/A | N/A | Whether voting revocation should be allowed on this poll |
$guests_can_vote | BINARY | 1 | N/A | N/A | Whether guests can vote on the poll without logging in |
$point_weighting | BINARY | 0 | N/A | N/A | Whether votes will be weighed according to how many points voters have |
Return
- The Tempcode for the fields
- Type: Tempcode
- Set: N/A
- Range: N/A