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 |
#462
|
||||
|
||||
Quote:
ComputerVitals take a look C at this post... https://vborg.vbsupport.ru/showpost....&postcount=409 |
#463
|
|||
|
|||
Quote:
Thanks Deepdog009 & rayw Tweaked that for the radio buttons and now it work just like it did before.. Now to add your image verification to it!! |
#464
|
||||
|
||||
Quote:
ComputerVitals i released a Forms Pack *** add-on that helps with Java Calendar pop-up window 2 help with events. BBcode smileys add-on 2 help with answer template look and feel. Posticons & Subtitle add-on 2 help with posting topic image. ABE1 Form Hack takes all credit and hopefully add these to his hack... Good Luck |
#465
|
|||
|
|||
A little tweaking.
When you enable the: $answerall = "1"; The error message will display if you dont fill it out. Is there a way to add a text link for a "go back" instead of the user hitting the browser back button? If not i'll just change the words to tell them to hit the back button. |
#466
|
|||
|
|||
I'm getting this error when I click the submit button:
Error: 'vB-Editor_.vB_Editor_001' is null or not an object It has the yellow exclamation in the lower left of the browser when submitting. On reference to vb_editor in the hack I have found was in the form template. Code:
<form name="vbform" action="newthread.php" method="post"<if condition="!is_browser('webtv')"> onsubmit="return vB_Editor['$editorid'].prepare_submit(0, $vboptions[postminchars])"</if>>
|
#467
|
||||
|
||||
Hi, I haven't found this problem searching this thread so here goes...did the edits, made sure part 1 and 2, had all working until I finished..now I get this error:
Parse error: parse error, unexpected '}' in /home/www/ticketdoctor/forums/newthread.php(71) : eval()'d code on line 608 My code is: Code:
// ####################################################################### // ######################## CUSTOMIZE VARIABLES ########################## // ####################################################################### //////////////////////////////////////////////////////////////////////////////////////////////////// ////// BEGIN CUSTOMIZATION BELOW//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //VARIABLES //Study how variables are add here to add or remove any. If you add a variable to your form, you must add it to part one and part two. //////////////////////////////////////////////////////////////////////////////////////////////////// // Part 1 $vbulletin->input->clean_array_gpc('p', array( 'FirstNameAnswer' => TYPE_STR, 'LastNameAnswer' => TYPE_STR, 'AddressAnswer' => TYPE_STR, 'CityAnswer' => TYPE_STR, 'StateAnswer' => TYPE_STR, 'ZipcodeAnswer' => TYPE_STR, 'DOBAnswer' => TYPE_STR, 'PrimaryPhoneNumberAnswer' => TYPE_STR, 'SecondaryPhoneNumberAnswer' => TYPE_STR, 'ValidLicenseAnswer' => TYPE_STR, 'NotValidLicenseAnswer' => TYPE_STR, 'EmailAddressAnswer' => TYPE_STR, 'NewsletterSignupAnswer' => TYPE_STR, 'LicenseNumberAnswer' => TYPE_STR, 'AccidentInvolvedAnswer' => TYPE_STR, 'CriminalRecordAnswer' => TYPE_STR, 'OneTicketOnStopAnswer' => TYPE_STR, 'TicketNumberAnswer' => TYPE_STR, 'Charges1Answer' => TYPE_STR, 'Charges2Answer' => TYPE_STR, 'Charges3Answer' => TYPE_STR, 'Charges4Answer' => TYPE_STR, 'ViolationCode1Answer' => TYPE_STR, 'ViolationCode2Answer' => TYPE_STR, 'ViolationCode3Answer' => TYPE_STR, 'ViolationCode4Answer' => TYPE_STR, 'CourtToAppearInAnswer' => TYPE_STR, 'AppearanceDateAnswer' => TYPE_STR, 'AppearanceTimeAnswer' => TYPE_STR, 'HowHeardAboutUsAnswer' => TYPE_STR )); // Part 2 $FirstNameAnswer = $vbulletin->GPC['FirstNameAnswer']; $LastNameAnswer = $vbulletin->GPC['LastNameAnswer']; $AddressAnswer = $vbulletin->GPC['AddressAnswer']; $CityAnswer = $vbulletin->GPC['CityAnswer']; $StateAnswer = $vbulletin->GPC['StateAnswer']; $ZipcodeAnswer = $vbulletin->GPC['ZipcodeAnswer']; $DOBAnswer = $vbulletin->GPC['DOBAnswer']; $PrimaryPhoneNumberAnswer = $vbulletin->GPC['PrimaryPhoneNumberAnswer']; $SecondaryPhoneNumberAnswer = $vbulletin->GPC['SecondaryPhoneNumberAnswer']; $ValidLicenseAnswer = $vbulletin->GPC['ValidLicenseAnswer']; $NotValidLicenseAnswer = $vbulletin->GPC['NotValidLicenseAnswer']; $EmailAddressAnswer = $vbulletin->GPC['EmailAddressAnswer']; $NewsletterSignupAnswer = $vbulletin->GPC['NewsletterSignupAnswer']; $LicenseNumberAnswer = $vbulletin->GPC['LicenseNumberAnswer']; $AccidentInvolvedAnswer = $vbulletin->GPC['AccidentInvolvedAnswer']; $CriminalRecordAnswer = $vbulletin->GPC['CriminalRecordAnswer']; $OneTicketOnStopAnswer = $vbulletin->GPC['OneTicketOnStopAnswer']; $TicketNumberAnswer = $vbulletin->GPC['TicketNumberAnswer']; $Charges1Answer = $vbulletin->GPC['Charges1Answer']; $Charges2Answer = $vbulletin->GPC['Charges2Answer']; $Charges3Answer = $vbulletin->GPC['Charges3Answer']; $Charges4Answer = $vbulletin->GPC['Charges4Answer']; $ViolationCode1Answer = $vbulletin->GPC['ViolationCode1Answer']; $ViolationCode2Answer = $vbulletin->GPC['ViolationCode2Answer']; $ViolationCode3Answer = $vbulletin->GPC['ViolationCode3Answer']; $ViolationCode4Answer = $vbulletin->GPC['ViolationCode4Answer']; $CourtToAppearInAnswer = $vbulletin->GPC['CourtToAppearInAnswer']; $AppearanceDateAnswer = $vbulletin->GPC['AppearanceDateAnswer']; $AppearanceTimeAnswer = $vbulletin->GPC['AppearanceTimeAnswer']; $HowHeardAboutUsAnswer = $vbulletin->GPC['HowHeardAboutUsAnswer']; //////////////////////////////////////////////////////////////////////////////////////////////////// //USERGROUPS ALLOWED //You can add or remove usegroups that are ALLOWED to use this form by changing the numbers below in the array. //To enable this feature, remove the '//' before the 'if'. //////////////////////////////////////////////////////////////////////////////////////////////////// // if (!in_array($vbulletin->userinfo['usergroupid'], array(2,5,6,7)))print_no_permission(); //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //NAME OF TEMPLATES - DO THIS BIT IF YOU ARE MAKING MORE FORMS AND WANT TO USE A DIFFERENT LOOKING TEMPLATE //////////////////////////////////////////////////////////////////////////////////////////////////// // Name of the main template $maintemplate = "form"; // Name of the answer template $answertemplate = "formanswers"; //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //CHOOSE WHETHER YOU WANT FORM TO BE POSTED IN A NEW THREAD, NEW POLL, REPLY TO EXISITING THREAD, PMed OR EMAILED /////////////////////////////////////////////////////////////////////////////////////////////////// //ENABLE FORM TO BE POSTED - 1 = yes, 0 = no $formforum = "0"; //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. $formforumid = "2"; //ENABLE POLL TO BE CREATED - 1 = yes, 0 = no $formpoll = "0"; $polloption[1] = "Yes"; $polloption[2] = "No"; $polloption[3] = "Maybe"; //Make poll public - 1 = yes, 0 = no $pollpublic = "0"; //////////////////////////////////////////////////////////////////////////////////////////////////// //ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no $formreply = "0"; //EXISTING THREAD ID FOR FORM TO REPLY IN $formreplythreadid = "12345"; //////////////////////////////////////////////////////////////////////////////////////////////////// //ENABLE FORM TO BE PMED (guests CANNOT use this option) - 1 = yes, 0 = no $formpm = "0"; //USERNAME TO PM TO (separate multiple usernames with a ';') $formpmname = "ticketdoctor"; //////////////////////////////////////////////////////////////////////////////////////////////////// //ENABLE FORM TO BE EMAILED - 1 = yes, 0 = no $formemail = "1"; //EMAIL ADDRESS TO EMAIL TO (separate multiple usernames with a ';') $formemailaddress = "computerguy@ticketdoctor.net"; //////////////////////////////////////////////////////////////////////////////////////////////////// //ENABLE ATTACHMENTS - 1 = yes, 0 = no //attachments can only be used if the form is going to make a new thread or post $allow_attachments = "0"; //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //REDIRECT OPTIONS: // 0 - thank you message (thread, reply, pm, or email) // 1 - redirect to post (thread or reply) // 2 - redirect to thread (thread only) // 3 - redirect to forum (thread only) // 4 - redirect to editpost (thread or reply) // // Feel free to change the thank you message if you choose option 0 //////////////////////////////////////////////////////////////////////////////////////////////////// $redirectoption = "0"; //This is the thank you message $errormessage = "Thank you for submitting your ticket! Someone from our office will contact you shortly."; //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //FORCE USER TO ANSWER ALL QUESTIONS - 1 = yes, 0 = no //If you added or deleted variables, you must edit what it checked for. Search for "$answerall ==" and edit 2 lines under it. //////////////////////////////////////////////////////////////////////////////////////////////////// $answerall = "0"; //////////////////////////////////////////////////////////////////////////////////////////////////// //TITLE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole title) //////////////////////////////////////////////////////////////////////////////////////////////////// $formtitle = "Ticket Submission Form"; //////////////////////////////////////////////////////////////////////////////////////////////////// //TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks in the title or you will get a parse error) //You may use variables from the form for this. //////////////////////////////////////////////////////////////////////////////////////////////////// $posttitle = "$formtitle"; //////////////////////////////////////////////////////////////////////////////////////////////////// //PURPOSE OF FORM (do not use quotation marks or you will get a parse error, besides the quotes around the whole text) //////////////////////////////////////////////////////////////////////////////////////////////////// $formpurpose = "Use this form to submit your ticket information. If you submit it during normal business hours we will contact you within 30 minutes."; //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //NORMAL INPUT BOX : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text) //////////////////////////////////////////////////////////////////////////////////////////////////// $FName = "First Name:"; $LName = "Last Name:"; $MAddress = "Mailing Address:"; $City = "City:"; $State = "State:"; $ZipCode = "Zip Code:"; $DOB = "Date of Birth:"; $PrimaryPhoneNumber = "What is your primary phone number?"; $SecondaryPhoneNumber = "Please provide a second phone number where we can reach you."; $ValidLicense = "Do you have a Valid NY State License?"; $EmailAddress = "Email Address:"; $LicenseNumber= "What is your 9 digit license number? (located on top of your Drivers License)."; $TicketNumber = "What is your ticket number (located in the upper left corner of ticket in bold, can be a letter-number combination:"; $Charges = "What are your charges? (Speeding, Passed Stop Sign, etc):"; $SectionSub = "What is the Section-Subsection code of your charge? (located above charge description, usually 4 digits and a letter)"; $CourtToAppearIn = "What Court do you need to appear in?:"; $AppearanceDate = "What is your appearance date?:"; $AppearanceTime = "What is your appearance time?:"; $HowHeardAboutUs = "How did you hear about us?:"; //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //RADIO BOX CHOICES : QUESTION 1 (do not use quotation marks or you will get a parse error, besides the quotes around the whole text) //////////////////////////////////////////////////////////////////////////////////////////////////// $NewsLetterSignup = "Would you like to sign up for our future Newsletter?"; // The following choices must NOT have quotation marks $NewsLetterSignupChoicea = "Yes"; $NewsletterSignupChoiceb = "No"; $AccidentInvolved = "Was there an accident involved?"; $AccidentInvolvedChoicea = "Yes"; $AccidentInvolvedChoiceb = "No"; $OneTicketOnStop = "Did you only receive this ONE ticket on THIS stop?"; $OneTicketOnStopChoicea = "Yes"; $OneTicketOnStopChoiceb = "No"; $CriminalRecord = "Do you have a criminal record?"; $CriminalRecordChoicea = "Yes"; $CriminalRecordChoiceb = "No"; //////////////////////////////////////////////////////////////////////////////////////////////////// ////// END OF CUSTOMIZATION //////////////////////////////////////////////////////////////////// any help is mucho appreciated..thanks! |
#468
|
|||
|
|||
did you modify the lower part of the hook?
If you did, look there for line 608, looks like an extra curly is there. If you need a free text editor with line numbers try winsyntax |
#469
|
||||
|
||||
I even checked it with araxis merge and found no difference other than variables..maybe it's in the template?
|
#470
|
|||
|
|||
I added an extra raido button to this form but it is showing up on the right side of the page. What do I need to do to move it back to the other side?
|
#471
|
||||
|
||||
I found out my problem, I had chopped off the little bit of code above the variables.
Samual..you need to edit the "form" template. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|