
08-16-2010, 03:46 PM
|
|
|
Join Date: Oct 2007
Location: UK
Posts: 2,802
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by redraider
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:
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:
PHP Code:
$forumid = $form['forumid'] = $qo['forumid'];
|