![]() |
Quote:
|
Suggestion: Change phrase
Quote:
Quote:
If a user has exceeded the limit for number of times he can submit the form, redirect him immediately to the edit form. |
Bugs:
|
Quote:
1. Replace in plugin Easy Forms Part 1 Code:
if ($form[submitlimitperuser] >= 1) Code:
if (!$formresult && $form[submitlimitperuser] >= 1) 2. In same plugin in the area after Code:
if ($_POST['do'] == 'postform') Code:
if ($count >= $form[submitlimitperuser]) Code:
if ($count > $form[submitlimitperuser]) |
Bug: Poll displays free text entries
Solution: Replace in plugin Easy Forms Part 3 short after Code:
if ($_REQUEST['do'] == 'formresults_poll') Code:
$formbits = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "formbits WHERE fid = $fid AND type != 7 ORDER BY displayorder ASC"); 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"); |
Quote:
(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') Code:
if ($_REQUEST['do'] == 'deleteformresult') |
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) Code:
$id = $db->query_first("SELECT id FROM " . TABLE_PREFIX . "formresults WHERE fid = '$fid' AND userid = " . $vbulletin->userinfo[userid] . ""); |
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"); Code:
$formresults = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "formresults WHERE fid = '$fid' $search AND userid=" . $vbulletin->userinfo[userid] . " ORDER BY time DESC"); |
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']) Code:
if ($complete && $show['editing']) |
I love this product! Therefore I took some time to look into it and I have some suggestions for its database structure
|
All times are GMT. The time now is 05:38 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|