Log in

View Full Version : New Posting Features - Easy Forms v4.x - Create a form or multiple forms without php or html knowledge


Pages : 1 2 [3] 4 5 6 7 8 9

your24hourstore
05-20-2010, 12:51 AM
Good Day All,

I have a small cosmetic issue on the Form List page layout. This is not impacting functionality, just hard for an old person like me to read or I'd leave as is.

If someone could tell me how to fix...or what the issue is, I'd be grateful.

Steps I've Taken to Fix: Completely uninstalled the mod including clientscripts. Downloaded a clean version and reinstalled. Issue remains.

On the Forms List Page, the different form sections are not showing as they do in the screenshot attached to Post #1 here...

Screen shots below...

#1: How They Appear on My Forum (Custom and Default Styles)

http://i156.photobucket.com/albums/t35/stargatecommandrpg/Babylon%205/B5%20Graphics/CurrentScreen.jpg


#2: How They Should Appear Per Screenshot Here....

http://i156.photobucket.com/albums/t35/stargatecommandrpg/Babylon%205/B5%20Graphics/FormsShouldBe.jpg

Please let me know if you can help.

Thanks for an amazing mod that my RPG site loves!

Warmest Regards,

Alisa:D

margins are bit less but
I think i see the blocks in the dark pic the style is just not highlighting them!
other than that it looks right nice styleing BTW

promoprompt
05-20-2010, 03:52 PM
Great work, looks good.

I´f install it at a testforum. My biggest startproblem was, to find the adjustment of rights.

Here for VB4.0.3 Suite (CMS)
German: ACP --> VBulletin-Einstellungen --> last Entry in the List( Easy Forms Options)

English: ACP --> VBulletin-Setup --> last Entry in the List( Easy Forms Options)

It´s essential, to set on all options, the Admin-Rights (plus what you want). After THAT, you can start with EasyForms! Normaly nobody see Easyforms.

As I wish to add the functionality to post into the BLOG
What settings needed, for an unregistert user (normal Internetsurfer) to see sepcial Forms?

Greetings promoprompt

Sugoi na
05-21-2010, 10:27 PM
Anyway to make it so usergroups can only edit THERE forms? My forum is designed to allow users to create forms so others on the forum can user them. If I allow everyone to edit, we may have 1 bad egg ruin the bunch...

Any ideas?

Yes I can create a "trusted" usergroup... I know but still have the fair of one of the "trusted" going rogue & deleting everyones.

Alisa Lindsay
05-21-2010, 10:43 PM
margins are bit less but
I think i see the blocks in the dark pic the style is just not highlighting them!
other than that it looks right nice styleing BTW

I took another look and, unfortunately, no...the actual gradients are not showing as well as the margins being off and rows rather mushed together. I could live without the neat bars showing, etc., if I could get some space between the forms so they weren't so hard to read.

I've tried to look at the CSS and see if I could sort it, but I'm too much a novice at this... so... still in need of help if anyone has ideas.

Warmest Regards

Alisa...

PS: The style was created by BluePearl and suits our RPG to a T.

Welshy2008
05-23-2010, 12:44 PM
I have been using this on my 3.8 board for a while, and on TWO threads, I replaced the "Post Reply" button, with one of my own.

The problem is, that is that it don't work on 4.0.3.

What I did before was to add two plugins as follows:


Product: Easy Forms

Hook Location: showthread_complete

Title: Form1

Execution Order: 1000

Plugin PHP Code:
if ($threadinfo[threadid] == XXXX)
{
eval('$SHOWTHREAD = "' . fetch_template('SHOWTHREAD') . '";');
$SHOWTHREAD = str_replace("reply.gif","thread2.gif", $SHOWTHREAD);
print_output($SHOWTHREAD);
}
Plugin is Active: Yes



Product: Easy Forms

Hook Location: newreply_form_start

Title: Easy Forms Reply Button

Execution Order: 5

Plugin PHP Code:
if (in_array($threadinfo[threadid], array(ThreadID1)))
{
header('Location: http://www.myforumaddress.com/misc.php?do=form&fid=1') ;
}
if (in_array($threadinfo[threadid], array(ThreadID2)))
{
header('Location: http://www.myforumaddress.com/misc.php?do=form&fid=2') ;
}

Plugin is Active: Yes


I also had to add the following to the SHOWTHREAD Template (I would also like the ""Border box around it all too) - which worked well in 3.8.X-Please see attachment:

<tr>
<if condition="$threadinfo['threadid'] == 'XXXX'">
<td align="$stylevar[left]" valign="top" width="50%">
<fieldset class="fieldset" style="margin:0px">
<legend><b><font size="3">Title Here</font> <font size="2"></b></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td colspan="2">
<tr>
<form action="search.php?do=process&searchthreadid=XXXX" method="post">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class=""><font size="2">Description Here<a name="goto_threadsearch"></a></td>
</tr>
<tr>
<td align="left">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="searchthreadid" value="$threadinfo[threadid] == 'XXXX'" />
<font size="3"><font color="green"><b>Search For:</b></font></font> <input type="text" class="bginput" name="query" size="25" /> <input type="image" src="http://www.Mywebaddress.com/images/search.png" alt="Click to search."><br/>
</td>
</tr>
</table>
</form>
</select></label>
</tr>
</fieldset></if>
<br />



Where "XXXX" is the ThreadID.


Naturally these no longer work and it also returns a securitytoken error too.


Any Ideas of what to replace this code with please? I have tried various ones, but no luck as yet.

Also, With the 4.0.X versions, we have to double click on the Post Reply button to get the full and proper text box, whereas a single click will show the Quick Reply Box. This naturally affects this. How would I overcome this, Please?


Many Thanks, Welshy.

thetgc
05-23-2010, 11:48 PM
Doesnt matter :P Found what i was looking for ;)

sean-zigster
05-24-2010, 06:55 PM
Hi

This is a cracking mod and i have installed it , but we are using it more like a database. Is there anyway i change change forms to database ie instead of a tab saying forms its says database

bananalive
05-24-2010, 08:24 PM
Hi

This is a cracking mod and i have installed it , but we are using it more like a database. Is there anyway i change change forms to database ie instead of a tab saying forms its says database

In AdminCP, Edit phrase entitled 'forms'

bananalive
05-24-2010, 08:42 PM
I have been using this on my 3.8 board for a while, and on TWO threads, I replaced the "Post Reply" button, with one of my own.

The problem is, that is that it don't work on 4.0.3.

What I did before was to add two plugins as follows:


Product: Easy Forms

Hook Location: showthread_complete

Title: Form1

Execution Order: 1000

Plugin PHP Code:
if ($threadinfo[threadid] == XXXX)
{
eval('$SHOWTHREAD = "' . fetch_template('SHOWTHREAD') . '";');
$SHOWTHREAD = str_replace("reply.gif","thread2.gif", $SHOWTHREAD);
print_output($SHOWTHREAD);
}
Plugin is Active: Yes



Product: Easy Forms

Hook Location: newreply_form_start

Title: Easy Forms Reply Button

Execution Order: 5

Plugin PHP Code:
if (in_array($threadinfo[threadid], array(ThreadID1)))
{
header('Location: http://www.myforumaddress.com/misc.php?do=form&fid=1') ;
}
if (in_array($threadinfo[threadid], array(ThreadID2)))
{
header('Location: http://www.myforumaddress.com/misc.php?do=form&fid=2') ;
}

Plugin is Active: Yes


I also had to add the following to the SHOWTHREAD Template (I would also like the ""Border box around it all too) - which worked well in 3.8.X-Please see attachment:

<tr>
<if condition="$threadinfo['threadid'] == 'XXXX'">
<td align="$stylevar[left]" valign="top" width="50%">
<fieldset class="fieldset" style="margin:0px">
<legend><b><font size="3">Title Here</font> <font size="2"></b></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td colspan="2">
<tr>
<form action="search.php?do=process&searchthreadid=XXXX" method="post">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class=""><font size="2">Description Here<a name="goto_threadsearch"></a></td>
</tr>
<tr>
<td align="left">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="searchthreadid" value="$threadinfo[threadid] == 'XXXX'" />
<font size="3"><font color="green"><b>Search For:</b></font></font> <input type="text" class="bginput" name="query" size="25" /> <input type="image" src="http://www.Mywebaddress.com/images/search.png" alt="Click to search."><br/>
</td>
</tr>
</table>
</form>
</select></label>
</tr>
</fieldset></if>
<br />



Where "XXXX" is the ThreadID.


Naturally these no longer work and it also returns a securitytoken error too.


Any Ideas of what to replace this code with please? I have tried various ones, but no luck as yet.

Also, With the 4.0.X versions, we have to double click on the Post Reply button to get the full and proper text box, whereas a single click will show the Quick Reply Box. This naturally affects this. How would I overcome this, Please?


Many Thanks, Welshy.

vB 4 no longer uses images for post reply button, if your board is still using images then you could use

if ($threadinfo[threadid] == 31)
{
$vbulletin->templatecache['SHOWTHREAD'] = str_replace("reply.gif","thread2.gif", $vbulletin->templatecache['SHOWTHREAD']);
$show['quickreply'] = false;
}
(It also disables quick reply for that thread.)

If you use the vB 4 default buttons use this:

if ($threadinfo[threadid] == 31)
{
$show['quickreply'] = false;
$vbphrase['reply_to_thread'] = "Your Text";
}

You are getting the no securitytoken error because vBulletin now has different template syntax

<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="searchthreadid" value="{vb:raw threadinfo.threadid]}'" />


Also use <vb:if> instead of <if>

bananalive
05-24-2010, 08:50 PM
I took another look and, unfortunately, no...the actual gradients are not showing as well as the margins being off and rows rather mushed together. I could live without the neat bars showing, etc., if I could get some space between the forms so they weren't so hard to read.

I've tried to look at the CSS and see if I could sort it, but I'm too much a novice at this... so... still in need of help if anyone has ideas.

Warmest Regards

Alisa...

PS: The style was created by BluePearl and suits our RPG to a T.

Fixed? I went on your site just now and it looks as it should?

bananalive
05-24-2010, 08:50 PM
small bug (please see attached picture)

I've removed blank answers from poll result

bananalive
05-24-2010, 08:55 PM
Hi,

can anyone help me how to use that template hook in form before submit? I want to add some php confrim dialog when user click on "Submit". So for example user need to accept custom rules by clicking on "YES" button and form will be sent, otherwise nothing happend (stay on form page).

Thanks :)

Holy
Can anyone help me with this (https://vborg.vbsupport.ru/showpost.php?p=2027219&postcount=421) please?

THX
Form Hook: Before Submit:
if ($q[25]!=1)
{
$complete = false;
$inputerror[25] = "Not accepted rules";
}
replace 25 with the question hash

bananalive
05-24-2010, 08:56 PM
I still interesting in this, may be community will agree with me? :) I think first page of Forms page have to be more informative, include statistics and help about forms.



This will bring forms on new level, as I think :)


Another suggestion is to have different permissions for different forms. This thing is very demanded for me!



And the last but not least, is Form Results Statistics, for example:
who submitted answers and how many answers,
how many views have form,
who viewed it and how many times,
I don't know, for the beggining this is enough, at least we will have the place where we can see Form Results Statistic :)


And big respect to you! Thank you! Your mod is awesome!

Excuse my English please :)

Added forms views and number of form results in latest version

riskofficer
05-25-2010, 05:06 AM
Small bug (tags in excel export)

bananalive
05-25-2010, 03:14 PM
Small bug (tags in excel export)

Should be fixed in attached file. I won't release a separate version just for this one change

riskofficer
05-25-2010, 03:29 PM
Should be fixed in attached file. I won't release a separate version just for this one change

Thank you, but this patch does not work, everything are messed up in export after apply.

rfsforums
05-25-2010, 05:48 PM
please tell me if I understand this correctly. I want to move the current users from user group 25 to user group 26 once they have submitted the form. using the following form hook, before submit will accomplish this?

if ($complete)
{
/*replace 18 with choosen usergroupid you want to add them to*/
$newmembergroupid = '26';
$user['membergroupids']=explode(',',$user['membergroupids']);
foreach($user['membergroupids'] AS $mi => $mii)
{
/*replace 17 with usergroupid you want to remove them from*/
if ($mii==25)
{
unset($user['membergroupids'][$mi]);
}
}
$user['membergroupids'][]=$newmembergroupid;
$display_usergroup = $newmembergroupid;
$user['membergroupids']=implode(',',$user['membergroupids']);
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('membergroupids', $user['membergroupids']);
$userdata->set_usertitle(
$userinfo['usertitle'],
true,
$vbulletin->usergroupcache["$newmembergroupid"],
false,
true
);
$userdata->save();
}


Many Thanks!

HolyKiller
05-25-2010, 06:04 PM
Form Hook: Before Submit:
if ($q[25]!=1)
{
$complete = false;
$inputerror[25] = "Not accepted rules";
}
replace 25 with the question hash

Thanks, i mean something elste, but this is good too :)

BTW: I mean ... user fill form, click on [Submit] button and PHP warning popped up with Text like "Do you accept the rules?" and [Yes] / [No] choice. Click on "Yes" - submit form, Click on "No" - nothing happend, just back on form (php warn disappear).

But thanx, your script is usefull for me too ;)

your24hourstore
05-25-2010, 09:49 PM
OK i made this form but i want it to calculate the answers and rate them
its all in fun and not important , but by golly i want it :)

I have added the form so those who know something can look it over.
works fine except for the vbif and or but stuff

its a test and its basically 1 of 2 choice's but i want to average the score and based on that score i want it to rate the test

so score of 20 7 or highest and the score of 20 1 or lowest answers is lowest

and maybe a middle then i would like it to say in the final results the score that was calculated :D

any help would be rally appreciated ..rofl

Tiryaki
05-26-2010, 12:30 AM
Hello,

I've downloaded, installed this addon and created a test form, but I don't now how to open the form automatically in a forum by clicking on the "New Thread" Button.

what must be done?

Thanks in advance.
-Tiryaki

your24hourstore
05-26-2010, 01:37 AM
you would have to create a plug in in admincp/plugin manager

you would put some code in it like this if (in_array($forumid, array(5)))
{
header( 'Location: http://www.hillbillygold.com/forums/misc.php?do=form&fid=1' ) ;
}

heres a pic of what the plug in looks like

added: hook location newthread_start you will have to edit the part that describes the forum you want to make the thread open in array(5)))

and you will have to edit the form&fid=1' one is the form number im useing all forms have their own numbers

oh yes and of course you will have to replace the www.hillbillygold.com part

Tiryaki
05-26-2010, 01:59 AM
thank you very much, now it works fine :up:

promoprompt
05-27-2010, 05:05 PM
Hello,

I would like to use EasyForms in different ways.
One case to use EasyForms as Inputform for Blog and CMS-Articles.

Is there any possibility to do so?

I'm sorry I am a newbie in VB.

Is anybody there to help in this?

best regards
promoprompt

Alisa Lindsay
05-27-2010, 05:37 PM
Fixed? I went on your site just now and it looks as it should?

Yeah...and it was like magic too. *chuckles*

I logged on the other morning and presto... the issue had resolved itself at some point. My bad in not noting it here sooner.

Here's the screen now (See attached screenshot)... I'm delighted...just not sure how it happened. Literally, I've done nothing that could have fixed it and my Tech Guru denies all culpability for fixing it as well. 'Tis a mystery. I'm going to credit vB Board Elves for fixing it.

Thanks and Regards.... Alisa

PS: I've downloaded the latest update, but almost afraid to install it. :D

vilhiem
05-28-2010, 11:53 AM
Great Mod!

Is there any way to remove some of the "options" available on the main Forms page?

For instance, for Registered Users, I would like to remove "Export Form Results", "Form Results", etc. .. and just leave "Form Results Table" ...?

Thanks!!!

vilhiem
05-28-2010, 02:26 PM
How do you calculate ...?

For instance, here are the questions:
(1) Stock Purchase Price?
(2) Stock Sale Price?
(3) Percentage Difference (calculated)

Thanks!!!

Welshy2008
05-28-2010, 05:20 PM
If you use the vB 4 default buttons use this:

if ($threadinfo[threadid] == 31)
{
$show['quickreply'] = false;
$vbphrase['reply_to_thread'] = "Your Text";
}

You are getting the no securitytoken error because vBulletin now has different template syntax

<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="searchthreadid" value="{vb:raw threadinfo.threadid]}'" />


Also use <vb:if> instead of <if>


Thanks BananaAlive,

The button one worked perfectly. Sorry, I have already done the <vb:if> and </vb:if>, I meant how to get the border around it (Box).

Many Thanks,
Once Again,

Welshy.

Welshy2008
05-28-2010, 05:26 PM
The search facilty, still doesn't work and does not return post results that I know are listed.

Any Ideas Please BA?

The following is what I have in my vB4.0.3


<tr>
<vb:if condition="$threadinfo['threadid'] == 'XXXX'">
<td align="$stylevar[left]" valign="top" width="50%">
<fieldset class="fieldset" style="margin:0px">
<legend><b><font size="3">Search</font> <font size="2"></b></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td colspan="2">
<tr>
<form action="search.php?do=process&searchthreadid=XXXX" method="post">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class=""><b><font size="2">Please enter a search word:</font></b><a name="goto_threadsearch"></a></td>
</tr>
<tr>
<td align="left">
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'" />
<font size="3"><b>Find:</b></font> <input type="text" class="bginput" name="query" size="25" />&nbsp<input type="image" src="http://www.myforumaddress.com/images/sample.gif" alt="Search ."><br/>
</td>
</tr>
</table>
</form>
</select></label>
</tr>
</fieldset></vb:if>
<br />


I have also tried the following too:

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'XXXX" />

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'XXXX'" />

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']} == 'XXXX" />


Where XXXX is the threadID.

vilhiem
05-28-2010, 10:59 PM
Three outstanding questions:

(1) Is there any way to remove some of the "options" available on the main Forms page? For instance, for Registered Users, I would like to remove "Export Form Results", "Form Results", etc. .. and just leave "Form Results Table" ...?

(2) How do you calculate ...? For instance, here are the questions:
>>> (a) Stock Purchase Price?
>>> (b) Stock Sale Price?
>>> (c) Percentage Difference (calculated)

(3) How do I change the web page title, from "Forms" to something different?

Thanks & Great Mod!

vilhiem
05-29-2010, 04:11 AM
anyone ...?

promoprompt
05-29-2010, 11:22 AM
Hello,

I would like to use EasyForms in different ways.
One case to use EasyForms as Inputform for Blog and CMS-Articles.

Is there any possibility to do so?

I'm sorry I am a newbie in VB.

Is anybody there to help in this?

best regards
promoprompt

Any Hint for me?

Thanks

sean-zigster
05-30-2010, 05:55 AM
As you can see from the pictures we are using ours like a database. Is there anyway we can add lines to the rows to make them stand out a little more and also make the fields sort alphabetically ?

I am also having trouble with permissions as i have to allow everyone to edit everyones entries as the edit personal entries does not work

https://vborg.vbsupport.ru/external/2010/05/7.png

Thanks

Cedric_FP
05-30-2010, 06:20 AM
Could you post the hooks to have a new thread go through the "build new post" function rather than the data manager directly?

promoprompt
05-30-2010, 07:39 AM
Could you post the hooks to have a new thread go through the "build new post" function rather than the data manager directly?

Who is ment?

If me, I dont know what Hooks realy is or do.

Do you have any excamples to me?

greets promoprompt

Cedric_FP
05-30-2010, 08:24 AM
promopromt - I mean the developer of this modification :)

riskofficer
06-01-2010, 08:54 AM
bug -- users can't edit their own entries

when they choose "edit" -- mod bringing them to edit page, but then, they can't save -- error about missing permissions

in admin panel option that let users to edit their own entries is turned on

Veer
06-01-2010, 03:06 PM
Form Description text is always BOLD, Please fix it.

Largo .//npc
06-01-2010, 04:04 PM
Question about Hooks.
In vB3.8, I modded Easy Forms to insert some data into a new table which I used for a recruitment process. I can use hooks to do the same thing without editing the code I believe, but is it possible for me to pass the results of question 1 and 6 for example.

riskofficer
06-02-2010, 04:00 AM
To fix date issue, upgrade to v4.1.2, then add the following to Form Hook: Form Start:
$usealtdate = true;

when editing form result, in date field in year cell -- entrie like "2010" is fine, but years 2009, 2008 are shown as "209, 208"

in excel export everything fine

vilhiem
06-02-2010, 04:01 PM
How can I change the "Title" on a Thread or Posting if I have the results sent there ...?

Thanks!!!!

sweetguy2004
06-02-2010, 04:22 PM
very interesting i will sure install this thanks for your efforts :)

Bobbo
06-02-2010, 08:02 PM
What would be an easy way to display custom variable data in a form email body. For example, I have a form, the user fills it out and clicks submit. The contents of that form get emailed to someone else. Now, in the Before Submit hook, I have some logic that sets a variable based on how the user filled out the form. I'd like the contents of that variable to be displayed in the body of the email.

The variable is completely custom and based on data returning from a SQL dB lookup.

Any ideas? Geesh, I love this mod. It offers so much flexibility!

********
Figured this out. I simply appended my information to $formoutput, ie, $formoutput .= "My variable: " .$row[variable];
This works fine. I would think there is a way to make it a template variable so I could then use something like {my_variable}, but suspect it might take a lot more work.
********

Bobbo

rtrm
06-04-2010, 08:11 PM
This is a great mod, thanks very much for all your hard work on it.

I have a small issue. When including an entered value for thread title, I can't include the value of the first field. On another form the values of the 2nd and 3rd field are included as {q_3} and {q_4}, so I figured I should use {q_0}, but that isn't recognized and the code is displayed. I tried {q_1}, but that produces nothing.

vilhiem
06-04-2010, 08:25 PM
is there any way to do CALCULATIONS on the fields so when it's appended to the table, a number is generated in a field based on the values entered in other fields ...?

Reycer
06-05-2010, 12:20 AM
This is one awesome mod...I've been using it since it's debut quite a while back.

Question: I have a situation to where I need to have files to be uploaded. So I direct the form to post into a forum. Problem is, I don't want that particular forum to be seen be anyone but myself, so I set the forum permissions so that only I can see it. This creates a problem with the attachments, it will not allow users to then upload attachments, when that forum is hidden. I can go in and make it so that they can make posts in in, but it is still hidden, and I can turn on that they can upload attachments, but if they can't view the forum, then they can't upload attachments in the form.

I have considered making this forum an "Admin Only" forum, and making so they can't get into it, but I would just rather have it not seen at all. Anyway to make this work?

HolyKiller
06-06-2010, 11:53 PM
This is a great mod, thanks very much for all your hard work on it.

I have a small issue. When including an entered value for thread title, I can't include the value of the first field. On another form the values of the 2nd and 3rd field are included as {q_3} and {q_4}, so I figured I should use {q_0}, but that isn't recognized and the code is displayed. I tried {q_1}, but that produces nothing.

You need to use unique ID of that question, not his "position" in that specific form. So if you have question like this:

1. Favorite color _______ (Single Line Text Field) #44 ______ 10

Simply use {q_44} for thread title :)

rtrm
06-07-2010, 06:05 AM
You need to use unique ID of that question, not his "position" in that specific form. So if you have question like this:

1. Favorite color _______ (Single Line Text Field) #44 ______ 10

Simply use {q_44} for thread title :)

Ah! Obvious really. Thanks very much.

Cedric_FP
06-07-2010, 07:30 AM
Using the following code:

$forumid2 = 31;
if ($complete)
{
if (!$vbulletin->userinfo['userid'])
{
$vbulletin->input->clean_array_gpc('p', array(
'humanverify' => TYPE_ARRAY,
));
$newpost['humanverify'] = $vbulletin->GPC['humanverify'];
}
require_once(DIR . '/includes/functions_editor.php');
require_once(DIR . '/includes/functions_bigthree.php');
require_once('./includes/class_dm.php');
require_once('./includes/class_dm_threadpost.php');
require_once('./includes/functions_databuild.php');
if (!$closed)
{
$open = 1;
}
else
{
$open = 0;
}
$threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD);
/*$foruminfo = fetch_foruminfo($forumid);*/
$threaddm->set_info('forum',$foruminfo);
$threaddm->set_info('user', $vbulletin->userinfo);
$threaddm->set('forumid', $forumid2);
$threaddm->set('userid', $vbulletin->userinfo['userid']);
$threaddm->set('title', $threadtitle);
$threaddm->set('pagetext', $formoutput);
$allow_smilie = '1';
$visible = '1';
$threaddm->set('open', $open);
if ($form[prefixid])
{
$threaddm->set('prefixid', $form[prefixid]);
}
if ($form[iconid])
{
$threaddm->set('iconid', $iconid);
}
$threaddm->set('allowsmilie', $allow_smilie);
$threaddm->set('visible', $visible);
$threaddm->pre_save();
$threadid = $threaddm->save();
unset($threaddm);
build_thread_counters($threadid);
build_forum_counters($forumid);
if (!empty($threaddm->errors))
{
$errorss .= $threaddm->errors;
$errormessage = "Form failed to submit. The following error(s) occured: <br /> ".$errorss;
eval(standard_error($errormessage));
}
$threadinfo = fetch_threadinfo($threadid);
$newpost['postid'] = $threadinfo['firstpostid'];
mark_thread_read($threadinfo, $foruminfo, $vbulletin->userinfo['userid'], TIMENOW);
/*($hook = vBulletinHook::fetch_hook('newthread_post_complete ')) ? eval($hook) : false;*/
if ($form[poll] == 1)
{
$question = $form[pollquestion];
$threadinfo = verify_id('thread', $threadid, 0, 1);
$polloptions = count($polloption);
$vbulletin->GPC['options'] = $polloption;
$counter = 0;
$optioncount = 0;
$badoption = '';
while ($counter++ < $polloptions)
{
if ($vbulletin->options['maxpolllength'] AND vbstrlen($vbulletin->GPC['options']["$counter"]) > $vbulletin->options['maxpolllength'])
{
$badoption .= iif($badoption, ', ') . $counter;
}
if (!empty($vbulletin->GPC['options']["$counter"]))
{
$optioncount++;
}
}
$poll = datamanager_init('Poll', $vbulletin, ERRTYPE_STANDARD);
$counter = 0;
while ($counter++ < $polloptions)
{
if ($vbulletin->GPC['options']["$counter"] != '')
{
$poll->set_option($vbulletin->GPC['options']["$counter"]);
}
}
$poll->set('question', $question);
$poll->set('dateline', TIMENOW);
$poll->set('active', '1');
$poll->set('public', $form['publicpoll']);
$poll->set('multiple', $form['multiplepoll']);
$pollid = $poll->save();
$threadman = datamanager_init('Thread', $vbulletin, ERRTYPE_STANDARD, 'threadpost');
$threadman->set_existing($threadinfo);
$threadman->set('pollid', $pollid);
$threadman->save();
}
if ($form[submitmessage])
{
$errormessage = $form[submitmessage];
}
else
{
$errormessage = "Form was submitted successfully. Click <a href=\"showthread.php?" . $vbulletin->session->vars['sessionurl'] . "p=" . $newpost[postid] . "#post" . $newpost[postid] . "\">here</a> to view the thread.";
}
}

How would I also create replies to the thread created? The replies don't have to contain form data, they are just standard replies such as "Reserved".

Thanks.

bananalive
06-08-2010, 02:03 PM
is there any way to do CALCULATIONS on the fields so when it's appended to the table, a number is generated in a field based on the values entered in other fields ...?
Form Hook: Before Submit:
$qo[4] = $qo[4]+1;
$q[4] = $q[4]+1;
4 is the question hash

bananalive
06-08-2010, 02:26 PM
when editing form result, in date field in year cell -- entrie like "2010" is fine, but years 2009, 2008 are shown as "209, 208"

in excel export everything fine

Fixed in attached file

bananalive
06-08-2010, 02:35 PM
Could you post the hooks to have a new thread go through the "build new post" function rather than the data manager directly?

Why? build_new_post() function is just an easy way to access the datamanagers but in this mod it is advantageous not to have extra permissions checked

build_new_post() is used for new threads atm.

jdj
06-08-2010, 02:38 PM
Apologies if the answer to this is on this thread already.

Can this mod be used to allow users to subscribe to a forum as a condition of their entry to it? E.g. if you want to collect user address details upon registration to your site? Or perhaps if you wish to allow them to register on the site as registered users using the default details then ask them for more details to subscribe to a particular forum within your site...... if for example you have a group that wants a mailing database but you don't need it on the entire site? Or perhaps if you simply wanted them to provide a registration number to gain access to a particular forum?

JJ

bananalive
06-08-2010, 02:39 PM
As you can see from the pictures we are using ours like a database. Is there anyway we can add lines to the rows to make them stand out a little more and also make the fields sort alphabetically ?

I am also having trouble with permissions as i have to allow everyone to edit everyones entries as the edit personal entries does not work

http://i44.photobucket.com/albums/f11/zigsterfrag/webby/Screenshot2010-05-30at075155.png

Thanks

Fixed in attached file

bananalive
06-08-2010, 02:40 PM
Who is ment?

If me, I dont know what Hooks realy is or do.

Do you have any excamples to me?

greets promoprompt

hooks, are similar to vbulletin plugins, allow php to be inserted at certain points in the code

bananalive
06-08-2010, 02:41 PM
Form Description text is always BOLD, Please fix it.

that will be the css styling

bananalive
06-08-2010, 02:46 PM
Hello,

I've downloaded, installed this addon and created a test form, but I don't now how to open the form automatically in a forum by clicking on the "New Thread" Button.

what must be done?

Thanks in advance.
-Tiryaki

Create plugin with vBulletin Hook Location: newthread_form_complete with the following php code:
if (in_array($forumid, array(1,2,3)))
{
header( 'Location: http://www.your-site.com/forum/misc.php?do=form&fid=1' ) ;
}

Change 1,2,3 for appropriate threadids.

bananalive
06-08-2010, 03:08 PM
OK i made this form but i want it to calculate the answers and rate them
its all in fun and not important , but by golly i want it :)

I have added the form so those who know something can look it over.
works fine except for the vbif and or but stuff

its a test and its basically 1 of 2 choice's but i want to average the score and based on that score i want it to rate the test

so score of 20 7 or highest and the score of 20 1 or lowest answers is lowest

and maybe a middle then i would like it to say in the final results the score that was calculated :D

any help would be really appreciated ..rofl
Form Hook: Before Submit:
$disabled_updateuserids = true;
$closed=true;
$count = 0;
foreach ($q AS $a => $b)
{
if ($a && is_numeric($b) && $b > 0)
{
$average += $b;
$count++;
}
}
if ($count != 0)
{
$q['average'] = $average/$count;
if ($q['average']>5)
{
$formoutput = "you are hillbilly average 5+";
}
else
{
$formoutput = "you are not hillbilly average 5-";
}
}

rfsforums
06-08-2010, 04:48 PM
I want to create a membership renewal form. Basically, all our users have the same primary user group (registered users, id:2) but most have joined 1 or more secondary "additional" groups. Each year they have to re-new their membership and I think we can use your forms mod to make this task much easier.
When the user goes to the form, I would like to have a renewal clause that they must accept as well as have each of their additional usergroups displayed (these are the 2010 year groups) with a check box so if they don't want to renew they can just uncheck that particular additional usergroup and on form submission that additional usergroup would get dropped from their account. I would also like to, upon submission, move the user from the checked groups (2010) to a pre-defined 2011 version of the particular group.

Example user4 bob is a member of the following secondary groups:
_ Clause > must be checked to proceed
_ 2010 Hunting group (id:18) > if checked, upon submission move to 2011 Hunting group (id:30)
_2010 Fishing group (id: 27)> if checked, upon submission move to 2011 Fishing Group (id:40)

Bananalive - any suggestions on how to go about this? Thanks!

riskofficer
06-09-2010, 11:05 AM
Thank you, but this patch does not work, everything are messed up in export after apply.

Fixed in attached file

This patch contains error from previous patch, when Excel export doesnt work. (as you remember you removed &quote; tags from Excel export, but this crashes all table layout it export).

bananalive
06-09-2010, 11:45 AM
This patch contains error from previous patch, when Excel export doesnt work. (as you remember you removed &quote; tags from Excel export, but this crashes all table layout it export).

ok, try this version

Welshy2008
06-09-2010, 02:12 PM
The search facilty, still doesn't work and does not return post results that I know are listed.

Any Ideas Please BA?

The following is what I have in my vB4.0.3


<tr>
<vb:if condition="$threadinfo['threadid'] == 'XXXX'">
<td align="$stylevar[left]" valign="top" width="50%">
<fieldset class="fieldset" style="margin:0px">
<legend><b><font size="3">Search</font> <font size="2"></b></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td colspan="2">
<tr>
<form action="search.php?do=process&searchthreadid=XXXX" method="post">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class=""><b><font size="2">Please enter a search word:</font></b><a name="goto_threadsearch"></a></td>
</tr>
<tr>
<td align="left">
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'" />
<font size="3"><b>Find:</b></font> <input type="text" class="bginput" name="query" size="25" />&nbsp<input type="image" src="http://www.myforumaddress.com/images/sample.gif" alt="Search ."><br/>
</td>
</tr>
</table>
</form>
</select></label>
</tr>
</fieldset></vb:if>
<br />


I have also tried the following too:

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'XXXX" />

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'XXXX'" />

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']} == 'XXXX" />


Where XXXX is the threadID.


Please BA? :)

bananalive
06-09-2010, 04:45 PM
The search facilty, still doesn't work and does not return post results that I know are listed.

Any Ideas Please BA?

The following is what I have in my vB4.0.3


<tr>
<vb:if condition="$threadinfo['threadid'] == 'XXXX'">
<td align="$stylevar[left]" valign="top" width="50%">
<fieldset class="fieldset" style="margin:0px">
<legend><b><font size="3">Search</font> <font size="2"></b></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td colspan="2">
<tr>
<form action="search.php?do=process&searchthreadid=XXXX" method="post">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class=""><b><font size="2">Please enter a search word:</font></b><a name="goto_threadsearch"></a></td>
</tr>
<tr>
<td align="left">
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'" />
<font size="3"><b>Find:</b></font> <input type="text" class="bginput" name="query" size="25" />&nbsp<input type="image" src="http://www.myforumaddress.com/images/sample.gif" alt="Search ."><br/>
</td>
</tr>
</table>
</form>
</select></label>
</tr>
</fieldset></vb:if>
<br />


I have also tried the following too:

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'XXXX" />

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']}'XXXX'" />

<input type="hidden" name="searchthreadid" value="$threadinfo['threadid']} == 'XXXX" />


Where XXXX is the threadID.
You should be using {vb:raw threadinfo.threadid}
<input type="hidden" name="searchthreadid" value="{vb:raw threadinfo.threadid}" />

khet
06-09-2010, 05:55 PM
Hello
Good mod.
I use Eazy Forms for registration application of festival.
I use form actions "save to database" and "Email".
Form results list shows a big quantity of applications.
How to make a pagination of form results list?

Welshy2008
06-09-2010, 06:27 PM
You should be using {vb:raw threadinfo.threadid}
<input type="hidden" name="searchthreadid" value="{vb:raw threadinfo.threadid}" />


Thanks for your reply BA. I appreciate that.

Unfortunately, It still does not work. Would it be possible for you to check my codes, If I PM you an ID with admin permisions, Please?


Many Thanks,
Welshy2008.

bananalive
06-09-2010, 09:03 PM
Hello
Good mod.
I use Eazy Forms for registration application of festival.
I use form actions "save to database" and "Email".
Form results list shows a big quantity of applications.
How to make a pagination of form results list?

I'll add it in next version for you.

bananalive
06-09-2010, 09:04 PM
Thanks for your reply BA. I appreciate that.

Unfortunately, It still does not work. Would it be possible for you to check my codes, If I PM you an ID with admin permisions, Please?


Many Thanks,
Welshy2008.

Yea go for it.

Welshy2008
06-09-2010, 09:25 PM
Yea go for it.


Thank You - You have a PM. :)

riskofficer
06-09-2010, 10:10 PM
ok, try this version
Now it works! Thank you 1's more!

khet
06-10-2010, 06:08 AM
Thank you.
I hope you will make update soon :)

Cedric_FP
06-10-2010, 06:42 AM
I want to use the following code below which creates a new thread to also create 2 or 3 replies in the same thread with the same form output.

What code would I need to add? I've tried adding the code which adds a new post when choosing that option in the edit forms page, but that doesn't work (yet returns no errors).

Thanks

Using the following code:

$forumid2 = 31;
if ($complete)
{
if (!$vbulletin->userinfo['userid'])
{
$vbulletin->input->clean_array_gpc('p', array(
'humanverify' => TYPE_ARRAY,
));
$newpost['humanverify'] = $vbulletin->GPC['humanverify'];
}
require_once(DIR . '/includes/functions_editor.php');
require_once(DIR . '/includes/functions_bigthree.php');
require_once('./includes/class_dm.php');
require_once('./includes/class_dm_threadpost.php');
require_once('./includes/functions_databuild.php');
if (!$closed)
{
$open = 1;
}
else
{
$open = 0;
}
$threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD);
/*$foruminfo = fetch_foruminfo($forumid);*/
$threaddm->set_info('forum',$foruminfo);
$threaddm->set_info('user', $vbulletin->userinfo);
$threaddm->set('forumid', $forumid2);
$threaddm->set('userid', $vbulletin->userinfo['userid']);
$threaddm->set('title', $threadtitle);
$threaddm->set('pagetext', $formoutput);
$allow_smilie = '1';
$visible = '1';
$threaddm->set('open', $open);
if ($form[prefixid])
{
$threaddm->set('prefixid', $form[prefixid]);
}
if ($form[iconid])
{
$threaddm->set('iconid', $iconid);
}
$threaddm->set('allowsmilie', $allow_smilie);
$threaddm->set('visible', $visible);
$threaddm->pre_save();
$threadid = $threaddm->save();
unset($threaddm);
build_thread_counters($threadid);
build_forum_counters($forumid);
if (!empty($threaddm->errors))
{
$errorss .= $threaddm->errors;
$errormessage = "Form failed to submit. The following error(s) occured: <br /> ".$errorss;
eval(standard_error($errormessage));
}
$threadinfo = fetch_threadinfo($threadid);
$newpost['postid'] = $threadinfo['firstpostid'];
mark_thread_read($threadinfo, $foruminfo, $vbulletin->userinfo['userid'], TIMENOW);
/*($hook = vBulletinHook::fetch_hook('newthread_post_complete ')) ? eval($hook) : false;*/
if ($form[poll] == 1)
{
$question = $form[pollquestion];
$threadinfo = verify_id('thread', $threadid, 0, 1);
$polloptions = count($polloption);
$vbulletin->GPC['options'] = $polloption;
$counter = 0;
$optioncount = 0;
$badoption = '';
while ($counter++ < $polloptions)
{
if ($vbulletin->options['maxpolllength'] AND vbstrlen($vbulletin->GPC['options']["$counter"]) > $vbulletin->options['maxpolllength'])
{
$badoption .= iif($badoption, ', ') . $counter;
}
if (!empty($vbulletin->GPC['options']["$counter"]))
{
$optioncount++;
}
}
$poll = datamanager_init('Poll', $vbulletin, ERRTYPE_STANDARD);
$counter = 0;
while ($counter++ < $polloptions)
{
if ($vbulletin->GPC['options']["$counter"] != '')
{
$poll->set_option($vbulletin->GPC['options']["$counter"]);
}
}
$poll->set('question', $question);
$poll->set('dateline', TIMENOW);
$poll->set('active', '1');
$poll->set('public', $form['publicpoll']);
$poll->set('multiple', $form['multiplepoll']);
$pollid = $poll->save();
$threadman = datamanager_init('Thread', $vbulletin, ERRTYPE_STANDARD, 'threadpost');
$threadman->set_existing($threadinfo);
$threadman->set('pollid', $pollid);
$threadman->save();
}
if ($form[submitmessage])
{
$errormessage = $form[submitmessage];
}
else
{
$errormessage = "Form was submitted successfully. Click <a href=\"showthread.php?" . $vbulletin->session->vars['sessionurl'] . "p=" . $newpost[postid] . "#post" . $newpost[postid] . "\">here</a> to view the thread.";
}
}

How would I also create replies to the thread created? The replies don't have to contain form data, they are just standard replies such as "Reserved".

Thanks.

deeshay
06-10-2010, 05:10 PM
Any ideas how I can make this post in a certain forum based on an option selected from a dropdown box?

Example:

Dropdown box with options - PC, Mac, Linux

If you select PC it would post the form output in a PC forum and vice versa.

your24hourstore
06-10-2010, 05:24 PM
you can do it its more complicated than i am .

its going to be some code in before submit hook probably.

i think i have seen the code posted in here way back there somewhere :>

bananalive
06-12-2010, 05:38 PM
Any ideas how I can make this post in a certain forum based on an option selected from a dropdown box?

Example:

Dropdown box with options - PC, Mac, Linux

If you select PC it would post the form output in a PC forum and vice versa.
Form Hook: Before Submit:
if ($qo['89'] == 1)
{
/* first dropdown option forumid*/
$form['forumid'] = 87;
}
elseif ($qo['89'] == 2)
{
/* second dropdown forumid*/
$form['forumid'] = 88;
}
elseif ($qo['89'] == 3)
{
$form['forumid'] = 89;
}
where 89 is the question hash

bananalive
06-12-2010, 05:40 PM
Thank you.
I hope you will make update soon :)

Attache is version with it included so you don't have to wait.

bananalive
06-12-2010, 05:43 PM
I want to use the following code below which creates a new thread to also create 2 or 3 replies in the same thread with the same form output.

What code would I need to add? I've tried adding the code which adds a new post when choosing that option in the edit forms page, but that doesn't work (yet returns no errors).

Thanks

You won't be able to create a new reply to a thread the same form creates as it won't have been created before the reply is being generated.

Veer
06-12-2010, 06:41 PM
Form Description text is always BOLD, Please fix it.

that will be the css styling

So how do I fix it?

promoprompt
06-12-2010, 07:29 PM
Hello Banalive,

great tool, I have a question.
If I use Easy Forms to create new Threads in a Forum, an inserted Picture will always inserted as an attachment.

Could you please insert an option to choose as Attachment, or as an Image direktly to the thread (not as Thumbnail)?
Inserted at the cursorposition.

Second, if I use the form to add a post to an existing Thread, how about a select button for the thread/forum instead of the ID number of the Forum.

Third: is it possible to have a select Button, for the users posts in an specific forum? Thats helpfull to edit users posts, without to use the forum itself.

The sequence is the importance for me. The first is urgent, if you are able to help quick.

Thanks in advance.

Dragonsys
06-13-2010, 03:37 AM
This is awesome and just what I am needing for one of my customer's vBulletin site.

I have one request.

You currently have this with the ability to format the output of the form, but would it be possible to be able to format the display of the form itself?

For example:
I have a form requesting a mailing address, which has 4 questions related to it (Street, City, State, Zip). Currently this form would have each question on a separate line, but it would be nice if the City, State & Zip were on the same line.

Input Current:
{qn_1}: {qo_1}
{qn_2}: {qo_2}
{qn_3}: {qo_3}
{qn_4}: {qo_4}

Wanted Input:
{qn_1}:
{qo_1}
{qo_2}, {qo_3} {qo_4}

Similar to how you can customize the output display.

Also, the ability to have other user information (such as email) automatically entered from their vBulletin profile, such as how you can get their vb username inserted, would be absolute icing!

vilhiem
06-13-2010, 06:26 AM
Form Hook: Before Submit:
$qo[4] = $qo[4]+1;
$q[4] = $q[4]+1;
4 is the question hash

Thanks!

And would I be correct to assume that I could use more complex calculations ... for instance if I want to show % difference between two values ...?

sean-zigster
06-14-2010, 05:08 AM
is there anyway we can make the Columns list alphabetically ? by clicking a button ?

deeshay
06-14-2010, 12:35 PM
Thank you very much :)

Form Hook: Before Submit:
if ($qo['89'] == 1)
{
/* first dropdown option forumid*/
$form['forumid'] = 87;
}
elseif ($qo['89'] == 2)
{
/* second dropdown forumid*/
$form['forumid'] = 88;
}
elseif ($qo['89'] == 3)
{
$form['forumid'] = 89;
}
where 89 is the question hash

bananalive
06-14-2010, 02:52 PM
is there anyway we can make the Columns list alphabetically ? by clicking a button ?

Yes, if your browser supports JavaScript.

Just click on the columns and it will sort table.

bananalive
06-14-2010, 02:52 PM
Thanks!

And would I be correct to assume that I could use more complex calculations ... for instance if I want to show % difference between two values ...?

Yes

bananalive
06-14-2010, 03:59 PM
This is awesome and just what I am needing for one of my customer's vBulletin site.

I have one request.

You currently have this with the ability to format the output of the form, but would it be possible to be able to format the display of the form itself?

For example:
I have a form requesting a mailing address, which has 4 questions related to it (Street, City, State, Zip). Currently this form would have each question on a separate line, but it would be nice if the City, State & Zip were on the same line.

Input Current:
{qn_1}: {qo_1}
{qn_2}: {qo_2}
{qn_3}: {qo_3}
{qn_4}: {qo_4}

Wanted Input:
{qn_1}:
{qo_1}
{qo_2}, {qo_3} {qo_4}

Similar to how you can customize the output display.


In the next version, I've added address question type, which you could customise.

Also, the ability to have other user information (such as email) automatically entered from their vBulletin profile, such as how you can get their vb username inserted, would be absolute icing!
Create Custom Question with the following php code:

$answer = '<textarea cols="40" rows="3" class="textbox" readonly="readonly" id="q_' . $formbit[id] . '" name="' . $formbit[id] . '">' . $vbulletin->userinfo[email] . ' </textarea>';
or
$answer = '<input type="text" readonly="readonly" id="q_' . $formbit[id] . '" name="' . $formbit[id] . '" value="' . $vbulletin->userinfo[email] . '" class="textbox" />';

First one is multi-line, second one is single lined

bananalive
06-14-2010, 04:03 PM
So how do I fix it?


Find in template form_view
<div class="blocksubhead restore">{vb:raw form.description}</div>
Replace with:
<div class="blocksubhead restore" style="font-weight: normal;">{vb:raw form.description}</div>

Dragonsys
06-14-2010, 05:03 PM
In the next version, I've added address question type, which you could customise.


Create Custom Question with the following php code:

$answer = '<textarea cols="40" rows="3" class="textbox" readonly="readonly" id="q_' . $formbit[id] . '" name="' . $formbit[id] . '">' . $vbulletin->userinfo[email] . ' </textarea>';
or
$answer = '<input type="text" readonly="readonly" id="q_' . $formbit[id] . '" name="' . $formbit[id] . '" value="' . $vbulletin->userinfo[email] . '" class="textbox" />';

First one is multi-line, second one is single lined

Awesome, I will try this out. Thanks!
Top notch as always :)

promoprompt
06-15-2010, 01:33 PM
Hello Bananalive,

great tool, I have a question.
If I use Easy Forms to create new Threads in a Forum, an inserted Picture will always inserted as an attachment.

Could you please insert an option to choose as Attachment, or as an Image direktly to the thread (not as Thumbnail)?
Inserted at the cursorposition.

Thanks in advance.

Any Ideas in this or do you work on this?

Thanks in advance.

Mimirswell
06-15-2010, 07:09 PM
Whenever someone previews a form on my site, it will autofill in all dropdown select questions. Given that each form has 20+ and users generally only need to fill in 25% of them, it's extremely problematic.

Welshy2008
06-17-2010, 12:36 PM
Hello Banalive,

great tool, I have a question.
If I use Easy Forms to create new Threads in a Forum, an inserted Picture will always inserted as an attachment.

Could you please insert an option to choose as Attachment, or as an Image direktly to the thread (not as Thumbnail)?Inserted at the cursorposition.


Pushing it here, I know - But would it be possible, not just to add an inline image, but to add a url to make that image a clickable image (To open a new window to visit that webpage), and to have the option to add alt code to it too, Please, BA?

Many Thanks.

Dragonsys
06-17-2010, 02:32 PM
Pushing it here, I know - But would it be possible, not just to add an inline image, but to add a url to make that image a clickable image (To open a new window to visit that webpage), and to have the option to add alt code to it too, Please, BA?

Many Thanks.

You can use the custom format output to do this. Have one question be the url to said picture.

In your custom output (if the img is Q #1):
Inline:
https://vborg.vbsupport.ru/

clickable:
https://vborg.vbsupport.ru/ ({qo_1})


You can do the same with URLs. I have my forms using this.

Welshy2008
06-17-2010, 03:13 PM
Thanks for your reply Dragonsys,

Would you be kind enough as to PM a link to your forum where I can see that in action Please?

Many Thanks,
Welshy2008.

vilhiem
06-17-2010, 03:18 PM
To remove the bold ... this worked out perfect and was easy to do ... Thanks!!!


Find in template form_view
<div class="blocksubhead restore">{vb:raw form.description}</div>
Replace with:
<div class="blocksubhead restore" style="font-weight: normal;">{vb:raw form.description}</div>

Dragonsys
06-17-2010, 04:28 PM
Thanks for your reply Dragonsys,

Would you be kind enough as to PM a link to your forum where I can see that in action Please?

Many Thanks,
Welshy2008.

I sent you a PM, but i will post it here as well in case anyone else would like to see it.

One of the forms I do this in is our Contact Form (http://forums.texas-fbody.org/misc.php?do=form&fid=2). If you fill it out and press preview, you should be able to see your email address as a link.

I can setup a test form and show how the images could work as well, if anyone would like to see that as well.

lickalotapus
06-17-2010, 05:22 PM
How can I change the script so the answers are on the same line as the question?

I want it to look like:

Name: Mr. Smith
Date: 6-17-10
Services Needed: Cleaning and Repairs
Amount Charged: $50
Amount Paid: $60
Feedback: Everything went well
Referred By: www.abc.com
Would you Recommend Us?: Yes

Any suggestions?

Dragonsys
06-17-2010, 05:33 PM
How can I change the script so the answers are on the same line as the question?

I want it to look like:

Name: Mr. Smith
Date: 6-17-10
Services Needed: Cleaning and Repairs
Amount Charged: $50
Amount Paid: $60
Feedback: Everything went well
Referred By: www.abc.com
Would you Recommend Us?: Yes

Any suggestions?



Use the Custom Form Output field

lickalotapus
06-17-2010, 05:57 PM
I'm real new to all of this so that doesn't help me. What do I put in that field? How do I make that work?

Are there instructions somewhere?

Thanks

Dragonsys
06-17-2010, 06:28 PM
I'm real new to all of this so that doesn't help me. What do I put in that field? How do I make that work?

Are there instructions somewhere?

Thanks

The Custom Form Output box is on the Edit Form page.
You can use BBCode in that field to format the output.
There is some info right below the box. As for the questions & answers, there are drop downs right above the box, which will insert them for you.

Mimirswell
06-17-2010, 06:51 PM
Form Hook: Before Submit:
if ($qo[737] == "1")
{
$form[forumid] = 14;
}
elseif ($qo[737] == "2")
{
$form[forumid] = 23;
}
elseif ($qo[737] == "3")
{
$form[forumid] = 31;
}
elseif ($qo[737] == "4")
{
$form[forumid] = 39;
}

This hook no longer works after the migration to 4.0. The forumid is still the same.

Dragonsys
06-17-2010, 07:14 PM
Form Hook: Before Submit:
if ($qo[737] == "1")
{
$form[forumid] = 14;
}


This hook no longer works after the migration to 4.0. The forumid is still the same.

try $qo['737']
that is what his previous example had anyway...

Mimirswell
06-17-2010, 09:25 PM
Still fails.

lickalotapus
06-18-2010, 01:12 AM
The Custom Form Output box is on the Edit Form page.
You can use BBCode in that field to format the output.
There is some info right below the box. As for the questions & answers, there are drop downs right above the box, which will insert them for you.

The insert of my questions and answers doesn't work. If I click and drag them all I get is 'javascript://'.

I think the solution is probably there, maybe I'm missing something.

Thanks

Dragonsys
06-18-2010, 01:59 AM
The insert of my questions and answers doesn't work. If I click and drag them all I get is 'javascript://'.

I think the solution is probably there, maybe I'm missing something.

Thanks

you might have a javascript problem with your browser. you can do this though

The Question Name = {qn_xx}
Question Answer = {qo_xx}
where xx is the Question Number
So to get what you posted above you would something like this in the Custom Box


{qn_1}: {qo_1}
{qn_2}: {qo_2}
{qn_3}: {qo_3}

lickalotapus
06-18-2010, 02:59 AM
That worked prefectly!

Another question:

I want to increase the size of the answer box, I want to make it larger in both width and height. If I change the size it just makes the field longer. I'd like it to be about 5 inches square.

Thanks in advance,

Dragonsys
06-18-2010, 01:11 PM
That worked prefectly!

Another question:

I want to increase the size of the answer box, I want to make it larger in both width and height. If I change the size it just makes the field longer. I'd like it to be about 5 inches square.

Thanks in advance,

Use a Multi-Line Text Field for the question, and just edit the sizes for:
Textarea Rows:
Textarea Columns:

Rows is the height and Columns is the length of the box displayed on the form.

lickalotapus
06-18-2010, 03:28 PM
That did the trick.

For some reason when several of the functions aren't working. It seems the javascripts aren't working. Any ideas?

Thanks in advance

Dragonsys
06-18-2010, 03:37 PM
That did the trick.

For some reason when several of the functions aren't working. It seems the javascripts aren't working. Any ideas?

Thanks in advance

not really, maybe you have a javascript on your forums which is conflicting? It works fine on my sites.

lickalotapus
06-18-2010, 03:47 PM
Thanks, now I just need to figure out where the conflicts are

You've been very helpful and I appreciate it!

lickalotapus
06-19-2010, 12:50 AM
Never figured out the conflicts but I did find a work around.

How can I change the navbar name? Right now it's called 'forms'

Thanks in advance,

Welshy2008
06-19-2010, 09:08 AM
How can I change the navbar name? Right now it's called 'forms'

Thanks in advance,


ACP -> Languages & Phrases -> Phrase Manager -> look for 'downloads2', click edit, and re-name it.

dannykilla
06-19-2010, 02:41 PM
I am using the this for my thread title which works fine:

{q_1} {q_3} {q_2} - Application

But it doesnt work for the poll question, all I actually see is this {q_1} {q_3} {q_2} - Application rather than the actually correct information.

Is this a bug?

lickalotapus
06-19-2010, 05:08 PM
ACP -> Languages & Phrases -> Phrase Manager -> look for 'downloads2', click edit, and re-name it.

I couldn't find 'downloads2' but since I knew where to look I was able to figure it out. It was in the Easy Forms > Phrase section.

Thanks for pointing me in right direction!

bananalive
06-19-2010, 07:11 PM
I am using the this for my thread title which works fine:

{q_1} {q_3} {q_2} - Application

But it doesnt work for the poll question, all I actually see is this {q_1} {q_3} {q_2} - Application rather than the actually correct information.

Is this a bug?
It was not a feature in previous versions, but I've added it in attached file. (will be included in next version)

bananalive
06-19-2010, 07:13 PM
That did the trick.

For some reason when several of the functions aren't working. It seems the javascripts aren't working. Any ideas?

Thanks in advance
Have you uploaded the javascript file (easyforms.js) to \clientscript\

dannykilla
06-19-2010, 07:14 PM
It was not a feature in previous versions, but I've added it in attached file. (will be included in next version)

Awesome thanks m8!

bananalive
06-19-2010, 07:20 PM
The insert of my questions and answers doesn't work. If I click and drag them all I get is 'javascript://'.

I think the solution is probably there, maybe I'm missing something.

Thanks

What browser are you using?

If it still doesn't work then use the question hashes.

e.g. for question hash 1 :
for question use {qn_1}
for answer use {qo_1}

bananalive
06-19-2010, 07:21 PM
Form Hook: Before Submit:
if ($qo[737] == "1")
{
$form[forumid] = 14;
}
elseif ($qo[737] == "2")
{
$form[forumid] = 23;
}
elseif ($qo[737] == "3")
{
$form[forumid] = 31;
}
elseif ($qo[737] == "4")
{
$form[forumid] = 39;
}

This hook no longer works after the migration to 4.0. The forumid is still the same.

Check that the question hash of the forumid question is 737

bananalive
06-19-2010, 07:24 PM
How can I change the script so the answers are on the same line as the question?

I want it to look like:

Name: Mr. Smith
Date: 6-17-10
Services Needed: Cleaning and Repairs
Amount Charged: $50
Amount Paid: $60
Feedback: Everything went well
Referred By: www.abc.com
Would you Recommend Us?: Yes

Any suggestions?
Edit Form

Under Form BB code and Custom Output find Answer BB code:

remove [indent] from each box

Alisa Lindsay
06-19-2010, 09:14 PM
Hello everyone.

I use Easy Forms at both my sites and if I neglected to say it before, let me say now, what a wonderful mod!

Was wondering, however, is there a way to require the answer to one of the questions be an image?

Thanks and Warmest Regards,

Alisa

Alisa Lindsay
06-19-2010, 09:18 PM
I'm also interested in using this to create a character's bio/profile and I'm also learning to use it. One thing though...because I'm not a developer, to me the acronym RPG stands for "rocket propelled grenade". So if in the course of my own explorations I find something that might help you I may not know because I do not understand the jargon. :D

JJ

:D Oh dear! So sorry to take so long.

RPG in my world = Roleplaying Game.

I did fix the issue with horizontal rules, btw.

Regards,

Alisa

ssslippy
06-21-2010, 02:20 AM
Hey banana I saw your code https://vborg.vbsupport.ru/showpost.php?p=1979978&postcount=146

Is it possible to modify this to put them into the queue for a join able usergroup?

bananalive
06-21-2010, 01:46 PM
Hello everyone.

I use Easy Forms at both my sites and if I neglected to say it before, let me say now, what a wonderful mod!

Was wondering, however, is there a way to require the answer to one of the questions be an image?

Thanks and Warmest Regards,

Alisa
Form Hook: Before Submit:
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"] = $attach;
$attachcount++;
$formoutput = str_replace(''.$attachcount.'',''.$attach['attachmentid'].'',$formoutput);
}
}

Then use this in Custom Form Output:

[attach]1

Ocean-Wonders
06-21-2010, 04:21 PM
Love the mod but im getting database errors about my max_packet_size. It doesn't happen all the time but it's quite frequent.

Xencored
06-21-2010, 06:21 PM
Form Hook: Before Submit:
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"] = $attach;
$attachcount++;
$formoutput = str_replace(''.$attachcount.'',''.$attach['attachmentid'].'',$formoutput);
}
}

Then use this in Custom Form Output:

[attach]1

Thank you so muchy <3

bananalive
06-21-2010, 08:31 PM
Love the mod but im getting database errors about my max_packet_size. It doesn't happen all the time but it's quite frequent.

The only thing I can suggest is to increase your server's max_packet_size. (Or ask your host to do it.)

Mimirswell
06-21-2010, 10:08 PM
Check that the question hash of the forumid question is 737

It was but just to make sure, I recreated the question and updated to the new question hash and it still failed. I double checked the forumid as well.

I'm also having a problem where when a user hits preview, it automatically fills in all dropdown select boxes with the first selection.

Dragonsys
06-22-2010, 03:41 AM
I'm also having a problem where when a user hits preview, it automatically fills in all dropdown select boxes with the first selection.

yeah, it does this on my site as well.

StagKill
06-22-2010, 01:40 PM
I was wondering if it is possible that, that the form which is produced can be automatically posted as a thread in a certain category?

Like introduction, applications?

Dragonsys
06-22-2010, 03:14 PM
I was wondering if it is possible that, that the form which is produced can be automatically posted as a thread in a certain category?

Like introduction, applications?

you can have the form results be added as a thread (or a reply) in which ever forum/thread you want.
That is one of the options when you create/edit the form

StagKill
06-23-2010, 04:10 AM
you can have the form results be added as a thread (or a reply) in which ever forum/thread you want.
That is one of the options when you create/edit the form

Thanks,

Sorry I didnt use the application and posted, I got it working the way I wanted :).

One more thing if possible in vB 4.0, when we click new thread in a particular category say introductions it should redirect to a form is that possible?
Also, when we click new post in a particular thread, lets say "All reports here", it should redirect to another form. Is that possible?

leia
06-25-2010, 02:03 PM
Very awesome mod. :) Nominated!

One question that is probably very easy. I skimmed the thread but didn't see an answer.

In the custom output, what would I need to write to have certain content only appear if an optional field is completed?

i.e. User ticks boxes indicating damages on item. I want it to display: "Seller reports the following damages: (answer output)." If they don't tick any boxes, I don't want any part of the sentence. (I'm also using it for linked images, so I don't want the IMG tags to appear if they haven't pasted a URL in one of the optional fields).

Thank you again for the mod. :)

Dragonsys
06-25-2010, 05:32 PM
Thanks,

Sorry I didnt use the application and posted, I got it working the way I wanted :).

One more thing if possible in vB 4.0, when we click new thread in a particular category say introductions it should redirect to a form is that possible?
Also, when we click new post in a particular thread, lets say "All reports here", it should redirect to another form. Is that possible?

When you create a forum, you can make it be a link instead. if the user clicked on the forum they would be directed to your link
I don't know about making the New thread button do it though. maybe by using vb if statements in the template...

Dragonsys
06-25-2010, 05:35 PM
Very awesome mod. :) Nominated!

One question that is probably very easy. I skimmed the thread but didn't see an answer.

In the custom output, what would I need to write to have certain content only appear if an optional field is completed?

i.e. User ticks boxes indicating damages on item. I want it to display: "Seller reports the following damages: (answer output)." If they don't tick any boxes, I don't want any part of the sentence. (I'm also using it for linked images, so I don't want the IMG tags to appear if they haven't pasted a URL in one of the optional fields).

Thank you again for the mod. :)

that would probably require using the Hooks, but I'm not real sure.

Alfa1
06-25-2010, 05:52 PM
Custom Form Output: (optional) You can create your own layout to the thread/ pm/ post/ email the form created. Allowed: BB code, $q[1] (replace 1 with the correct question #), $qn[1], $threadtitle, $form[title], {username}, $thisuser[username] (replace username with any user field). Leave blank to use default layout.

This works well, but the output of radio buttons and checkboxes come out as a number or 'array'. What can I add to the custom form output, to correct this?

leia
06-25-2010, 06:27 PM
that would probably require using the Hooks, but I'm not real sure.

I was thinking something with a vb: if, like how you can make a profile field display only if it contained data... but I don't know if that can be done in the forms.

I have been trying variations of this, but nothing successful so far:
<vb:if condition="$prepared['qo_5']">This item has the following damages: {qo_5}
{qo_damagedetail}</vb:if>

bananalive
06-25-2010, 08:13 PM
I'm also having a problem where when a user hits preview, it automatically fills in all dropdown select boxes with the first selection.

That will be caused by another modification you have installed on your site.

bananalive
06-25-2010, 08:24 PM
One more thing if possible in vB 4.0, when we click new thread in a particular category say introductions it should redirect to a form is that possible?


Create vBulletin Plugin with hook location newthread_form_complete
if (in_array($forumid, array(1,2,3)))
{
header( 'Location: http://www.your-site.com/forum/misc.php?do=form&fid=1' ) ;
}


Also, when we click new post in a particular thread, lets say "All reports here", it should redirect to another form. Is that possible?
Create vBulletin Plugin with hook location newreply_form_complete
if (in_array($threadid, array(1,2,3)))
{
header( 'Location: http://www.your-site.com/forum/misc.php?do=form&fid=1' ) ;
}

bananalive
06-25-2010, 08:26 PM
Very awesome mod. :) Nominated!

One question that is probably very easy. I skimmed the thread but didn't see an answer.

In the custom output, what would I need to write to have certain content only appear if an optional field is completed?

i.e. User ticks boxes indicating damages on item. I want it to display: "Seller reports the following damages: (answer output)." If they don't tick any boxes, I don't want any part of the sentence. (I'm also using it for linked images, so I don't want the IMG tags to appear if they haven't pasted a URL in one of the optional fields).

Thank you again for the mod. :)

Use custom output with vBulletin conditionals, for example

<vb:if condition="$qo['34']">{qo_1}</vb:if>

bananalive
06-25-2010, 08:27 PM
[/LIST][/LEFT]
[/CENTER]
This works well, but the output of radio buttons and checkboxes come out as a number or 'array'. What can I add to the custom form output, to correct this?

Use {qo_1} instead of {q_1}

bananalive
06-25-2010, 08:30 PM
I was thinking something with a vb: if, like how you can make a profile field display only if it contained data... but I don't know if that can be done in the forms.

I have been trying variations of this, but nothing successful so far:
<vb:if condition="$prepared['qo_5']">This item has the following damages: {qo_5}
{qo_damagedetail}</vb:if>

Use <vb:if condition="$qo['5']"> rather than <vb:if condition="$prepared['qo_5']">

leia
06-25-2010, 09:35 PM
Thanks, you're awesome. :)

Alfa1
06-25-2010, 11:19 PM
Use {qo_1} instead of {q_1}
Thanks!

I am posting output to a thread. I would like the content of field $q[18] to be added as tags. Is there a way to add tags to a new thread?

Is it possible, not to post questions in the output, if nothing has been entered in the field?

leia
06-26-2010, 02:49 PM
I'm trying to make this example (https://vborg.vbsupport.ru/showpost.php?p=2052595&postcount=573) work for my forum to let users choose the forum where their thread will be posted. I currently have it as:


if ($qo['38'] == 1)
{
$form['forumid'] = 112;
}
elseif ($qo['38'] == 2)
{
$form['forumid'] = 113;
}
elseif ($qo['38'] == 3)
{
$form['forumid'] = 114;
}


It isn't working. We're on 4.0.3.

Also, is there a way to set the prefix based on a selection from a drop down?

Alfa1
06-26-2010, 04:28 PM
Is it possible to create conditional questions? example:
If answer to question X = Y, then display question Z.
If answer to question X = not Y, then do not display question Z.

Ocean-Wonders
06-28-2010, 10:00 AM
Great mod but I could do with a bit of help :)

I'm not sure if I can do this anyway but when I try and change the colour of the title, it displays in the title, for example.
Angels (marine)

also when a user submits a form they get the form submitted succesfully page but when you view it in the forum it's posted too all that's displayed is a /

Here is an example of my questions

{qo_1}/{qo_2}[/u]
[b]{qn_1}[b] {qo_1}


any help greatly appreciated

Shawn

Dragonsys
06-28-2010, 01:28 PM
Great mod but I could do with a bit of help :)

I'm not sure if I can do this anyway but when I try and change the colour of the title, it displays in the title, for example.
Angels (marine)

also when a user submits a form they get the form submitted succesfully page but when you view it in the forum it's posted too all that's displayed is a /

Here is an example of my questions

{qo_1}/{qo_2}[/u]
[b]{qn_1}[b] {qo_1}


any help greatly appreciated

Shawn

not sure about the title color, but the problem with your post is probably the / (in {qo_1}/{qo_2}). Try changing that to a non html/bbcode character

Also look at the code yo posted. You are missing a ].

You have:
{qo_1}/{qo_2}[/u]

Should be
{qo_1}/{qo_2}

Ocean-Wonders
06-28-2010, 03:22 PM
not sure about the title color, but the problem with your post is probably the / (in {qo_1}/{qo_2}). Try changing that to a non html/bbcode character

Also look at the code yo posted. You are missing a ].

You have:
{qo_1}/{qo_2}[/u]

Should be
{qo_1}/{qo_2}

Thanks for all that it works a treat ! :D

Cant use colour code in the title, it works in the add on but outside of that i.e post titles it shows up with the bb code.

Just go to go through the forms now and edit them all accordingly.

Thanks again :up:

SAT2M
06-30-2010, 04:42 PM
Hello
I create form with bbcode editor but Image not shown in form & just shown that link

https://vborg.vbsupport.ru/

What is problem ????

pltillman
06-30-2010, 08:41 PM
I've searched through all the comments for this mod and haven't really found what I'm looking for so I figured I'd try posting my question. There may be an easier way to accomplish what I'm doing as I'm still new to vbulletin. Here's what my goal is..

I have a form (form B) that is contingent upon the user completing another form (form A). I accomplished this by adding some php code into form B to look for stored responses for form A for the user. Form B is only displayed if there are collected responses for form A. This is all working fine.

In form B, I want to have a field that is populated with responses from a field in form A. The field will be a drop down list of the collected responses from form A. I tried creating a custom question field in form B with the appropriate code and it does work, but it prints the question above everything else on the page. I'm not sure how the custom field is supposed to be used, or if there is an easier way to accomplish this. Please advise.

Thanks,
Patrick

pltillman
06-30-2010, 11:32 PM
Actually... I just figured it out. I'm not sure where it's documented, but I saw an old post that was using a variable named $answer to add the html field to. Apparently that's a special variable name that makes it work. You don't have to return or echo the variable, it just gets picked up when the form displays.

bananalive
07-01-2010, 09:43 AM
Hello
I create form with bbcode editor but Image not shown in form & just shown that link

http://www.***.***/ads/124.gif

What is problem ????

AdminCP -> vBulletin Options -> BB Code Settings -> Allow [IMG] Code in Non Forum Specific Areas -> Yes

bananalive
07-01-2010, 09:47 AM
I'm trying to make this example (https://vborg.vbsupport.ru/showpost.php?p=2052595&postcount=573) work for my forum to let users choose the forum where their thread will be posted. I currently have it as:


if ($qo['38'] == 1)
{
$form['forumid'] = 112;
}
elseif ($qo['38'] == 2)
{
$form['forumid'] = 113;
}
elseif ($qo['38'] == 3)
{
$form['forumid'] = 114;
}


It isn't working. We're on 4.0.3.

Also, is there a way to set the prefix based on a selection from a drop down?
Use this...

if ($q['38'] == 1)
{
$form['forumid'] = 112;
}
elseif ($q['38'] == 2)
{
$form['forumid'] = 113;
}
elseif ($q['38'] == 3)
{
$form['forumid'] = 114;
}

alexm
07-01-2010, 02:10 PM
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

pltillman
07-01-2010, 07:19 PM
I want to add a date field for just Month/Year, but the builtin date field doesn't allow this. So I created a custom field to display 2 drop downs (side by side) for Month and Year, but only one gets saved to the database. Is there some caveat to having numerous fields within a single custom field?

Additionally, as a workaround, I was thinking of just creating 2 drop down fields and using styling to place them on the same horizontal line, but because of the segmented nature of the questions, I'm not sure this is possible with pure css.

Any suggestions?

Also.. is there any easy way to obtain the results of the form programmatically? I can query the database and parse the string in the 'sdata' field, but it seems there is likely a better way to accomplish this.

Dragonsys
07-01-2010, 09:43 PM
Additionally, as a workaround, I was thinking of just creating 2 drop down fields and using styling to place them on the same horizontal line, but because of the segmented nature of the questions, I'm not sure this is possible with pure css.

This is something I had asked for as well. I would like a way to change how the form is displayed. Similar to how we can customize the display of the results.

alexm
07-02-2010, 06:30 AM
Just released v4.1.1 in first post

4.1.1 (16 May 2010)
- Fixed editing form result issue when 'Form Submit Limit' is reached


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."

WILFMAN
07-04-2010, 05:31 AM
Is there any way I can stop the form title appearing in the output (post)?

Thanks

Billspaintball
07-05-2010, 02:11 AM
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=editformresult&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?

riskofficer
07-06-2010, 12:19 PM
Hello bananalive!

When are you going to release new version? :) And which futures will be integrated in it?

guitarscanada
07-06-2010, 02:22 PM
I have tried everything and cannot get the email or PM notification to work

pltillman
07-06-2010, 03:18 PM
Is there a way that I can hook into the action of deleting a form entry result?

AURFSCAN
07-08-2010, 05:18 AM
great and works perfect. thx

riskofficer
07-09-2010, 08:29 AM
Bug in IE6.0 7.0 8.0

Please look at screenshot: https://vborg.vbsupport.ru/attachment.php?attachmentid=119459&stc=1&d=1278667707

The same field in Firefox: https://vborg.vbsupport.ru/attachment.php?attachmentid=119460&stc=1&d=1278667707

Any ideas how can I debug this?

guitarscanada
07-09-2010, 01:51 PM
I have tried everything and cannot get the email or PM notification to work

Any recommendations on this one?

Dragonsys
07-09-2010, 02:41 PM
Bug in IE6.0 7.0 8.0

Any ideas how can I debug this?

that is an IE "feature"

riskofficer
07-09-2010, 05:25 PM
that is an IE "feature"

Do you mean that there is no fix? May be we can extend width of this field? But there is no option in EasyForm for this.

Dragonsys
07-10-2010, 03:32 AM
Do you mean that there is no fix? May be we can extend width of this field? But there is no option in EasyForm for this.

correct. IE will only display information in the same width as the drop-down field. So if you want to display more you have to increase the size of the field. One of the many reasons I do not like IE...

alexm
07-10-2010, 11:02 AM
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?


Form Hook: Before Submit:
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"] = $attach;
$attachcount++;
$formoutput = str_replace(''.$attachcount.'',''.$attach['attachmentid'].'',$formoutput);
}
}

Then use this in Custom Form Output:

[attach]1

riskofficer
07-10-2010, 11:42 AM
correct. IE will only display information in the same width as the drop-down field. So if you want to display more you have to increase the size of the field. One of the many reasons I do not like IE...
Thank you! Do you know where can I change width of dropdown menu? In default there is no such option in EasyForms.

riskofficer
07-11-2010, 08:37 PM
Thank you! Do you know where can I change width of dropdown menu? In default there is no such option in EasyForms.
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 :)

thetgc
07-12-2010, 11:40 AM
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

riskofficer
07-12-2010, 11:52 AM
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
Good idea, but not only as user choice, and also administrators could set anonymously enter.

riskofficer
07-12-2010, 11:57 AM
One more thing, that I think will be very demanded and interesting.

For example I have single line enter field for names of companies (banks etc.). I can't use dropdown menu, because there are a lot of names, hundrets... I begin enter name: "cit" and field suggests me "city bank, city, etc." -- names from database already previously entered. Like Google does, This will be fantastic help!

Alfa1
07-12-2010, 12:54 PM
I agree with riskofficer. A autocomplete field would be awesome. Similar to what happens when searching for a member in vbulletin.

wmlvb
07-12-2010, 02:57 PM
I need and Excel copy of this form for manipulation. How do I export to excel??

I can see the form table results saved as data. Thanks

Dragonsys
07-12-2010, 04:30 PM
I need and Excel copy of this form for manipulation. How do I export to excel??

I can see the form table results saved as data. Thanks

when you view the forms, there is an Export Form Results to Excel option listed underneath. but it only exports the Data, you cannot currently export the Form to Excel, only to xml.

hiker
07-12-2010, 07:29 PM
I see the function to be able to give a thread the specific Prefix, but I'm looking for the opposite.

Can I make the form visible ONLY when a certain prefix is selected?

For example if my user wants to input some hiking trail info - location, miles, difficulty.... Can I have this form appear in the thread only when they select the correct prefix? Otherwise, I'd like the form to be absent while making normal conversation threads.

Thanks.

Dragonsys
07-13-2010, 02:10 PM
I see the function to be able to give a thread the specific Prefix, but I'm looking for the opposite.

Can I make the form visible ONLY when a certain prefix is selected?

For example if my user wants to input some hiking trail info - location, miles, difficulty.... Can I have this form appear in the thread only when they select the correct prefix? Otherwise, I'd like the form to be absent while making normal conversation threads.

Thanks.

No, this mod does not work that way. The forms do not appear in threads, only the form output can, meaning the form an create a new thread.

mslsystems
07-16-2010, 03:37 PM
I seem to have picked up an extra verification image and text box at the bottom of my form when not logged in as a member (i.e. unregistered), also the image verification that I have added to the form does not show the image until you hit refresh - It can be seen here:

http://www.galmingtondragons.net/misc.php?do=form&fid=1

Any ideas.

By the way this is a superb addition to vb4.0

Thanks

Dragonsys
07-16-2010, 04:49 PM
I seem to have picked up an extra verification image and text box at the bottom of my form when not logged in as a member (i.e. unregistered), also the image verification that I have added to the form does not show the image until you hit refresh - It can be seen here:

http://www.galmingtondragons.net/misc.php?do=form&fid=1

Any ideas.

By the way this is a superb addition to vb4.0

Thanks

That is actually the vb built-in Human Verification

Nikola Bosnjak
07-17-2010, 09:03 PM
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.

bananalive
07-18-2010, 09:06 AM
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/attachment.php?attachmentid=110514&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
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


Edit Form
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
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
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
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.

Form Hook: Before Submit:
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"] = $attach;
$attachcount++;
$formoutput = str_replace(''.$attachcount.'',''.$attach['attachmentid'].'',$formoutput);
}
}
if ($attachcount == 0)
{
$complete = false;
}

Then use this in Custom Form Output:

[attach]1

bananalive
07-18-2010, 09:39 AM
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
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
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=editformresult&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:

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\nhttp://testsite/forums/misc.php?do=editformresult&id=" . $db->insert_id() . "&fid=" . $fid . "";
}

bananalive
07-18-2010, 10:00 AM
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
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 %

Nikola Bosnjak
07-18-2010, 09:04 PM
It will probably be to do with Tabs VB Soporte

What settings do you set here: https://vborg.vbsupport.ru/attachment.php?attachmentid=110514&d=1264001585

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


Well, I might go OT now, but I think this is still a bit related to this mod.

So, I disabled Tabs VB Soporte mod, and I had to learn how to manualy remove and add new tabs. That went good, I removed all tabs exept CMS Homepage. Now, when I enable tab "Forms", I have only this two, "Homepage" and "Forms". When I click to "Forms", a miracle happens, this tab dissapears and I have again my "Forum" tab.

Then I suspected that "Forms" tab had some If-Then-Else clause that pops up this "Forum"tab, since I might be the only one who don't use forum at all. I disabled your tab, and manualy add new tab that links to my 1st form. Again, when clicked this tab dissapears and on it's place I get "Forum" tab.

Then I suspected that this has nothing to do with this mod, but with misc.php script. To test it, I disabled your mod and also deleted my tab. Now I have only Homepage. I enter url .../misc.php, and again, my "Forum" tab is back, it is active and below I have some list of smilies. So, as I suspected, I have a problem even without your mod, only I would never discover it becouse I have no reason to link to this misc.php.

Now, since your mod uses this script, you might be the right person to ask, is it normal that this script activates Forum? Is Forum mandatory for misc.php and for my future forms? Can this be somehow cracked, I browsed misc.php script and also Navbar template, but I see no instruction that would make Forum tab active.

Actualy, I suspect that I did't disable my Forum tab properly, I can't find instructions to do that. I just removed this line from my Navbar template:

<vb:else />
<li><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a></li>
</vb:if>

Is there some other lines that needs to be deleted from Navbar to permanently remove Forum? I would't need it for some time and I just dont want to see this tab untill my forum is ready for use.

Sorry for OT, but it started with this mod and it still might be related, somehow:confused:

Willy T
07-18-2010, 10:25 PM
Can you please make

Usergroups Allowed to Edit Forms
Usergroups allowed to add/edit/delete forms (Permission to view Form List is recommended for these usergroups)

each on their own line? I want usergroups to be able to CREATE forms but not delete everyone's in the event someone get's angry. They can request deletion by a moderator.

Thank you!

thetgc
07-19-2010, 03:07 PM
Edit Form
Add the following to both Form Hook: Form Start: and Form Hook: Before Submit:
$vbulletin->userinfo['userid'] = 0;
$vbulletin->userinfo['username'] = 'Anonymous';


Thanks :)

But if i was to create a custom answer in lets say the type of a checkbox what what be the PHP code for the checkbox for anonymous as i want users to choose between been anonymous or not.

Thanks,

abqtj
07-19-2010, 04:51 PM
This is working out very well for me! Thanks so much!

abqtj
07-19-2010, 05:34 PM
ACP -> Languages & Phrases -> Phrase Manager -> look for 'downloads2', click edit, and re-name it.

I couldn't find 'downloads2' but since I knew where to look I was able to figure it out. It was in the Easy Forms > Phrase section.

Thanks for pointing me in right direction!



Could someone walk me through this? I'd like to change the navbar name as well and I'm not following. I don't see "downloads2".

vilhiem
07-20-2010, 01:46 AM
Is it possible to have "answers" on the form output to the "TAG" in a message ...?

Thanks!!!

alexm
07-20-2010, 06:41 AM
Using the quoted code:

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

Thanks bananalive, that's brilliant! :cool:

Dragonsys
07-20-2010, 01:39 PM
Well, I might go OT now, but I think this is still a bit related to this mod.

So, I disabled Tabs VB Soporte mod, and I had to learn how to manualy remove and add new tabs. That went good, I removed all tabs exept CMS Homepage. Now, when I enable tab "Forms", I have only this two, "Homepage" and "Forms". When I click to "Forms", a miracle happens, this tab dissapears and I have again my "Forum" tab.

Then I suspected that "Forms" tab had some If-Then-Else clause that pops up this "Forum"tab, since I might be the only one who don't use forum at all. I disabled your tab, and manualy add new tab that links to my 1st form. Again, when clicked this tab dissapears and on it's place I get "Forum" tab.

Then I suspected that this has nothing to do with this mod, but with misc.php script. To test it, I disabled your mod and also deleted my tab. Now I have only Homepage. I enter url .../misc.php, and again, my "Forum" tab is back, it is active and below I have some list of smilies. So, as I suspected, I have a problem even without your mod, only I would never discover it becouse I have no reason to link to this misc.php.

Now, since your mod uses this script, you might be the right person to ask, is it normal that this script activates Forum? Is Forum mandatory for misc.php and for my future forms? Can this be somehow cracked, I browsed misc.php script and also Navbar template, but I see no instruction that would make Forum tab active.

Actualy, I suspect that I did't disable my Forum tab properly, I can't find instructions to do that. I just removed this line from my Navbar template:

<vb:else />
<li><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a></li>
</vb:if>

Is there some other lines that needs to be deleted from Navbar to permanently remove Forum? I would't need it for some time and I just dont want to see this tab untill my forum is ready for use.

Sorry for OT, but it started with this mod and it still might be related, somehow:confused:

In order for a Tab to work for the Forms properly, you have to use the THIS_SCRIPT tag. Since Forms uses misc.php the THIS_SCRIPT = misc. If you are not using THIS_SCRIPT properly, the tab will disappear when clicked on.
The problem here, is any page which uses the misc.php will cause this tab to highlight.

As for removing the Forum tab, you only removed the Highlighted version of the tab. So when you view a page which does not highlight Forums the Tab will reappear. Look in your NAVBAR Template you should be able to find 2 or 3 Forum Tabs in there.

Dragonsys
07-20-2010, 01:43 PM
Could someone walk me through this? I'd like to change the navbar name as well and I'm not following. I don't see "downloads2".

downloads2 is a different product. You need to look in the Phrases section for Easy Forms.

Choez
07-23-2010, 07:41 PM
Hello, Many thanks for this great addon. I however have one question; I want the form to submit to 2 different forums, one is hidden from most and is intended for internal discussion, and the other is for public view. Is there anyway you could assist me with accomplishing this? Even pointing at the right area in the code would be of immense help!

Nikola Bosnjak
07-23-2010, 09:49 PM
I can see that other members had a problem with deleting a form, but can not find the answer. I'm having the same problem, when I click on Delete form noting happens, and also when I want to delete a question in this (any) form, nothing happens.

EDIT: Ok, I found my way how to do it. Just put a URL manually ...misc.php?do=deleteform&fid=1. Is there some bug in this script, how to fix it? Becouse when I click some links on Form screen, I get only URL ...misc.php# and obviously nothing happens.

Nikola Bosnjak
07-27-2010, 09:47 AM
Is there a way to promote a form to an article? I tried with xml output, but this I can not use in article. Or I should somehow modify xml and use it as "Static page" or "PHP direct evaluation"?

If this is not possible, how can I change sub links that I see when I'm using a form? Currently I'm not using a Forum on my site, only a CMS, so when a visitor goes to fill a form, now he see a links that he don't understand (FAQ, Calendar, Forum actions, Quick links) so I would like that I can hide this links or to have the same links like when I'm reading articles (Sections).

Please, and thank you!

Necrovaris
07-27-2010, 10:25 AM
Hi,

Is there any way I can capture the IP address of the person hitting the submit button, even if its an unregistered user?

Thanks

laric
07-27-2010, 10:37 AM
I love this mod.
I have a weird usage for it perhaps.

I am using it for guild applications for our gaming guild.

Thus I need the full form posted to the officers forum. (Works just fine)

Then I need a subset of the form posted to the 'highend' members forum.

How would I go about to do that?

I am somewhat familiar with php but not very familiar with the vb structure of the code.

I guess I need a hook/plugin somewhere?

thunderclap82
07-27-2010, 07:24 PM
Can a person filling out the form attach a file?

Choez
07-27-2010, 10:18 PM
I love this mod.
I have a weird usage for it perhaps.

I am using it for guild applications for our gaming guild.

Thus I need the full form posted to the officers forum. (Works just fine)

Then I need a subset of the form posted to the 'highend' members forum.

How would I go about to do that?

I am somewhat familiar with php but not very familiar with the vb structure of the code.

I guess I need a hook/plugin somewhere?

For the exact same reason why I asked if it's possible to submit a form to threads 'twice'. I've looked at the code and found the section where the threads are created; but I can't get it modified to a working version, missing comments in the code of what does what :P (understandably).

Any hints or help here would be heavily appreciated.

Cadellin
07-30-2010, 06:06 PM
Is there a way to stop created threads being posted as unapproved? I don't want to have to approve each thread created.

Thanks

Willy T
07-31-2010, 03:57 PM
Can you please make



each on their own line? I want usergroups to be able to CREATE forms but not delete everyone's in the event someone get's angry. They can request deletion by a moderator.

Thank you!

Any ideas?

Dragonsys
08-02-2010, 08:26 PM
Is there a way to stop created threads being posted as unapproved? I don't want to have to approve each thread created.

Thanks

turn off moderation for the Forum you have the threads created in.

TMSBrad
08-02-2010, 08:31 PM
I'm working on the custom form output. How would I structure the if statement to check if something is null? What about is not null?

bananalive
08-05-2010, 09:16 AM
I'm working on the custom form output. How would I structure the if statement to check if something is null? What about is not null?

<vb:if condition="$q[2]">not null<vb:else />null</vb:if>
<vb:if condition="$q[2]">Value Entered<vb:else />No Value</vb:if>

bananalive
08-05-2010, 09:23 AM
Can a person filling out the form attach a file?

Yes when the form is creating a new thread

bananalive
08-05-2010, 09:29 AM
If this is not possible, how can I change sub links that I see when I'm using a form? Currently I'm not using a Forum on my site, only a CMS, so when a visitor goes to fill a form, now he see a links that he don't understand (FAQ, Calendar, Forum actions, Quick links) so I would like that I can hide this links or to have the same links like when I'm reading articles (Sections).

Please, and thank you!


Find this line in plugin Easy Forms - Forms Tab:
$vbulletin->options['selectednavtab'] = 'forms';
Replace with:
$vbulletin->options['selectednavtab'] = 'vbcms';

or
$vbulletin->options['selectednavtab'] = 'articles';

bananalive
08-05-2010, 09:45 AM
I can see that other members had a problem with deleting a form, but can not find the answer. I'm having the same problem, when I click on Delete form noting happens, and also when I want to delete a question in this (any) form, nothing happens.

EDIT: Ok, I found my way how to do it. Just put a URL manually ...misc.php?do=deleteform&fid=1. Is there some bug in this script, how to fix it? Becouse when I click some links on Form screen, I get only URL ...misc.php# and obviously nothing happens.

I've changed how it's handled for next release, so it will work for those who don't have javascript browsers.

vap0r-7
08-05-2010, 05:01 PM
I would like to say thanks, this is one of the best mods to have available and use.

It is extremely easy and user friendly. It has made a huge difference for our website and allows for even more opportunities without having to worry about having to get a brand new XML form created or revised.

Again, great job and many thanks, this has saved many hours of time and frustration.

Sarcoth
08-05-2010, 08:11 PM
For the exact same reason why I asked if it's possible to submit a form to threads 'twice'. I've looked at the code and found the section where the threads are created; but I can't get it modified to a working version, missing comments in the code of what does what :P (understandably).

Any hints or help here would be heavily appreciated.

Search and you shall find: https://vborg.vbsupport.ru/showpost.php?p=1992925&postcount=229

bada_bing
08-05-2010, 08:49 PM
I am wondering I I setup a forum using Easy Forms if there is any way to intergrate this into vbadvanced?

Sarcoth
08-09-2010, 04:47 PM
Hey Banana,

I think I have a good one for you. :)

I am setting up a custom question to ask my moderators to select a name belonging to usergroup 2.

$answer .= '<select name="'.$formbit[id].'">';
$members = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user
WHERE usergroupid = 2
ORDER BY username ASC");
while($row = $db->fetch_array($members)) {
$answer .= '<option value="'.$row[username].'"';
if ($row[username] == $thisanswer) {
$answer .= 'selected="selected"';
}
$answer .= '>'.$row[username].'</option>';
}
$answer .= '</select>';

That works great; I've given this question the reference of shuser. This will allow my moderators to select the name they want. When they click submit, I want the name selected to have the primary usergroup changed to usergroup 18. Here is what I tried as my first test (Form Hood: Before Submit):

if ($complete) {
$userinfo=fetch_userinfo($qo[shuserid]);
$user=$userinfo;

//$userinfo = $vbulletin->userinfo;
$user['usergroupid'] = 18;

if (empty($user['usergroupid'])) {
$user['usergroupid'] = 2;
}

$getusergroupid = iif($userinfo['displaygroupid'] != $userinfo['usergroupid'], $userinfo['displaygroupid'], $user['usergroupid']);

$user_usergroup =& $vbulletin->usergroupcache["$user[usergroupid]"];
$display_usergroup =& $vbulletin->usergroupcache["$getusergroupid"];

$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('usergroupid', $user['usergroupid']);
$userdata->set_usertitle(
$user['customtitle'] ? $user['usertitle'] : '',
false,
$display_usergroup,
($user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canusecustomtitle']) ? true : false,
($user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cancontrolpanel']) ? true : false
);

require_once(DIR . '/includes/functions_ranks.php');

if ($user['userid'] == $vbulletin->userinfo['userid']) {
$vbulletin->userinfo['usergroupid'] = $user['usergroupid'];
$vbulletin->userinfo['displaygroupid'] = $user['usergroupid'];
}

$userdata->save();
}

Obviously, now I realize that the usergroup update code was meant to use a userid, not the username. So, what do you suggest? I was thinking that I could find a way to use the username for searching for the userid, I need to remember how I did that in the past, and then put that into the code. Do you know how to do that off hand? I'll keep searching.

Thanks.

Sarcoth
08-09-2010, 05:09 PM
I tried the following with no luck for the top part. I think this is mostly correct, but I must be doing a variable the wrong way.

if ($complete) {
$shuserid = $vbulletin->db->query_first("select userid from vBull_user where username='{$qo['shuser']}'");
$userinfo=fetch_userinfo($qo[$shuserid]);

Dragonsys
08-09-2010, 06:23 PM
I tried the following with no luck for the top part. I think this is mostly correct, but I must be doing a variable the wrong way.

if ($complete) {
$shuserid = $vbulletin->db->query_first("select userid from vBull_user where username='{$qo['shuser']}'");
$userinfo=fetch_userinfo($qo[$shuserid]);

maybe instead of if ($complete) try using if (isset($qo['shuser']))?
Also make sure that $qo['shuser'] is correct, and it's not actually something like $qo[1]

Dragonsys
08-09-2010, 06:30 PM
I am wondering I I setup a forum using Easy Forms if there is any way to intergrate this into vbadvanced?

what are you wanting for integration?

bananalive
08-09-2010, 07:35 PM
I tried the following with no luck for the top part. I think this is mostly correct, but I must be doing a variable the wrong way.


$shuserid = $vbulletin->db->query_first("select userid from vBull_user where username='{$qo['shuser']}'");
$userinfo=fetch_userinfo($qo[$shuserid]);




$shuserid = $vbulletin->db->query_first("
SELECT userid
FROM ". TABLE_PREFIX ."user
WHERE username = '" . $db->escape_string($qo['shuser']) . "'
");

Willy T
08-10-2010, 11:23 PM
Can you please make

Usergroups Allowed to Edit Forms
Usergroups allowed to add/edit/delete forms (Permission to view Form List is recommended for these usergroups)

each on their own line? I want usergroups to be able to CREATE forms but not delete everyone's in the event someone get's angry. They can request deletion by a moderator.

Thank you!

Sarcoth
08-11-2010, 12:04 AM
$shuserid = $vbulletin->db->query_first("
SELECT userid
FROM ". TABLE_PREFIX ."user
WHERE username = '" . $db->escape_string($qo['shuser']) . "'
");

Good stuff Banana, thank you. I got it working! :) I am using a custom question which selects a user from usergroup 2; reference name = shuser.
$answer .= '<select name="'.$formbit[id].'">';
$members = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user
WHERE usergroupid = 2
ORDER BY username ASC");
while($row = $db->fetch_array($members)) {
$answer .= '<option value="'.$row[username].'"';
if ($row[username] == $thisanswer) {
$answer .= 'selected="selected"';
}
$answer .= '>'.$row[username].'</option>';
}
$answer .= '</select>';


Then, here is the code I am using to move a user to a new usergroup:
$shuserid = $vbulletin->db->query_first("
SELECT userid
FROM ". TABLE_PREFIX ."user
WHERE username = '" . $db->escape_string($qo['shuser']) . "'
");
//print_r($shuserid['userid']);

if ($complete) {
$userinfo=fetch_userinfo($shuserid[userid]);

//**Replace 18 with choosen usergroupid you want to add them to**//
$user['usergroupid'] = 18;

if (empty($user['usergroupid'])) {
$user['usergroupid'] = 2;
}

$getusergroupid = iif($userinfo['displaygroupid'] != $userinfo['usergroupid'], $userinfo['displaygroupid'], $user['usergroupid']);

$user_usergroup =& $vbulletin->usergroupcache["$user[usergroupid]"];
$display_usergroup =& $vbulletin->usergroupcache["$getusergroupid"];

$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('usergroupid', $user['usergroupid']);
$userdata->set_usertitle(
$user['customtitle'] ? $user['usertitle'] : '',
false,
$display_usergroup,
($user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canusecustomtitle']) ? true : false,
($user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cancontrolpanel']) ? true : false
);

require_once(DIR . '/includes/functions_ranks.php');
if ($user['userid'] == $vbulletin->userinfo['userid']) {
$vbulletin->userinfo['usergroupid'] = $user['usergroupid'];
$vbulletin->userinfo['displaygroupid'] = $user['usergroupid'];
}

$userdata->save();
}

bigrover
08-11-2010, 07:01 PM
Thank you, bananalive. This is a great mod. :up:

Is there an obvious location where the form id is displayed? I am interested so I can manage the redirect location for my newthread_form_complete plugin.

I also would like to see some method of autocomplete of a field through comparison to a database field such as username. Sounds like some AJAX and Javascripting would be involved, not unlike what is happening during a vB user registration when it is checking the length and content of the new username while it is being entered.

mokonzi
08-11-2010, 07:32 PM
The form ID is always included in the URL...

bigrover
08-12-2010, 04:42 AM
How can I adjust the forum destination for the form results dynamically? Specifically, I want to recognize the forum I am in when I make the call to the form 'http://www.your-site.com/forum/misc.php?do=form&fid=1'. I am using the plugin example below and adjusted the array to the custom forum. It correctly loaded the form rather than the standard post editor, but it saved the results into the destination forum coded in the form (forum #2), and not the current forum where it was launched. Can I override that behavior?

Create vBulletin Plugin with hook location newthread_form_complete
PHP Code:
if (in_array($forumid, array(3)))
{
header( 'Location: http://www.your-site.com/forum/misc.php?do=form&fid=1' ) ;
}
Originally Posted by StagKill View Post

bigrover
08-12-2010, 12:56 PM
I am getting the following error from the Form Hook: Before Submit:

Unable to add cookies, header already sent.
File: /home/yoursite.org/public_html/forums/misc.php(89) : eval()'d code(491) : eval()'d code
Line: 1

The code I entered is:

$form[forumid] = forumid

I am trying to get the form to go to the current forum where the user clicked on the link to go to the form. What am I doing wrong?

***

On a separate thought, does the misc.php accept an argument containing the forumid, like the newthread.php? I could pass the forumid at the time the form is called if it does.

AliceHoward
08-13-2010, 04:39 PM
In a word, perfect, thank you. :)

Choez
08-14-2010, 02:01 PM
Still looking for a tip/hint as to how I can make a form submit twice to 2 different locations :) Been playing around with it myself but I can't get it to work :-/

redraider
08-15-2010, 10:25 PM
Need help, I havent been able to figure out how to allow user to choose which forum they want to post the question to.

In short : There is just one form that the user uses, and in that form, he chooses from a drop down which forum he should post the question to.

How would I be able to achieve this.

Any help will be great!

bananalive
08-16-2010, 03:46 PM
Need help, I havent been able to figure out how to allow user to choose which forum they want to post the question to.

In short : There is just one form that the user uses, and in that form, he chooses from a drop down which forum he should post the question to.

How would I be able to achieve this.

Any help will be great!


Create Custom Question with:
Reference Name: forumid
PHP Code: $answer = "<select name=\"$formbit[id]\" id=\"q_" . $formbit[id] ."\">";

foreach ($vbulletin->forumcache AS $forumid => $forum)
{
if ($qo['forumid']==$forumid)
{
$forum['selected'] = ' selected="selected"';
}
$answer .= "<option value=\"$forumid\"$forum[selected]>$forum[title]</option>";
}
$answer .= "</select>";
Edit Form -> Form Hook: Before Submit:
$forumid = $form['forumid'] = $qo['forumid'];

bananalive
08-16-2010, 03:47 PM
I am getting the following error from the Form Hook: Before Submit:

Unable to add cookies, header already sent.
File: /home/thebonvi/domains/thebonvivant.org/public_html/forums/misc.php(89) : eval()'d code(491) : eval()'d code
Line: 1

The code I entered is:

$form[forumid] = forumid

I am trying to get the form to go to the current forum where the user clicked on the link to go to the form. What am I doing wrong?

***

On a separate thought, does the misc.php accept an argument containing the forumid, like the newthread.php? I could pass the forumid at the time the form is called if it does.

You are using invalid php in one of the hooks.

The following is an example of correct php:

$form['forumid'] = '3';

Bigj85
08-16-2010, 11:41 PM
hey banana,been using easyforms a while and love it

just lately though I tried using the question variables for the form output

the form output should be {q_1} Review for {q_2} by {username}

{q_1} being a game name and {q_2} being the platform,so the output should read something like

"mass effect 2 review for PC by bigj85"

but only the username variable is working so I get

"Review for by bigj85"

am I doing something wrong here?

I'm having the forms output sent to a forum as their own thread btw

Welshy2008
08-17-2010, 11:29 AM
Is this great mod been confirmed as working on an upgrade from 4.0.5 and 4.0.6, Please?

Sarcoth
08-17-2010, 01:17 PM
hey banana,been using easyforms a while and love it
just lately though I tried using the question variables for the form output
the form output should be {q_1} Review for {q_2} by {username}
{q_1} being a game name and {q_2} being the platform,so the output should read something like
"mass effect 2 review for PC by bigj85"
but only the username variable is working so I get
"Review for by bigj85"
am I doing something wrong here?
I'm having the forms output sent to a forum as their own thread btw

{q_#} does not mean the first question. It represents the questions number. Go to the edit form page for the form you are looking at. Go to the bottom. You'll see your questions listed like so:

1. What is the name of the game? (Single Line Text Field) #38

The number at the end there (#38) is the question's number. So, that would be {q_38}.

Personally, I recommend using reference name within the question (like gamename) and then doing {q_gamename} instead, but that's up to you.

temporaryins
08-17-2010, 05:51 PM
Is this great mod been confirmed as working on an upgrade from 4.0.5 and 4.0.6, Please?

I've had it running on 4.0.5, upgrade to 4.0.6, still working fine.

Bigj85
08-17-2010, 09:00 PM
{q_#} does not mean the first question. It represents the questions number. Go to the edit form page for the form you are looking at. Go to the bottom. You'll see your questions listed like so:



The number at the end there (#38) is the question's number. So, that would be {q_38}.

Personally, I recommend using reference name within the question (like gamename) and then doing {q_gamename} instead, but that's up to you.


ahhhh thanks Sarcoth that did the trick :)

bigrover
08-18-2010, 05:06 AM
I am unable to affect the destination of the form results with the code you corrected below in the form hook before submit location. The form always goes to the destination specified in the "Forumid where Thread is posted:" location. In my case I have a main category (forum 1), a main forum (forum 2) and a review forum (forum 3). I even tried setting "Forumid where Thread is posted:" to the main category. I didn't get an error, but the form results did not appear in either forum. Not sure where it went. I'm not getting an error message anymore, but neither am I able to redirect the form output.

Per your comments in post #651 I also tried the forum assignment without the single quotes surrounding the target forum with no change in behavior.

$form['forumid'] = 3;

You are using invalid php in one of the hooks.

The following is an example of correct php:

$form['forumid'] = '3';

bananalive
08-18-2010, 09:38 AM
I am unable to affect the destination of the form results with the code you corrected below in the form hook before submit location. The form always goes to the destination specified in the "Forumid where Thread is posted:" location. In my case I have a main category (forum 1), a main forum (forum 2) and a review forum (forum 3). I even tried setting "Forumid where Thread is posted:" to the main category. I didn't get an error, but the form results did not appear in either forum. Not sure where it went. I'm not getting an error message anymore, but neither am I able to redirect the form output.

Per your comments in post #651 I also tried the forum assignment without the single quotes surrounding the target forum with no change in behavior.

$form['forumid'] = 3;

To affect the destination forum you need both variables changing, as below:

$forumid = $form['forumid'] = 3;

bigrover
08-18-2010, 08:46 PM
OK, that did get the message into forum #3, but the posting updated the forum statistics on the forums display page for both forum #2 and forum #3, including the title of the post, the user and the posting date & time stamp. Forum #2 now shows 11 threads but when you open it there are only 10. Forum #2 is the forum specified as the destination in the form itself, and it is being over-ridden to send the form to #3.

If you would like to hack around on my box to see what is going on, send me a PM.

riskofficer
08-19-2010, 08:53 AM
Hello!

My database already contains 300 inputs with 10 columns each. Speed of generating new exports decreased dramticaly, but im planning that database will be thousends of inputs for next few years. Is there any solves of such problem? May be prepare export file not on demand but by schedule?

bananalive
08-19-2010, 10:16 AM
OK, that did get the message into forum #3, but the posting updated the forum statistics on the forums display page for both forum #2 and forum #3, including the title of the post, the user and the posting date & time stamp. Forum #2 now shows 11 threads but when you open it there are only 10. Forum #2 is the forum specified as the destination in the form itself, and it is being over-ridden to send the form to #3.

If you would like to hack around on my box to see what is going on, send me a PM.
Try this:
$form['forumid'] = 3;
if ($forumid = $form['forumid'])
{
$foruminfo = verify_id('forum', $forumid, 0, 1);
$forumperms = fetch_permissions($forumid);
}

$foruminfo is used later in the script to rebuild thread counters.

bananalive
08-19-2010, 10:19 AM
Hello!

My database already contains 300 inputs with 10 columns each. Speed of generating new exports decreased dramticaly, but im planning that database will be thousends of inputs for next few years. Is there any solves of such problem? May be prepare export file not on demand but by schedule?

Are your inputs containing bb code which needs to be parsed?

If they are not, then you could stop the bbcode parsing, which should speed up process.

riskofficer
08-19-2010, 10:35 AM
Are your inputs containing bb code which needs to be parsed?

If they are not, then you could stop the bbcode parsing, which should speed up process.

Hmm, how can I stop bbcode parsing for easyforms?

The problem is, even "Form Results" where I can edit database, generating too long, and each new entry making this time longer. May be split on pages "Form Results" and @From Results table".

But "Form results Poll" and "Export to Excel" will still generating too long and hang up server.

May be option "ondemand-real-time/schedule" is better?

Willy T
08-20-2010, 12:45 AM
Hey Bananalive- this is about my 3-4th request without a single reply so I guess I need to keep trying.

Can you please assist with making

Usergroups Allowed to Edit Forms
Usergroups allowed to add/edit/delete forms (Permission to view Form List is recommended for these usergroups)

each on their own line? I want usergroups to be able to CREATE forms but not delete everyone's in the event someone get's angry. They can request deletion by a moderator.

Greatly appreciate the help.

joeman
08-20-2010, 05:14 PM
Hey banana I tried adding this to my 4.0.6 and it seems like a great plugin but when I try to click on it from a tab from an addition tab plugin, I get an error code that says:

(Message)
"Error, this form does not exist."

Do you have any idea why it says I'm getting an error that the form I made doesn't exist or have you seen that problem before?

Thanks

bchertov
08-24-2010, 02:14 AM
This looks like a great idea, but I've got no idea how this works!
Is there a help file or tutorial or fully explained example someplace?

bigrover
08-24-2010, 03:34 AM
The code you posted below worked. Now I need to figure out how to store the current forum when the form is called, then apply it in this script. I'm going to do some looking for a variable that may contain this information, then figure out how to store it and retrieve it when needed. If anyone has any suggestions I would greatly appreciate it.

I do have to say I really like this script, particularly the ability to format the output as desired with conditional statements based on the form data. It works great. Thanks Bananalive, good work.

Bchertov, I managed to figure this out mainly by reading through all the pages of this thread, then installing it on a development site and just hacking out a form and watching what happened.

Try this:
$form['forumid'] = 3;
if ($forumid = $form['forumid'])
{
$foruminfo = verify_id('forum', $forumid, 0, 1);
$forumperms = fetch_permissions($forumid);
}

$foruminfo is used later in the script to rebuild thread counters.

laric
08-24-2010, 11:23 AM
I love this mod.
I have a weird usage for it perhaps.

I am using it for guild applications for our gaming guild.

Thus I need the full form posted to the officers forum. (Works just fine)

Then I need a subset of the form posted to the 'highend' members forum.

How would I go about to do that?

I am somewhat familiar with php but not very familiar with the vb structure of the code.

I guess I need a hook/plugin somewhere?

Bananalive. Any chance that you could help me with this one. This is the last part I need before I can move from my old SMF forum over to my new VB forum.