Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How can I disable content field when submit or update a post?

0 votes
87 views
asked Feb 20 in Q2A Core by lipsmega
Hi guys. Id like users can submit only question and tags, without content. How can I disable content field when submit or update a post? what files I have to look?

tnks! q2a is an amazing project!
Q2A version: 1.7

1 Answer

0 votes
answered Feb 20 by pupi1985
edited Feb 20 by pupi1985

Well, Q2A is quite prepared to handle the content of the questions everywhere. So most likely you will have to hide everything by CSS if you don't want to seriously change the core:

In admin/posting set

  • Default editor for questions: Basic Editor
  • Minimum length of question body: 0

In admin/layout set

  • Custom HTML in <head> section of every page:

<style>
#content, #q_content {
    display: none;
}
</style>

Whenever a piece of text is not relevant replace it with a blank string (e.g.: "More information for the question:" is used as a title for the content field)

commented Mar 4 by pupi1985
Ok... but isn't that exactly what my suggested approach does?
commented Apr 9 by lipsmega
Yes, it is and it worked well. But it hide the answers content in moderation page too :(
...