Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Form Hack Details »
Form Hack
Mod Version: 4.1, by Abe1 (Coder) Abe1 is offline
Developer Last Online: Jun 2010 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.x Rating: (76 votes - 4.51 average) Installs: 1213
Released: 15 Sep 2006 Last Update: 24 Apr 2008 Downloads: 6039
Not Supported Uses Plugins Template Edits  

Form Hack 4.1


Features:

Ever wanted an online form that a user can fill out, which when submitted gets:
  • Posted into a new thread in a forum of your choice
  • Create a new poll in the new thread with options of your choice
  • Posted as a reply in an existing thread of your choice
  • PMed to you or someone else
  • Emailed to an email address you specify
  • Choose to redirect to the post, thread or forum, or a custom thank you message
  • Choose to redirect to edit post
  • See a preview before they submit

Or any combination or all of the above?

Well, this is the hack for you!

You can use this for:
  • Moderator Applications
  • Quiz Submit Form which gets PMed to a moderator
  • Contact Form that goes to PM, email or thread
  • Guests to apply to be members
  • Report a Moderator form that goes as a PM to you
  • Guests can PM you for whatever reason
  • Order form to buy things
  • Donation form
  • News or Articles submissions that can go straight to a thread

Or anything you like - this hack is totally customizable via the AdminCP.

The beauty of this hack is that once you install this hack, to make a new form all you need to do is copy the main hook, rename it to whatever you want, edit the variables in the hook, and you have a totally new form!!! You do not need to touch the templates again, but can always create new ones and use different templates for different forms.

Format of the form:
  • One main input question
  • 3 Radio buttons Choice questions
  • 3 Normal text input questions
  • 1 Drop down menu
  • 3 Check boxes
  • 1 Long answer question
  • 1 VB message editor text box question
  • Upload attachments

This is customizable via the hook.

Also:
  • You can set the usergroups you want access to this form.
  • Depending on your forum permissions, if the new thread is in a public forum, members can reply to it. This hack allows a form to submit the new thread or post wherever you want it to go.
  • Force the user to answer all questions.

INSTALLATION
Easy - takes only a few minutes:
  • Import the XML into products. (admin cp -> Plug-in System -> Manage Products -> Add/Import Product)
  • Edit the main plug-in - the instructions are all inside the hook itself, in the top half. Follow the instructions carefully!
  • To get to the form, go to: /newthread.php?do=form (change "form" to the name of your form if you have few)

Done!

Use this hack to make as many forms as you like!

Enjoy!

Updates:

Version 4.0: (09/15/2006)
  • Ported over for vb3.6
  • Send to multiple emails.
  • Send multiple PMs.
  • Parse emails for BBCode
  • And finally, ATTACHMENTS!

Version 4.1: (04/24/2008)
  • Fixed for vb 3.6.10
  • Small bug fixed.
  • List of the 2 quick edits are in the zip file so you don't have to start making a form from scratch.

MAKE SURE YOU CLICK INSTALL!
You will get an email when a new version is released.

Abe1 with rights from Dr Erwin Loh

Download Now

Only licensed members can download files, Click Here for more information.

Addons

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	form.JPG
Views:	21052
Size:	147.2 KB
ID:	53487  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Add-On Releases Ajax add-on Form Hack Deepdog009 vBulletin 3.6 Template Modifications 23 22 Sep 2008 20:17

  #1261  
Old 19 Sep 2008, 12:23
viper357's Avatar
viper357 viper357 is offline
 
Join Date: Dec 2006
Can somebody please help with why I am getting this error when I submit the form.

Fatal error:

* Please complete both the subject and message fields.

Unable to proceed with save while $errors array is not empty in class vB_DataManager_PM in /includes/class_dm.php on line 763
Reply With Quote
  #1262  
Old 25 Sep 2008, 00:47
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
You have to be very careful with this form as you will get data manager errors if you have multiple forms using the same variables.
My advice is to become very familiar with the form before using it.
This way , you can create your own variable.
Example:
Instead of
$question1="What is your name?";
you can write your own variable...
$form_one_question1="What is your name?";
or
$form_one_name="What is your name?";
Definitely not for the impatient but a great product.

There are a few bugs like if you have a question:
Do you have a name? If yes, please state your name.
Someone can still choose no and state their name so it shows as:
No
My Name

I have found a quick fix conditional to add to your formanswers template that works fairly well for me.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

What this does is if the name area is not empty, it changes the No to Yes.
So your actual code for the question assuming it is $radioquestion1 is as follows:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I have to say I am having fun with this hack.
Another thing I noticed is that HTML is not parsing in the formanswers template
and any BBCode produces errors.
Is there any way around this?
I would like to add some styling to the form when it is posted to a thread like using Bold and Underline and possibly a hyperlink to various answers.
Thanks
Reply With Quote
  #1263  
Old 28 Sep 2008, 14:09
swisscotton swisscotton is offline
 
Join Date: Apr 2008
I have installed this hack but for some reason the answers to the normal questions ($question) are not showing up on priview or when its submitted.

My PHP isn't very good at all so I was hoping someone for have a quick look for me?
http://www.fileden.com/files/2007/3/...ot_working.txt

Emma
Reply With Quote
  #1264  
Old 28 Sep 2008, 16:41
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
Part 1 and Part 2 have to be the same for your answer variables.
My suggestion is to first write down all questions and answers, then add to form.
Example:
$question1 = "What is the Rabbits Name?";
$explain1 = "Please enter your real name here.";

In question1, you would only need to clean the answer1
(your own questions and explains dont need to be run through the vb input.)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You also need to be sure that all the same $variables are distributed properly to the templates.
form template

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

answer template

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by Bilderback; 28 Sep 2008 at 16:48. Reason: added info
Reply With Quote
  #1265  
Old 28 Sep 2008, 16:54
Nuguru's Avatar
Nuguru Nuguru is offline
 
Join Date: Jun 2006
Question Great Mod, but ...

Hello,

Great mod, but has this mod been updated to work with vb 3.7.3 or above?

Thx
Reply With Quote
  #1266  
Old 28 Sep 2008, 20:03
swisscotton swisscotton is offline
 
Join Date: Apr 2008
Originally Posted by Bilderback View Post
Part 1 and Part 2 have to be the same for your answer variables.
My suggestion is to first write down all questions and answers, then add to form.
Example:
$question1 = "What is the Rabbits Name?";
$explain1 = "Please enter your real name here.";

In question1, you would only need to clean the answer1
(your own questions and explains dont need to be run through the vb input.)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You also need to be sure that all the same $variables are distributed properly to the templates.
form template

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

answer template

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Thanks for that. But I really can't do it. I don't know PHP at all. I have tried tweaking it but nothing is appearing. I have tried going back to the default form and inputting it again but I am still not getting the answers appearing
Reply With Quote
  #1267  
Old 28 Sep 2008, 20:39
swisscotton swisscotton is offline
 
Join Date: Apr 2008
Not only dosn't it display the ansewrs its still only showing the first three questions on preview (I have added them into the html).

http://www.fileden.com/files/2007/3/...t_working2.txt

I know is something I am doing wrong because I am a designer and know nothing what so ever about this kind of thing. It is a very basic form I am trying to put together.
Reply With Quote
  #1268  
Old 29 Sep 2008, 01:37
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
Like I stated in a previous post, its more coder-oriented and without much documentation.
The idea is to first develop your variables list
(Note:You only have to use the vbulletin cleaner on a variable which will allow user input.)
So if my first question was:
$question1="What is your name?";
$explain1="Please enter your name here";
Neither of those have to be passed through vb input cleaner.
-only the $answer1 since it takes user input.
I clean everything... even radio boxes that you think would only be a Yes or No,
just in case a hacker tries to manipulate any input variables.

You cannot use the same variable twice or it is overwritten resulting in possible errors.
So you cannot do:
$question1="What is your name?";
$question1="How old are you?";
This is basic variable handling as you are redeclaring the var resulting in it being overwritten.
If you are trying to use the default form as reference as you make a custom form,
the script is being executed ,corrupting default variables if you are not assigning your own.
So I recommend disabling the default form if you make custom.

After all your variables are assigned properly within the plugin, you then edit the form template
to your liking which takes basic vbulletin template handling.

And also do the same with the output template (answer template) which will be the
template that posts to your thread or post.
Both templates have to use the same variables as you stated in the form plugin.

The easiest way I have found is to write down my questions and answers on paper
or in editor so that I have a basic set.
Then, I go through and create the variables, place them in the order I want in the templates,
and everything should work.

It takes a bit of a learning curve but well worth it.
Maybe someday, the Form Hack will be enhanced to set up the form from adminCP area.
Reply With Quote
  #1269  
Old 30 Sep 2008, 12:54
swisscotton swisscotton is offline
 
Join Date: Apr 2008
I dont know what you mean by "cleaning" I am new to VB and I haven't a clue about PHP but this forum is an importent part of my forum.

This is how it is set up so far:

// Part 1
$vbulletin->input->clean_array_gpc('p', array(
'$answer1' => TYPE_STR,
'$vbtextexplain' => TYPE_STR,
));

// Part 2
$answer1 = $vbulletin->GPC['normalanswer1'];
$longanswer1 = $vbulletin->GPC['longanswer1'];

//QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question1 = "What is the Rabbits Name?";
$explain1 = "Please enter your real name here.";

//QUESTION 2 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question2 = "What breed is the Rabbit?";
$explain2 = "Please enter your real name here.";

//QUESTION 3 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question3 = "Is the rabbit spayed or neutered?";
$explain3 = "Please enter your real name here.";

//QUESTION 4 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question4 = "How old is the Rabbit?";
$explain4 = "Please enter your real name here.";

//QUESTION 5 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question5 = "What colour is the rabbit?";
$explain5 = "Please enter your real name here.";

//QUESTION 6 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text)
$question6 = "Bonded or Single Rabbit?";
$explain6 = "Please enter your real name here.";

$vbtextquestion = "Information & Photos";
$vbtextexplain = "Please write more information about the rabbit, such as its background, how you managed to save him or her, the rabbit’s personality, and what the ideal home would be for this rabbit. Also post photos of the rabbit.";
The '$vbtextexplain' => TYPE_STR, (text area) works find its just the normal answers that don't.

I a run an animal welfare forum and this form will be used for animals needing homes and to let me know details about the animal so I can put those details onto the site.

Last edited by swisscotton; 30 Sep 2008 at 13:01.
Reply With Quote
  #1270  
Old 30 Sep 2008, 14:20
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
Part 1 and Part 2 need to have the same variables which rely on any questions asked.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by Bilderback; 30 Sep 2008 at 14:21. Reason: typo
Reply With Quote
  #1271  
Old 06 Oct 2008, 21:56
life is boost life is boost is offline
 
Join Date: Jan 2002
Hello everyone. i have done all of the edits but still cannot get the attachments to show. It is enabled. i am posting to a forum, i have tried default forms and everything but still no attachments. I even removd the if statement so it just says.

$attachmentoption

any help is appreciated
Reply With Quote
  #1272  
Old 16 Oct 2008, 19:53
a33 a33 is offline
 
Join Date: Mar 2007
I am trying to get this to work..
I keep getting this problem below when i submit the form....... so i uninstalled and started again without making any changes.
I have only changed the forum to post in...

The error is
Warning: Cannot use a scalar value as an array in [path]/includes/functions_newpost.php on line 370
What have i done wrong ?

Line 370 is
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by a33; 17 Oct 2008 at 09:13.
Reply With Quote
  #1273  
Old 17 Oct 2008, 21:00
fodvapor fodvapor is offline
 
Join Date: Dec 2007
Does this also work with 3.7.3 ???
Reply With Quote
  #1274  
Old 17 Oct 2008, 22:28
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
Originally Posted by a33 View Post
I am trying to get this to work..
I keep getting this problem below when i submit the form....... so i uninstalled and started again without making any changes.
I have only changed the forum to post in...

The error is


What have i done wrong ?

Line 370 is
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Don't hold me to this BUT you might have an option in the usergroup that's trying to use the form set to where they cannot create OR can create polls and it's conflicting maybe?

You can open the files up and view the contents to remove or add in what you like, additionally if you keep searching there is a similar yet different hack like this HOWEVER more easily customizable... I believe it is listed as a recruitment hack etc and was originally intended for a Guild or WOW forum however the way they made it leaves the person more options for tweaking and has informaton on how to do it all!

If I find the link while browsing I'll edit this post

EDIT: Here it is! --> Click Here <-- ** It seems more complicated when you first view that page w/ all the code snippets BUT it is not and you can tailor it to your needs very easily!

Remember not to always download the first mod you go WOW over as there could be one more to your liking or need if you keep looking!

S-MAN
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!
Reply With Quote
  #1275  
Old 17 Oct 2008, 22:35
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Real name: Jan
Originally Posted by fodvapor View Post
Does this also work with 3.7.3 ???
Yes.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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

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


New To Site? Need Help?

All times are GMT. The time now is 00:35.

Layout Options | Width: Wide Color: