[ABD] Customizable Forms

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
evshell18
Registered User
Posts: 25
Joined: Mon Aug 06, 2012 9:23 pm
Location: Harrisburg, PA
Contact:

[ABD] Customizable Forms

Post by evshell18 »

Modification Name: Customizable Forms
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
Features:
  • 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):

      Code: Select all

      	[b]{question}[/b]
      	[i]{description}[/i]
      	[list]
      	{answer}[*] {content}{/answer}
      	[/list]
      (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)
Known Bugs:
  • "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.
Screenshots: To be posted soon...

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
Last edited by evshell18 on Tue Dec 11, 2012 12:25 am, edited 7 times in total.
Senky
Extension Customisations
Extension Customisations
Posts: 2289
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: [BETA] Customizable Forms

Post by Senky »

Wow, that is perfect, metches almost everything user can think of!

Maybe one more suggestion: what about possibility to append forms to post? Maybe by specifying it's ID while creating new post, or by BBCode.
‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎📝‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‏‎‏‏‎ ‎ ‎ ‎🔔 ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎🛠
Forms Extension | Browser & Mobile Notifications Extension | Mixed Content Fixer Extension
evshell18
Registered User
Posts: 25
Joined: Mon Aug 06, 2012 9:23 pm
Location: Harrisburg, PA
Contact:

Re: [BETA] Customizable Forms

Post by evshell18 »

Thanks, I'm glad you like it!

You mean append forms to a single post (by editing the post), as opposed to appending each submission as posts to a topic (which the mod does)? Would you be able to elaborate on what the benefit of that would be? It seems to me it would be basically the same thing, except creating one very long post, which could end up being a little unmanageable.
User avatar
mladiucitelj
Registered User
Posts: 586
Joined: Sun Dec 12, 2010 12:33 am
Location: Slovenia, Europe

Re: [BETA] Customizable Forms

Post by mladiucitelj »

Subscribed and bookmarked! Just what I need!

Great, great job!
Don't forget to clear cache, refresh template, theme and imageset, double check all files :)

My mod: [MODDB] Menu System
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Customizable Forms

Post by Jessica »

Nice, gonna try it out
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [BETA] Customizable Forms

Post by keith10456 »

Wow! Looking good! I love that the results can be sent via PM :D
User avatar
mladiucitelj
Registered User
Posts: 586
Joined: Sun Dec 12, 2010 12:33 am
Location: Slovenia, Europe

Re: [BETA] Customizable Forms

Post by mladiucitelj »

Hm, after running custom_forms_install.php I got this error:

Adding a new database table: phpbb_forms
SQL ERROR Invalid default value for 'form_id'

---
No Forms in ACP tab .Mods. Added moduls manually, but can't see it. Can see it in my header.

Maybe because of an SQL error...

Need assistance, please.

EDIT: nevermind, I'll wait for RC for this mod. Hope then it works. Can't wait :)
Don't forget to clear cache, refresh template, theme and imageset, double check all files :)

My mod: [MODDB] Menu System
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Customizable Forms

Post by Jessica »

found a mistake in the install.xml..."constants.php" should be includes/constants.php
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Customizable Forms

Post by Jessica »

mladiucitelj wrote:Hm, after running custom_forms_install.php I got this error:

Adding a new database table: phpbb_forms
SQL ERROR Invalid default value for 'form_id'
same here.
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
mladiucitelj
Registered User
Posts: 586
Joined: Sun Dec 12, 2010 12:33 am
Location: Slovenia, Europe

Re: [BETA] Customizable Forms

Post by mladiucitelj »

Jessica wrote:found a mistake in the install.xml..."constants.php" should be includes/constants.php
Me too.
Don't forget to clear cache, refresh template, theme and imageset, double check all files :)

My mod: [MODDB] Menu System
evshell18
Registered User
Posts: 25
Joined: Mon Aug 06, 2012 9:23 pm
Location: Harrisburg, PA
Contact:

Re: [BETA] Customizable Forms

Post by evshell18 »

Sorry about that folks. I meant to spend a little more time testing out the install process, and then when I had the actual application all tested and ready to go, it kinda slipped my mind. :oops:

The new version should work a little better now.

Thanks for the catch on the install.xml, Jessica.
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Customizable Forms

Post by Jessica »

went to form settings, got this:

Code: Select all

Parse error: syntax error, unexpected '[' in /home/jesschen/public_html/phpBB3/includes/acp/acp_forms.php on line 307
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
evshell18
Registered User
Posts: 25
Joined: Mon Aug 06, 2012 9:23 pm
Location: Harrisburg, PA
Contact:

Re: [BETA] Customizable Forms

Post by evshell18 »

What version of PHP are you running? I may need to modify it to not use some newer code syntax.
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Customizable Forms

Post by Jessica »

I'm using php version 5.3.16
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
evshell18
Registered User
Posts: 25
Joined: Mon Aug 06, 2012 9:23 pm
Location: Harrisburg, PA
Contact:

Re: [BETA] Customizable Forms

Post by evshell18 »

Yep, that would do it. Found out that array dereferencing was added in PHP 5.4. Latest download should fix that one.
Locked

Return to “[3.0.x] Abandoned MODs”