The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Form Hack Details »» | |||||||||||||||||||||||||
Form Hack 4.1 Features: Ever wanted an online form that a user can fill out, which when submitted gets:
Or any combination or all of the above? Well, this is the hack for you! You can use this for:
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:
This is customizable via the hook. Also:
INSTALLATION Easy - takes only a few minutes:
Done! Use this hack to make as many forms as you like! Enjoy! Updates: Version 4.0: (09/15/2006)
Version 4.1: (04/24/2008)
MAKE SURE YOU CLICK INSTALL! You will get an email when a new version is released. Abe1 with rights from Dr Erwin Loh Supporters / CoAuthors Show Your Support
|
Comments |
#402
|
||||
|
||||
Quote:
Next goto MAIN Template and adddddddd that new dropdown there also...>>> Use your own code or template code to add... 3 dropdowns below in code HTML Code:
<TABLE width="100%"><TR> <TD class="radio_button_question question" colspan="4"> <B>* </B> $dropdownquestion4 </TD> </TR> <TR><TD class="radio_button_answer" ><table cellspacing="0" cellpadding="0"><tr><td class="radio_button_answer"> <!--DROP_DOWN_TYPE --><select name="dropdownanswer4" class="radio_button"> <option value="$dropdownchoice4a" <if condition="$dropdownchoice4a == $dropdownanswer4">selected="selected"</if>>$dropdownchoice4a</option> <option value="$dropdownchoice4b" <if condition="$dropdownchoice3b == $dropdownanswer4">selected="selected"</if>>$dropdownchoice4b</option> <option value="$dropdownchoice4c" <if condition="$dropdownchoice4c == $dropdownanswer4">selected="selected"</if>>$dropdownchoice4c</option> </SELECT> </td></tr></table></TD></TR></TABLE> <p></p> <div align="center"> <tr> <td class="alt2" valign="middle" colspan="3"> <b>$vbtextquestion</b><br /> $vbtextexplain <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> $messagearea </td> </tr> </table> </div> </td> </tr> <if condition="$attachmentoption"> <tr> <td class="alt1" colspan="3" align="center"> <div style="width:$stylevar[formwidth]" align="$stylevar[left]">$attachmentoption</div> </td> </tr> </if> <tr> <td valign="top" colspan="3"> <p align="center"> <input type="submit" value="Submit" name="submit" style="font-family: Verdana; font-size: 10pt" class="button" /> <input type="submit" value="Preview" name="submit" style="font-family: Verdana; font-size: 10pt" class="button" /> <input type="reset" value="Reset" name="reset" style="font-family: Verdana; font-size: 10pt" class="button" /> </p></td></tr> </table> </form> $footer </body> </html> |
#403
|
||||
|
||||
Quote:
Add to proper location... 'dropdownanswer4' => TYPE_STR, $dropdownanswer4 = $vbulletin->GPC['dropdownanswer4]; HTML Code:
// Part 1 $vbulletin->input->clean_array_gpc('p', array( 'answer1' => TYPE_STR, 'answer2' => TYPE_STR, 'radioanswer1' => TYPE_STR, 'radioanswer2' => TYPE_STR, 'radioanswer3' => TYPE_STR, 'radioanswer4' => TYPE_STR, 'radioanswer5' => TYPE_STR, 'radioanswer6' => TYPE_STR, 'radioanswer7' => TYPE_STR, 'dropdownanswer1' => TYPE_STR, 'dropdownanswer2' => TYPE_STR, 'answer3' => TYPE_STR, 'radioanswer8' => TYPE_STR, 'radioanswer9' => TYPE_STR, 'radioanswer10' => TYPE_STR, 'radioanswer11' => TYPE_STR, 'answer4' => TYPE_STR, 'dropdownanswer1' => TYPE_STR, 'answer5' => TYPE_STR, 'answer6' => TYPE_STR, )); // Part 2 $answer1 = $vbulletin->GPC['answer1']; $answer2 = $vbulletin->GPC['answer2']; $radioanswer1 = $vbulletin->GPC['radioanswer1']; $radioanswer2 = $vbulletin->GPC['radioanswer2']; $radioanswer3 = $vbulletin->GPC['radioanswer3']; $radioanswer4 = $vbulletin->GPC['radioanswer4']; $radioanswer5 = $vbulletin->GPC['radioanswer5']; $radioanswer6 = $vbulletin->GPC['radioanswer6']; $radioanswer7 = $vbulletin->GPC['radioanswer7']; $dropdownanswer1 = $vbulletin->GPC['dropdownanswer1']; $dropdownanswer2 = $vbulletin->GPC['dropdownanswer2']; $answer3 = $vbulletin->GPC['answer3']; $radioanswer8 = $vbulletin->GPC['radioanswer8']; $radioanswer9 = $vbulletin->GPC['radioanswer9']; $radioanswer10 = $vbulletin->GPC['radioanswer10']; $radioanswer11 = $vbulletin->GPC['radioanswer11']; $answer4 = $vbulletin->GPC['answer4']; $dropdownanswer3 = $vbulletin->GPC['dropdownanswer3']; $answer5 = $vbulletin->GPC['answer5']; $answer6 = $vbulletin->GPC['answer6']; Lower Plugin code area...> questions...> HTML Code:
//////////////////////////////////////////////////////////////////////////////////////////////////// //DROP DOWN CHOICES : QUESTION 4 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text) //////////////////////////////////////////////////////////////////////////////////////////////////// $dropdownquestion4 = "Which forum to post to question here...<<<"; // The following choices must NOT have quotation marks $dropdownchoice4a = "MLB"; $dropdownchoice4b = "NFL"; $dropdownchoice4c = "NBA"; //////////////////////////////////////////////////////////////////////////////////////////////////// Good Luck |
#404
|
|||
|
|||
Thanks a lot for taking the time to explain that Deepdog009, but I don't think it answers my question (if it does, then I don't understand it).
For example, say you wanted a form to post news in your forum. There are 3 different forums which represent the catergories the for news. They are Sport, Weather and Other - each of which are different forums. Basically, depending on what you select in the drop down box will determine which forum the news is posted in to. I hope that makes more sense. |
#405
|
||||
|
||||
RayW what you be asking requires some code modifications. Im good with CSS and HTML but at this time Im still reading and learning on PHP, Perl and Java.
ABE1 can help you better. Take a peek in the earlier posts and maybe theres something there that might help U. Good Luck |
#406
|
|||
|
|||
No worries, thanks a lot.
Cheers! |
#407
|
|||
|
|||
Ok, I've been trying to nut this out based on what others have posted in the thread.
Basically, I want a drop down box which defines what forum the news will be posted too. I have the following: Code:
//FORUM TO POST NEW THREAD IN //You CAN make this number a variable. You can have a drop down menu or in the link like do=form&f=1. Make sure you add it the variables list. if ($dropdownanswer1 == 'Hardware'){ $formforumid = "96";} if ($dropdownanswer1 == 'Software'){ $formforumid = "99";} Code:
//////////////////////////////////////////////////////////////////////////////////////////////////// //DROP DOWN CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text) //////////////////////////////////////////////////////////////////////////////////////////////////// // The following choices must NOT have quotation marks $newscatchoice1a = "Hardware"; $newscatchoice1b = "Software"; Code:
<select name="dropdownanswer1"> <option value="$newscatchoice1a" <if condition="$newscatchoice1a == $dropdownanswer1">selected="selected"</if>>$newscatchoice1a</option> <option value="$newscatchoice1b" <if condition="$newscatchoice1b == $dropdownanswer1">selected="selected"</if>>$newscatchoice1b</option> </select> Could someone offer some advice. I'm assuming the problem lies in the above somewhere; maybe!! THanks! |
#408
|
|||
|
|||
HEY!!!! I figured it out. I just noticed that <select name="dropdownforum1"> should be <select name="dropdownanswer1">.
I will post the finished product once I have fine tuned it. EDIT: I've updated the code above so it should work fine now. |
#409
|
||||
|
||||
U da Man RayW:up:
Yes please post your outcome when finished. If statements seem easy until you place them. But eventually hard work and patience will prevail. Cya |
#410
|
|||
|
|||
Hey guys, maybe I missed it, I also ran a search. Is there way to set this up so you can select a post icon, and not have it be blank when it posts the topic? I was trying to figure out a way to do it, but I kept breaking the code. Any ideas would be great. Thanks!
|
#411
|
|||
|
|||
I'm looking for some guidance in formatting the answer template so that I can control the way the finished post looks. Is there any way to use conditionals in the answer template?
For example I have $question1 $checkboxAnswer1_1 $checkboxAnswer1_2 $checkboxAnswer1_3 If only the first checkbox is selected on the form then the $checkboxAnswer1_2 and $checkboxAnswer1_3 put spaces in the final post. I'd like to do something like if ($checkboxAnswer1_2==""){ echo ""; } That way I can eliminate the spaces? Any ideas? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|