Author: evshell18
Modification Description: Allows forum admins to create a custom form that a user can fill out and submit. The form provides different fields (Text, Extended Text, Date, Number, Decimal, Two Options, Dropdown, Multichoice List) that can be filled out and posted to the following destinations: A new topic in a forum, A new post in a Stickied/Announce/Global topic, and/or a PM to specific Users and/or Groups.
Modification Version: 1.0.3-beta
Changes:
- 1.0.3-beta:
- Fixed permissions to allow Customizable Forms Builder to show up in the ACP.
- Fixed the page title of the forms and formlist pages.
- Added version info to "copyright" on form and formlist pages.
- Fixed "Forms" link not showing up.
- 1.0.2-beta: Modified code to allow for earlier versions of PHP
- 1.0.1-beta: Fixed install.xml and custom_forms_install.php
- 1.0.0-beta: Initial Release
- Access control to the form is defined by User and/or Groups
- Access can be granted to Guests to post to forms and an option can be selected for the form to be submitted anonymously by all users, even those logged in (for anonymous surveys)
- Posts are created as moderated by default, but option exists to override forum permissions and post directly
- PMs can be sent in addition to, or in place of posts to the forum or topic
- Headers can be added that are displayed on both the form entry and the posted result
- Forms can be categorized and a URL can be used to navigate to a single category
- Ability to enable or disable the entire forms mod as a Board Admin
- Ability to enable or disable specific forms with the change of a single option in the ACP
- Ability to hide or show a specific field on the form
- Validation for required fields, as well as date, decimal, and whole number formats
Planned Features:- Designate a form to be the form that appears when the user clicks "New Topic". This will only work for forms that are set up to post a new topic to a forum. For a given forum only one form will be able to be set this way.
- Similarly to the previous feature, if a form is designated to post to a Topic, add an option to have users be automatically redirected to the form that it is related to when the user clicks "Post Reply". Quick Reply and Quote options will be disabled. If the topic is locked, the Post Reply button will appear for all users since they will need the button to have them redirected to the form.
- Allow the form to update a profile field. A field type will be "Profile Field" which will then enable/show a dropdown that has a list of custom profile fields. When the user submits a form it will update the corresponding profile field. This may create situations where you have no target destination (i.e. if you want the form to just update profile fields and not post to a thread or send a PM). In this case, I could possibly include the ability to create a custom message to show when the form is submitted.
- Add field type for Upload. PHPBB allows attachments and has some settings for this. Look into using the same functions to limit file type / sizes / etc based on board settings.
- BBCode editor for how the content is presented. This will allow customization of the formatting of the resulting post or PM. Certain keyword placeholders in curly braces { } will be available to show where the content should go. As an example, the following is how it is posted now (which will also be the default):
(Note how answer is an opening/closing tag where the answer content is what is actually provided as an answer. This is because the multichoice list can have multiple answers, so the formatting within {answer}{/answer} is repeated for each one)
Code: Select all
[b]{question}[/b] [i]{description}[/i] [list] {answer}[*] {content}{/answer} [/list]
- "Two Options" field type does not default to No/Yes
- Get error "NO_RECIPIENT" if trying to PM when the recipient list is only the user submitting the form. I.E. if form is submitted to Administrators and there's only 1 person in that group, it errors when that 1 person tries to submit the form.
Demo URL: http://www.lotusfleet.org/phpBB3
Demo Username: Please register to test demo (can test anonymous survey example as guest).
Demo Admin: If you'd like to try the Form creation in the ACP, please fill out the Admin Request Form.
Modification Download: http://www.lotusfleet.org/phpBB3/download/file.php?id=5
Additional Info:
Permissions: There are two permissions defined by the mod...
- Admin -> Misc -> Can manage customizable forms
Function: Access to forms in ACP
Default Roles: Standard Admin, Full Admin
(Note that this requires access to whatever main category you put the module into, which defaults to Forums. However, you can create your own new category to just hold the Customizable Form Builder if you want the admin to only have this permission, as is done in the demo board.) - User -> Misc -> Can fill out forms
Function: If no specific permissions are defined when the form is created, this permission is used
Default Roles: Standard User, All Features