MyBB Community Forums

Full Version: [Solved] Select checked - first main forum, after subforum.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I'm trying to do select checked.
First select: Main forum.
Second select: Sub Forum.

It can be somehow download from the column 'parentlist' in *_forums?

Forums are taken, only now to use it properly.
Then use eg.

Or I should operate on other columns? PID / FID?
Not sure what your requirement is. If you want to generate a select box with forums, why not simply use build_forum_jump() with $showextras = 0?
Well it...
I'd like get the effect , ok, I added this script, however afred selected category (main forum) does not display subforum assigned to it.
if(in_array($forum['pid'], $exp)) 
				$forumsOptionChild .= '<option value="' . $subforums[$forum['fid']] . '" selected="selected">--' . $forum['name'] . '</option>';
				eval('$subforums[$forum["pid"]] .= "'.$templates->get('dld_add_subforums').'";'); //niekoniecznie szablon
					$forumsOptionParent .= '<option value="' . $subforums[$forum['pid']] . '" selected="selected">' . $forum['name'] . '</option>';
			$formularz = '<select id="mark" name="mark">
							<option value="0">wybierz kategorię</option>
							' . $forumsOptionParent . '
							<select id="series" name="series">
							<option value="-">wybierz dział</option>
							' . $forumsOptionChild . '

So if I understand your request correctly you want the second select box to update with the list of subforums of select box 1.

Use build_forum_jump You need $pid to be the input of the user.