Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
REQ: "Select a Category"
Users are complaining because I made the most private categories first in the list to prevent someone from accidentally posting something private to the most general categories. (If I'd done it the other way around, they'd complain that it was the other way around).
I'd like a topmost "Select a Category" bit of text that throws an error if they don't change it. Right now I just created a category called Select a Category, but they can still post to it, so it's sort of meaningless.
0
This discussion has been closed.
Comments
I think, this could help you...
$cs->AddOption("-1","Select a Category","");
This will add it at the top of the list. Anyways, if you try to post with this, you get a bad error msg, so one must someone find a way to use DiscussionForm_PreRender delegate to add it, and use PreSaveComment to catch it. I dont quite understand these things yet. maybe If someone drops us a hint, we can figure it out
You might want to wrap an if around it like is suggested two posts later.
I don't believe its necessary to catch the error later, the post is still preserved until a proper category is selected, unless you want something other than the standard message displayed.