It looks like you're new here. If you want to get involved, click one of these buttons!
The new line is slightly different:In /views/post/discussion.php (copy it from Vanilla app into your theme if you haven't yet) find this:echo $this->Form->DropDown('CategoryID', $this->CategoryData, array('TextField' => 'Name', 'ValueField' => 'CategoryID'));And replace with:echo $this->Form->DropDown('CategoryID', $this->CategoryData, array('IncludeNull' => TRUE, 'TextField' => 'Name', 'ValueField' => 'CategoryID'));
Comments
echo $this->Form->CategoryDropDown('CategoryID', array('IncludeNull' => TRUE, 'Value' => GetValue('CategoryID', $this->Category)));Vanilla co-founder
thanks for your quick reply.
I edited the line to the one you suggested, but it doesn't seem to have any effect.
Previously, the category box was empty, and the user couldn't post until they had explicitly chosen a category.
Thanks.
Vanilla co-founder
No worries.
It was useful because it stopped users leaving the category on the default one.
They'll just have to get used to changing it!
Thanks.
Update, in case this gets found by a search in the future...
Just discovered that the code Todd supplied works provided that the Categories option is NOT set to 'Display root categories as headings.'