vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - Easy Forms v4.x - Create a form or multiple forms without php or html knowledge (https://vborg.vbsupport.ru/showthread.php?t=234385)

bananalive 07-18-2010 09:06 AM

Quote:

Originally Posted by Nikola Bosnjak (Post 2070816)
Sssooo usefull mod. Thanks! I have a problem, my "Forum" tab is hiden by "Tabs VbSoporte" mod. After I installed this (Easy Forms) mod, I enabled it as a new tab, and then disabled it in VB Options. After that, my "Forum" tab apears ocasionaly, actualy only when I'm using "misc.php" script, like when I'm editing a form, or when I'm answering to it, etc.

This might not be related to this mod, I can't say becouse I never used misc.php script before, but now this does not looks nice. What can I do exept enabling again a "Forms" tab? Becouse when I enable this tab, "Forum" does not apear, I can enable and disable "Forum" tab by previously mentioned mod.

Is there some trick like I have to uninstall and install back this mod, or manualy edit some template? Disabling and enabling Tabs VB Soporte does not help.

It will probably be to do with Tabs VB Soporte

What settings do you set here: https://vborg.vbsupport.ru/attachmen...4&d=1264001585

Try adding misc to the THIS_SCRIPT field of the tab you want to use instead of "FORUM"

bananalive 07-18-2010 09:08 AM

Quote:

Originally Posted by thetgc (Post 2068006)
Hi,

Is there any way you can add an 'anonymous' features, so the person who is using the form can submit it anonymously. Like a checkbox feature of something???
Thanks

  1. Edit Form
  2. Add the following to both Form Hook: Form Start: and Form Hook: Before Submit:
    $vbulletin->userinfo['userid'] = 0;
    $vbulletin->userinfo['username'] = 'Anonymous';

bananalive 07-18-2010 09:24 AM

Quote:

Originally Posted by riskofficer (Post 2067771)
Or may be convert Dropdown select to Radio button? Is there a way to do that, so to don't lose all information containing in Dropdown field?

Bananalive, could you please, help me :)

Added in v4.1.6

bananalive 07-18-2010 09:33 AM

Quote:

Originally Posted by riskofficer (Post 2067220)
Thank you! Do you know where can I change width of dropdown menu? In default there is no such option in EasyForms.

Added in v4.1.6

bananalive 07-18-2010 09:38 AM

Quote:

Originally Posted by alexm (Post 2067211)
Does anyone know how to make it so that an attachment is mandatory? Or at least if there is no attachment then put something in the custom output saying so?

Using the quoted code:

I've added line which prevents form being submitted if there are no attachments.

Quote:

Originally Posted by bananalive (Post 2056918)
Form Hook: Before Submit:
PHP Code:

if (empty($postattach))
{
    
$currentattaches $db->query_read("
    SELECT dateline, filename, attachmentid
    FROM " 
TABLE_PREFIX "attachment
    WHERE posthash = '" 
$db->escape_string($posthash) . "'
    AND userid = " 
$vbulletin->userinfo['userid']
    );

    while (
$attach $db->fetch_array($currentattaches))
    {
        
$postattach["$attach[attachmentid]"] = $attach;
        
$attachcount++;
        
$formoutput str_replace('[attach]'.$attachcount.'[/attach]','[attach]'.$attach['attachmentid'].'[/attach]',$formoutput);
    }
}
if (
$attachcount == 0)
{
    
$complete false;


Then use this in Custom Form Output:

Code:

[attach]1[/attach]


bananalive 07-18-2010 09:39 AM

Quote:

Originally Posted by pltillman (Post 2065337)
Is there a way that I can hook into the action of deleting a form entry result?

Sorry there are no hooks at that point.

bananalive 07-18-2010 09:44 AM

Quote:

Originally Posted by WILFMAN (Post 2064198)
Is there any way I can stop the form title appearing in the output (post)?

Thanks

Edit Form

Remove the contents of the field: 'Form Output Top BB code'

bananalive 07-18-2010 09:45 AM

Quote:

Originally Posted by Billspaintball (Post 2064612)
Bananalive, thank you for all the time and effort that you have put into creating this really handy mod.
I have been keeping an eye on it since it was released, and it now looks like it has all the features that I need. :D

I have just started playing with setting up some forms on my test system and have a question.
My scenario is that I have a form that submits its output to a forum and into the database.
I want to have a link in the forum post that is submitted that links right back to the edit function for this forms result so that users can easily edit their own form results if needed.

For example the link would be something like - http://testsite/forums/misc.php?do=e...ult&id=3&fid=1
I know I could just link to the list of forms with http://testsite/forums/misc.php?do=formresults&fid=1, but I would prefer to link to the exact form.

How would I get the id= variable to include in the url when submitting?

No. The post gets created before the database entry.

Edit:

Although, if you uncheck 'Save to Database' in Edit Form

Then add the following code to Form Hook: Before Submit:

PHP Code:

    if ($complete && !$show['editing'])
    {
        
$sdata serialize($qo);
        
$db->query_write("INSERT INTO " TABLE_PREFIX "formresults
        (fid, userid, username, time, title, output, sdata)
        VALUES ('"
.$form[fid]."', '".$vbulletin->userinfo['userid']."', '".$db->escape_string($vbulletin->userinfo['username'])."', ".TIMENOW.", '".$db->escape_string($threadtitle)."', '".$db->escape_string($formoutput)."', '".$db->escape_string($sdata)."')
        "
);
        if (
$form[submitmessage])
        {
            
$errormessage $form[submitmessage];
        }
        else
        {
            
$errormessage "Form was submitted successfully.";
        }
        
        
$formoutput .= "\r\n\r\n[url]http://testsite/forums/misc.php?do=editformresult&id=" $db->insert_id() . "&fid=" $fid "[/url]";
    } 


bananalive 07-18-2010 10:00 AM

Quote:

Originally Posted by alexm (Post 2063086)
I may be missing something here, but I have my submit limit set to 1 (I only want them to be able to answer a survey once), however as administrator I can't edit any submissions, including my own, without this error: "Error, you have exceeded limit for number of times this form can be submitted."

I did fix that, but it appears to have unfixed itself :confused:

Anyways, fixed in v4.1.6

bananalive 07-18-2010 10:09 AM

Quote:

Originally Posted by alexm (Post 2062762)
First of all well done on an excellent mod!

I was wondering if there was a way to sort the poll results as they appear in the graphs, either keep the options in the same order they appear in the form or sort them by %. At the moment the order they appear in the graphs seems random?

many thanks,

Alex

In v4.1.6 they are sorted by Decreasing %


All times are GMT. The time now is 10:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02006 seconds
  • Memory Usage 1,773KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete