can we force people to ask question only in some category?
Is that possible?
Tagged:
0
Answers
in the QnA js file you can see that it does this when you click one of the buttons to decide if you want to post a discussion or ask a question:
$('input:radio[value='+$this.attr('rel')+']').attr('checked', 'checked');
This should work if you place it in the qna.js file
$('#Form_CategoryID').change(function(){ var cat = $(this).find('option:selected').text().replace(/[^a-zA-Z0-9]/,''); switch(cat){ case 'Help': case 'Support': case 'IAskQuestionsHere': $('input:radio[value=Question]').attr('checked', 'checked'); break; default: $('input:radio[value=Discussion]').attr('checked', 'checked'); break; }; });
Note: In my forum I removed the |-> arrows on my dropdowns so for sanity sake when I get the string of the category I remove everything but letters and numbers. @!%!Show_Case becomes ShowCase in the case statement.
Whereabouts in the qna.js do I drop the example above? I've tried outside of the jQuery section, inside the last }); and the second to last. Also the values of my drop down menu are numeric. Do I refer to this numeric value or the actual category name?
Many thanks,