vb.org Archive

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

pursuited 02-05-2009 01:50 AM

Great addon!

I have a question I am not too good on the php part, but what would I put in the form start to prevent users from filling the form out who does not have 200 posts?

Thank you!

bananalive 02-05-2009 09:34 AM

Quote:

Originally Posted by pursuited (Post 1734803)
Great addon!

I have a question I am not too good on the php part, but what would I put in the form start to prevent users from filling the form out who does not have 200 posts?

Thank you!

Form Hook: Form Start:

PHP Code:

if($vbulletin->userinfo['posts'] < 200)
{
$errormessage "You need 200 posts to use this form.";
eval(
'print_output("' fetch_template('STANDARD_ERROR') . '");');



nelson.cabral 02-05-2009 01:27 PM

Hi !
I installed the plugin, but I cannot access the page misc.php?do=forms
Is there something to do after the installation to enable the product?

Answered : I should have read more carefully the description... Sorry for annoyance

nelson.cabral 02-05-2009 01:38 PM

When choosing the action "post to thread" or "post to new thread", is it possible to set the destination thread and/or the destination forum as a form argument?

bananalive 02-05-2009 01:59 PM

Quote:

Originally Posted by nelson.cabral (Post 1735162)
When choosing the action "post to thread" or "post to new thread", is it possible to set the destination thread and/or the destination forum as a form argument?

Yes use the form output complete hook.

PHP Code:

$form[where] = $q_{1}; 

(Replace 1 with appropriate # of the question)

nelson.cabral 02-05-2009 02:11 PM

Wow that was quick! Thank you!
If I want to set the list of all threads in a specific forum as a dropdown question items, is it also possible?

EDIT : more generally is it possible to generate forms choices with php?

bananalive 02-05-2009 02:19 PM

Quote:

Originally Posted by nelson.cabral (Post 1735190)
Wow that was quick! Thank you!
If I want to set the list of all threads in a specific forum as a dropdown question items, is it also possible?

Custom Question

php code:
PHP Code:

$answer '<select name="'.$formbit[id].'">';
$answer .= '<option></option>';
$thisanswer $q_{$formbit[id]};
$threads $db->query_read("SELECT * FROM " TABLE_PREFIX "thread
WHERE forumid = '10' 
ORDER BY title ASC"
);
    while(
$row $db->fetch_array($threads)) {
$answer .= '<option value="'.$row[threadid].'"';
if (
$row[threadid] == $thisanswer) {
$answer .= 'selected="selected"';
}
$answer .= '>'.$row[title].'</option>';
}
$answer .= '</select>'

(Change forumid = '10' to the forumid you want)

Quote:

EDIT : more generally is it possible to generate forms choices with php?
What do you mean?

nelson.cabral 02-05-2009 02:26 PM

You just answered my second question, I meant generate dropdown items with php (so that i can access database).

Is it possible to link questions? Ie. in a first dropdown list select a forum and in a second one select a thread in that forum?

TheFocusElf 02-05-2009 03:58 PM

Ban, the latest update is fabublous, my LAST question would be VBACMPS integration, survey of the month, for instance. Does it exist? Has anyone had success?

Copying the form elements and using as an HTML code has rendered FAIL for me so far!

Thanks in advance!

ssslippy 02-05-2009 05:35 PM

How do we search?

myke2008 02-05-2009 06:07 PM

Great Mod, thank you!

I wasl struggling with the moderated post thing.

I had the form set to post new thread in a forum.

I thought I had edited all the permissions for the forum to allow new posts from everybody but it still was moderating the new posts until I found this place that also needed to set to yes.

Quote:

Follow Forum Moderation Rules If no, posts are always placed into moderation queue
Now it works as intended.

I do have one question however, how can I change this url so that it opens the link without opening a new tab or page?

/misc.php?do=form&fid=1

Thanks again,

myke

brainfood 02-05-2009 07:19 PM

Quote:

Hi,

Is it possible to organize the answers to the form questions so they are displayed in a table when the form is posted to a thread?

I don't think there is a bbcode table tag. I might use HTML but do not want to turn it on for the whole forum. Plus I tried using HTML and it is displayed in the preview and looks really bad.

Thanks
Quote:

Originally Posted by bananalive (Post 1732828)
Use BB Code [table]

Sorry no, unless you manually edit them.


Hi, Are there any plans to save each question response to a database as a seperate field so that answers can later be pulled from the database. It will allow the answers to be used for any number of reasons.

Alternatively is it possible to apply the formatting after the answer is stored in the database? Right now the formatting is being saved as part of the response so any changes to the formatting is not retroactive. If the responses to each question are stored in a seperate field in the database then the answers can be formatted as they are pulled form the database and any subsequent changes to formatting will always be applied to the answers as they are pulled from the DB.

Thanks for the great mod!

Kiint 02-05-2009 09:52 PM

Well I've been using Form Hack for a long time now and I've just stumbled upon Easy Forms and to be honest I am amazed at how good this is, it's easy to use, it's easy to install and easy to configure.

Thanks for this :)

I'll be converting my forms over to this when I get some time, but one question for you:
My users sometimes create a checklist of things they have to do/achieve and then edit their list as and when they need to update things, something similar to this:

[ ] step 1
[X] step 2
[ ] step 3
[X] step 4

I've noticed that you can creat multiple checklist forms to create something like this, but is there any way to get it so that it creates its output like above and includes all the options but with a [] or [X] instead of just the selected options once a user submits the form?

Or is there anyway of re-editing a submitted form back into the original form template that created it? (so a user could change previous options they had saved)

Thanks again, and I will be nominating this for motm, nice work.

bananalive 02-06-2009 08:39 AM

1 Attachment(s)
Quote:

Originally Posted by Kiint (Post 1735573)
Well I've been using Form Hack for a long time now and I've just stumbled upon Easy Forms and to be honest I am amazed at how good this is, it's easy to use, it's easy to install and easy to configure.

Thanks for this :)

I'll be converting my forms over to this when I get some time, but one question for you:
My users sometimes create a checklist of things they have to do/achieve and then edit their list as and when they need to update things, something similar to this:

[ ] step 1
[X] step 2
[ ] step 3
[X] step 4

I've noticed that you can creat multiple checklist forms to create something like this, but is there any way to get it so that it creates its output like above and includes all the options but with a [] or [X] instead of just the selected options once a user submits the form?

Or is there anyway of re-editing a submitted form back into the original form template that created it? (so a user could change previous options they had saved)

Thanks again, and I will be nominating this for motm, nice work.

Sorry, I can't think of a way to do this atm
Quote:

Originally Posted by brainfood (Post 1735464)
Hi, Are there any plans to save each question response to a database as a seperate field so that answers can later be pulled from the database. It will allow the answers to be used for any number of reasons.

Alternatively is it possible to apply the formatting after the answer is stored in the database? Right now the formatting is being saved as part of the response so any changes to the formatting is not retroactive. If the responses to each question are stored in a seperate field in the database then the answers can be formatted as they are pulled form the database and any subsequent changes to formatting will always be applied to the answers as they are pulled from the DB.

Thanks for the great mod!

I decided against doing this as I thought it was over-complicated. Maybe storing the answers in php variables which could be eval'ed and then put through into the form layout. (It would be more server intensive though)

Quote:

Originally Posted by myke2008 (Post 1735406)
I do have one question however, how can I change this url so that it opens the link without opening a new tab or page?

/misc.php?do=form&fid=1

Thanks again,

myke

Glad it's working now.

target="_self"

Quote:

Originally Posted by nelson.cabral (Post 1735201)
You just answered my second question, I meant generate dropdown items with php (so that i can access database).

Is it possible to link questions? Ie. in a first dropdown list select a forum and in a second one select a thread in that forum?

I don't think so, I think that would require both addition JavaScript/ajax. Although if your experienced with java-script you could try adding your own java-script with $headinclude

Quote:

Originally Posted by ssslippy (Post 1735385)
How do we search?

See attached screenshot

designerweb 02-06-2009 12:08 PM

It is important to be able to call these via variable in other parts of the site. I thought that this is possible since you are now saving answers to database. Am I wonrg? If I am, Any plans to do this?

Vaupell 02-06-2009 02:20 PM

alright just testet the beta,,
Tx i needed that, it includes all my usergroups, where the other didnt.

Lovely.. :up:

biocyberman 02-06-2009 04:59 PM

This mod looks very promising. I am trying to make use of it. And I have a question: when I save to database, how do I do some kind of statistics from form submission data. After that I want to present the statistics in form of graphs. This mod then will work like a survey kit which make it very practical. Is is possible? If yes, a "hello world" tutorial, including form one time form submission limit, will be really helpful. I am sorry if the question has been asked cause I couldn't find it.

Kiint 02-06-2009 10:14 PM

How would I go about changing the output of the form so that it displays the answer next to the question, instead of underneath it?

Currently it's like this:

This is the question?
......This is the answer.

I would prefer it like this:

This is the Question? This is the answer

Edit: figured it out, just removed the Indent bb codes from the Answer BBcode: section and added \r\n\r\n in the 2nd box.

bananalive 02-07-2009 09:47 AM

Quote:

Originally Posted by biocyberman (Post 1736277)
This mod looks very promising. I am trying to make use of it. And I have a question: when I save to database, how do I do some kind of statistics from form submission data. After that I want to present the statistics in form of graphs. This mod then will work like a survey kit which make it very practical. Is is possible? If yes, a "hello world" tutorial, including form one time form submission limit, will be really helpful. I am sorry if the question has been asked cause I couldn't find it.

The form results are currently saved into the database like a post all in one field, so this wouldn't be possible.

pursuited 02-09-2009 09:41 AM

First thank you for answering my question! However in your help file you have an error:

Question:
How can I limit form access to users who have at least 10 posts?
Code:

if($vbulletin->userinfo['posts'] < 10)
{
$errormessage = "You need 200 posts to use this form.";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}

Should be:
Code:

if($vbulletin->userinfo['posts'] < 10)
{
$errormessage = "You need 10 posts to use this form.";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}

Not a big change, but might confuse some people.

Could you also help me in providing an example of a 'Custom Form Output'? I do not know where to even start there. Your help files states:
Quote:

Custom Form Output: (optional) You can create your own layout to the thread/ pm/ post/ email the form created. BB code and all macroses allowed. Leave blank to use default layout.
What do you mean by macros?

So could you provide a simple example of a custom form output please?

Thank you and for sure I nominated this mod!

Thanks Again!

tehtide 02-09-2009 11:36 AM

Is there a way that we could PM a notification to a different user on our forums when this form has been submitted?

Right now I'm using this as an application on our website. When the form is completed a poll is created in a forum that the submitting user cannot access. However I'd like the ability to shoot a notification pm off to another user in the forum to let them know that a new application has been submitted. Is there any easy way of doing this?

tehtide 02-09-2009 12:47 PM

Is there any way to keep the new thread when posted to not show-up in the users subscribed threads list?

bananalive 02-09-2009 02:15 PM

Quote:

Originally Posted by pursuited (Post 1738541)
First thank you for answering my question! However in your help file you have an error:

Question:
How can I limit form access to users who have at least 10 posts?
Code:

if($vbulletin->userinfo['posts'] < 10)
{
$errormessage = "You need 200 posts to use this form.";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}

Should be:
Code:

if($vbulletin->userinfo['posts'] < 10)
{
$errormessage = "You need 10 posts to use this form.";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}

Not a big change, but might confuse some people.

Could you also help me in providing an example of a 'Custom Form Output'? I do not know where to even start there. Your help files states:


What do you mean by macros?

So could you provide a simple example of a custom form output please?

Thank you and for sure I nominated this mod!

Thanks Again!

OK thanks updated help file.

Code:

{username}'s Form

{qn_3}: {q_3}
{qn_1}: {q_1}
{qn_2}: {q_2}


bananalive 02-09-2009 02:21 PM

Quote:

Originally Posted by tehtide (Post 1738644)
Is there any way to keep the new thread when posted to not show-up in the users subscribed threads list?

Try adding:
PHP Code:

$newpost['emailupdate'] = '0'

after
PHP Code:

$newpost['disablesmilies'] = '0'


bananalive 02-09-2009 02:24 PM

Quote:

Originally Posted by tehtide (Post 1738607)
Is there a way that we could PM a notification to a different user on our forums when this form has been submitted?

Right now I'm using this as an application on our website. When the form is completed a poll is created in a forum that the submitting user cannot access. However I'd like the ability to shoot a notification pm off to another user in the forum to let them know that a new application has been submitted. Is there any easy way of doing this?

Form hook, before submit
PHP Code:

        global $vbulletin$botpermissions;
        
$fromuserid $vbulletin->userinfo['userid'];
        
$fromusername $vbulletin->userinfo['username'];
        
$title $threadtitle
        
$recipients "ADMIN"
        
$message "New application [url=http://google.com]here[/url]";
        
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_ARRAY);
        
$pmdm->set('fromuserid'$fromuserid);
        
$pmdm->set('fromusername'$fromusername);
        
$pmdm->set('title'$title);
        
$pmdm->set('message'$message);
        
$pmdm->set_recipients($recipients$botpermissions);
        
$pmdm->set('dateline'TIMENOW); 
        
$pmdm->overridequota true;
        
$errors $pmdm->errors;
        if (
$errors)
        {
            foreach (
$errors as $error)
            {
                
$errorss .= $error"<br />";
            }
            
$errormessage "Form failed to submit. The following error(s) occured: <br /> ".$errorss;
            eval(
'print_output("' fetch_template('STANDARD_ERROR') . '");');
        }
        
$pmdm->save();
        unset(
$pmdm); 


Welshy2008 02-09-2009 10:54 PM

Installed and "Install" clicked.

Sorry for what may sound a dumb question, But - How do I select the usergroups that I want to see and use the forms that I make Please?

I , as Admin - am the only one that is allowed to make the form / put the forum together.

It appears that the E-mail form is not being E-mailed to me either. :(

Thanks in advance for your help.

Battle_Ring 02-10-2009 01:42 AM

Im using this for memebrs to submit Reviews

IS there a way that will lett the memebr filling out the form input a title that it will use for a thread title??

bananalive 02-10-2009 12:41 PM

Quote:

Originally Posted by Battle_Ring (Post 1739284)
Im using this for memebrs to submit Reviews

IS there a way that will lett the memebr filling out the form input a title that it will use for a thread title??

Use macrose (replacement variables) in the form {q_X} where X is the # number of the question. So for question 1 being the title use {q_1}

bananalive 02-10-2009 12:44 PM

Quote:

Originally Posted by Welshy2008 (Post 1739156)
Installed and "Install" clicked.

Sorry for what may sound a dumb question, But - How do I select the usergroups that I want to see and use the forms that I make Please?

I , as Admin - am the only one that is allowed to make the form / put the forum together.

It appears that the E-mail form is not being E-mailed to me either. :(

Thanks in advance for your help.

To set usergroup permissions for all form:
vbulletin options -> Easy Forms Options -> Select Usergroups
(hold down ctrl to select more than one usergroup)
To set usergroups permissions for one form
Edit Form -> Usergroup Permissions -> Check the usergoups allowed to view form
Blank = uses vbulletin options settings

Lone Gunman 02-10-2009 02:09 PM

have you released 2.9 yet? i just got this installed and saw there wasnt yet an option to redirect to a custom page after submitting form. was going to ask about that, but looks like youre already working on it.

also is there a way to choose multiple submit options on submit.... email and pm or email and post or post and pm, etc.... (if already answered my appologies and ill find it tonight when i read through the whole thread).

great job btw! thanks!

bananalive 02-10-2009 02:49 PM

Quote:

Originally Posted by Lone Gunman (Post 1739823)
have you released 2.9 yet? i just got this installed and saw there wasnt yet an option to redirect to a custom page after submitting form. was going to ask about that, but looks like youre already working on it.

also is there a way to choose multiple submit options on submit.... email and pm or email and post or post and pm, etc.... (if already answered my appologies and ill find it tonight when i read through the whole thread).

great job btw! thanks!

I'm working on v2.9 atm. A beta of it will be released soon. It will include optional redirect to url and allow multiple actions (eg. pm'ing & emailing the form).

RedeemedWarrior 02-11-2009 07:04 AM

Quote:

This page is not designed to be access directly.
whenever i submit a form

though i notice the forms do submit

Welshy2008 02-11-2009 09:18 AM

Quote:

Originally Posted by bananalive (Post 1739745)
To set usergroup permissions for all form:
vbulletin options -> Easy Forms Options -> Select Usergroups
(hold down ctrl to select more than one usergroup)
To set usergroups permissions for one form
Edit Form -> Usergroup Permissions -> Check the usergoups allowed to view form
Blank = uses vbulletin options settings


Hi - thanks for your reply,

Although that does work - the problem I get is that I cannot selct individual usergroups.

ie:
Administrators
Banned Users
Moderators
Not loggin
Super Moderators

I click on Administors and that is highlighted, I then click on moderators and the "Banned Users" between the two highlights. I have tried all ways to do it - but the Only way that I could get it to work is Add an "A" before the ones that I want to be able to view the form.

Also, how do I get it as a link please? It shows in the address bar as "http:// mywebsite.com/admin/index.php" or words to that effect, Sorry.

I can not get the security / Anti-spam question to work either.

I type the question, and the answer, but Both the question and answer show on my form. (Is the answer case sensitive? The reason I ask is that I entered the answer twice, once with a capital and agin with a lower case letter at the start of the answer. Maybe this is the reason).

I cannot get the Capatcha image on, by itself - I have to type a security question in for it to show.

Your help on the above matters would be very much appreciated.

RedeemedWarrior 02-11-2009 10:56 AM

ah as for my issue its talkerbot related

as for welshy have you tried ctrl as you select options?

that works for me :)

Welshy2008 02-11-2009 11:40 AM

Hi Redeemed - I followed the Mod's Instructions to the tee and used the "CTRL" Key.

It did work upto the point maentioned in my post above. post number 313

With regards to my question on the "Human Verification Question", It still don't work with just the one answer.

When I select the "HVQ" it shows the CaPacha image also. I just want one or the other.

Your help is appreciated and congratualations on a great hack.

bananalive 02-11-2009 12:59 PM

Quote:

Originally Posted by Welshy2008 (Post 1740638)
Hi - thanks for your reply,

Although that does work - the problem I get is that I cannot selct individual usergroups.

ie:
Administrators
Banned Users
Moderators
Not loggin
Super Moderators

I click on Administors and that is highlighted, I then click on moderators and the "Banned Users" between the two highlights. I have tried all ways to do it - but the Only way that I could get it to work is Add an "A" before the ones that I want to be able to view the form.

Also, how do I get it as a link please? It shows in the address bar as "http:// mywebsite.com/admin/index.php" or words to that effect, Sorry.

I can not get the security / Anti-spam question to work either.

I type the question, and the answer, but Both the question and answer show on my form. (Is the answer case sensitive? The reason I ask is that I entered the answer twice, once with a capital and agin with a lower case letter at the start of the answer. Maybe this is the reason).

I cannot get the Capatcha image on, by itself - I have to type a security question in for it to show.

Your help on the above matters would be very much appreciated.

If you only want one usergroup selected then don't hold down ctrl. To deselect a usergroup ctrl+click it.

That's due to the frames used in the admin control panel:
admincp/options.php?do=options&dogroup=easyforms

The human verification question is the default vBulletin human verification question.

There was error with human verification question which is causing it to display twice, which will be fixed in next version.

bananalive 02-11-2009 02:01 PM

1 Attachment(s)
Attached v3.0 Screenshots - Editing Form

v3.0
- Edit Form Redesigned
- Multiple Form Actions
- Redirect to url after form is submitted (accepts $newpost[postid] for newthread being created and $postid for new post in thread being created)
- Custom Form Output Conditionals: <if condition="$q[4]">$qn[4]: $q[4]<else />Field left blank</if>

nascartr 02-11-2009 02:18 PM

I have an error in beta 3.

At the top of the specific form's page there's this.

Quote:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/misc.php(100) : eval()'d code on line 3552

nascartr 02-11-2009 02:20 PM

Also, when trying to submit the forum I get errors saying the form was not filled out.

The form did not submit as the following questions are unanswered:
  • Pole Sitter
  • Wreckers
  • Checkers
  • Dominator
  • Underachiever
  • Wildcard

nascartr 02-11-2009 02:20 PM

Link to form
http://diecastcrazy.com/community/mi...?do=form&fid=1

Options selected are post to thread and pm form to user.


All times are GMT. The time now is 11:52 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.02593 seconds
  • Memory Usage 1,920KB
  • 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
  • (5)bbcode_code_printable
  • (6)bbcode_php_printable
  • (24)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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