Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Easy Forms v4.x - Create a form or multiple forms without php or html knowledge Details »»
Easy Forms v4.x - Create a form or multiple forms without php or html knowledge
Version: 4.3.0, by bananalive bananalive is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: New Posting Features - Version: 4.0.x Rating:
Released: 01-27-2010 Last Update: 10-04-2011 Installs: 1410
DB Changes Uses Plugins Auto-Templates
Additional Files Translations  
No support by the author.

Easily create forms with no HTML or PHP knowledge. Questions can be made compulsory and are checked before the form is submitted. Forms can be previewed. (You can create multiple forms)

Screenshots
There are two posts full of screenshots of this modificationInstallation
  1. Download and then extract .zip archive
  2. Upload the contents of upload folder to forum root
    (Allow Overwrite "YES" for overwrite)
    clientscript\easyforms.css -> \clientscript\
    clientscript\easyforms.js -> \clientscript\
  3. Import product file (product-easyforms v4.0.xml) in admincp
    AdminCP -> Plugins & Products -> Manage Products -> [Add/Import Product]
  4. Change usergroups permissions at:
    AdminCP -> vBulletin Options -> Easy Form Options
Question Types:
  • Single line text
  • Multi-line text
  • Multi-select checkboxes
  • Single-select radio buttons
  • Single Select Dropdown
  • Yes/No
  • Multi-line text field using vbeditor
  • Human verification question
  • Custom Question (can query database or do whatever you want using php and html)
  • Date (month/ day/ year fields)
  • Address
  • Scale
Form can Submit to:
  • new thread in forum
  • new post in thread
  • new pm to user
  • email address
  • save to database
More Features:
  • Form list categories (optional)
  • Preview form (can disable for individual forms)
  • Optional questions
  • Form Sections
  • Prefix support - you can choose which prefix you want thread to have
  • Different thread/pm title to form title with variables {username} {userid} and {q_1} (replacing 1 with appropriate question number)
  • Poll Options: Multiple choice, public vote, poll question, poll options, poll timeout
  • Regular expression match for single line text input field
  • Usergroup permissions per form
  • Forumid/threadid/username can be specified by input via {value=X} in dropdown, single line input or radio buttons
  • Multiple dropdown select for form usergroup permissions (still optional - leave blank to not use)
  • Option to show link to form list in navbar and quick links (separate options)
  • Import/ Export your forms as XML files - great for transferring forms across forums or creating backups
  • Specify bbcode for questions/ answers/ sections for the form's output
  • Form Hooks: (uses php code)
    1. Before form submitted
      Useful for: your own form validation, multiple form outputs, etc.
    2. At form start
      Useful for: banning userids/usergroups from form, setting minimum post count,etc.
  • Attachments allowed for posting new thread
  • Mass Copy Forms & their questions
  • Quiz Mode
Support this Modification
  • Click 'Marked as Installed'
  • Rate it 'Excellent'
  • Consider a donation

Download Now

File Type: zip vb_easyforms_v4.3.0.zip (67.6 KB, 4491 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #462  
Old 05-13-2010, 02:24 PM
XLCR GODFATHER XLCR GODFATHER is offline
 
Join Date: Mar 2010
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by riskofficer View Post
Thank you! One more thing about edit is something like "Usergroups Allowed to Edit Form Results". For example I'd like to leave this option (Edit Result) only for person whos answered (starter) and admins/moderators. BTW the option to delete results is in need of permissions too, I haven't found them.
I fully agree where leaving the delete option available makes it too easy for accidental click and should be a permission setting.
Reply With Quote
  #463  
Old 05-13-2010, 03:23 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Suggestion: Change phrase
Quote:
Error, you have exceeded limit for number of times this form can be submitted.
to
Quote:
Error, you have exceeded limit for number of times this form can be submitted.
Edit your submitted form.
Or better:
If a user has exceeded the limit for number of times he can submit the form, redirect him immediately to the edit form.
Reply With Quote
  #464  
Old 05-13-2010, 03:43 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bugs:
  • I can not edit my own entry if the maximum number of entries is limited to one.
  • After I delete my entry (have no entries any more), I can not vote again because "I exceeded the limit"
Reply With Quote
  #465  
Old 05-13-2010, 05:16 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ThorstenA View Post
Bugs:
  • I can not edit my own entry if the maximum number of entries is limited to one.
Solution for at least going to the edit form

1. Replace in plugin Easy Forms Part 1
Code:
    if ($form[submitlimitperuser] >= 1)
to
Code:
    if (!$formresult && $form[submitlimitperuser] >= 1)



2.
In same plugin in the area after
Code:
if ($_POST['do'] == 'postform')
replace
Code:
		if ($count >= $form[submitlimitperuser])
to
Code:
		if ($count > $form[submitlimitperuser])
Reply With Quote
  #466  
Old 05-13-2010, 05:38 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bug: Poll displays free text entries

Solution: Replace in plugin Easy Forms Part 3 short after
Code:
if ($_REQUEST['do'] == 'formresults_poll')
{
the code
Code:
	$formbits = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "formbits WHERE fid = $fid AND type != 7 ORDER BY displayorder ASC");
to
Code:
	$formbits = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "formbits WHERE fid = $fid AND type NOT IN (1,6,7,8,9) ORDER BY displayorder ASC");
Reply With Quote
  #467  
Old 05-13-2010, 06:24 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ThorstenA View Post
Bugs:
  • After I delete my entry (have no entries any more), I can not vote again because "I exceeded the limit"
Temporary, not really working solution
(This messes lots of things up in your database as userid 123 will have an effect on userid 12345). It is better to get the userids from a simple SELECT query of forumresults table.

Replace in plugin Easy Forms Part 2
Code:
if ($_REQUEST['do'] == 'deleteformresult')
{
	$caneditform = unserialize($vbulletin->options['caneditform']);
	if ($caneditform && !is_member_of($vbulletin->userinfo, $caneditform))
	{
		print_no_permission();
	}
	$id = $vbulletin->input->clean_gpc('g', 'id', TYPE_UINT);
	$fid = $vbulletin->input->clean_gpc('g', 'fid', TYPE_UINT);
	$db->query_write("DELETE FROM " . TABLE_PREFIX . "formresults WHERE id=$id");
	$db->query_write("UPDATE " . TABLE_PREFIX . "forms SET userids = REPLACE(userids,\"," . $vbulletin->userinfo[userid] . "\",\"\")  WHERE fid=$fid");
	$vbulletin->url = "misc.php?do=forms";	
	eval(print_standard_redirect('redirect_deleteq'));
}
to
Code:
if ($_REQUEST['do'] == 'deleteformresult')
{
	$caneditform = unserialize($vbulletin->options['caneditform']);
	if ($caneditform && !is_member_of($vbulletin->userinfo, $caneditform))
	{
		print_no_permission();
	}
	$id = $vbulletin->input->clean_gpc('g', 'id', TYPE_UINT);
	$fid = $vbulletin->input->clean_gpc('g', 'fid', TYPE_UINT);
	$db->query_write("DELETE FROM " . TABLE_PREFIX . "formresults WHERE id=$id");
	$db->query_write("UPDATE " . TABLE_PREFIX . "forms SET userids = REPLACE(userids,\"," . $vbulletin->userinfo[userid] . "\",\"\")  WHERE fid=$fid");
	$vbulletin->url = "misc.php?do=forms";	
	eval(print_standard_redirect('redirect_deleteq'));
}
Reply With Quote
  #468  
Old 05-13-2010, 06:35 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To have my users automatically redirect to the form results page where they can edit their entries if they exceeded their maximum entries, I use this code in plugin Easy Forums Part 1
Code:
    if (!$formresult && $form[submitlimitperuser] >= 1) 
    { 
        $userids = $form[userids]; 
        $userid = $vbulletin->userinfo[userid]; 
        $count = substr_count(",$userids,", ",$userid,"); 
        if ($count >= $form[submitlimitperuser]) 
        { 
	$vbulletin->url = "misc.php?do=formresults&fid=" . $fid;
	eval(print_standard_redirect('redirect_deleteq'));
             //$errormessage = "Error, you have exceeded limit for number of times this form can be submitted."; 
            //eval(standard_error($errormessage)); 
        } 
    }
I use this product as a review type. For each form a user can only have one entry. As I only have one entry to be displayed on this page anyway, I am redirecting my user to the edit page directly. For doing that I need the id of the formresults table:
Code:
    $id = $db->query_first("SELECT id FROM " . TABLE_PREFIX . "formresults WHERE fid = '$fid' AND userid = " . $vbulletin->userinfo[userid] . "");
	$vbulletin->url = "misc.php?do=editformresult&id=" . $id[id] . "&fid=" . $fid;
	eval(print_standard_redirect('redirect_deleteq'));
Reply With Quote
  #469  
Old 05-13-2010, 06:42 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is about the database "review" model where users are allowed to give an entry once (limit: 1).

Users are allowed to see the poll results from all users. However, for Privacy Reasons users can only see their own entries on form results table:

In plugin Easy Forms Part 3 replace
Code:
	$formresults = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "formresults WHERE fid = '$fid' $search AND userid=" . $vbulletin->userinfo[userid] . " ORDER BY time DESC");
to
Code:
	$formresults = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "formresults WHERE fid = '$fid' $search AND userid=" . $vbulletin->userinfo[userid] . " ORDER BY time DESC");
Reply With Quote
  #470  
Old 05-13-2010, 08:36 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After user has completed the entry successfully, he is redirected to the statistic page:

Replace in plugin Easy Forms Part 1
Code:
    if ($complete && $show['editing']) 
    { 
        $sdata = serialize($qo); 
        $db->query_write(" 
            UPDATE " . TABLE_PREFIX . "formresults 
            SET 
                title = '".$db->escape_string($threadtitle)."', 
                output = '".$db->escape_string($formoutput)."', 
                sdata = '".$db->escape_string($sdata)."' 
            WHERE 
                fid = '".$fid."' AND 
                id = '".$show['edit_id']."' 
        "); 
        $errormessage = "Form Result was successfully updated."; 
        $vbulletin->url = $vbulletin->options['bburl'] . "/misc.php?do=formresults&fid=$fid"; 
        eval(print_standard_redirect($errormessage, false, true)); 
    }
to
Code:
	    if ($complete && $show['editing']) 
    { 
        $sdata = serialize($qo); 
        $db->query_write(" 
            UPDATE " . TABLE_PREFIX . "formresults 
            SET 
                title = '".$db->escape_string($threadtitle)."', 
                output = '".$db->escape_string($formoutput)."', 
                sdata = '".$db->escape_string($sdata)."' 
            WHERE 
                fid = '".$fid."' AND 
                id = '".$show['edit_id']."' 
        "); 
        $errormessage = "Form Result was successfully updated."; 
	$vbulletin->url = $vbulletin->options['bburl'] . "/misc.php?do=formresults_poll&fid=$fid"; 
        eval(print_standard_redirect($errormessage, false, true)); 
    }
Reply With Quote
  #471  
Old 05-13-2010, 09:23 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love this product! Therefore I took some time to look into it and I have some suggestions for its database structure
  • Rename row time to dateline (as they do in the other vbulletin tables)
  • Remove username from table formresults and fetch username by querying user table.
    ("... FROM formresults, user WHERE formresults.userid=user.userid ...")
  • Remove userids from table forms and get this information from table forumresults. This is needed for limit users entries for a question. It is very hard to maintain duplicate (redundant) information. You have all these infos when querying forumresults table
    ("SELECT count(userid) AS usercount FROM forumresults WHERE fid=$fid AND userid=" . $vbulletin->userinfo[userid] ."")
  • Remove redirect from table forms. It is redundant to redirecturl.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:59 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06261 seconds
  • Memory Usage 2,389KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (16)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (19)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete