The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How do I handle form input from a widget?
Hello there,
Let's say I want to write a widget that contains a trivia question. I don't have a problem creating the form in the widget with PHP. I have a multiple choice question and the user selects "A" (the first option) and submits the form. I understand that in my form action I need to specify a handler. What I've done to test my widget is to handle the form in another PHP page, that's pretty straight-forward. The problem is that the action is being handled by a page that isn't a vBulletin page so the output from my PHP page is plain. No nice vBulletin-looking page. How should I handle the form input? Is there a vBulletin page that I need to use in my action instead of my vanilla PHP page? Any help is appreciated. Thanks in advance. |
#2
|
|||
|
|||
I found the answer here:
Why that post isn't a sticky I'll never know. Anyone who wants to do any sort of customization is going to need that post in a big way. The long and the short of it is that you create a php file that will process the form and assign to a variable whatever html you have generated. Once you register the variable you will be able to access it from a custom template which you will need to write as well. Anyways, follow the post and you'll be alright. I might make a YouTube video on how to do it. -fab |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|