Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
365 views
in Q2A Core by
Hello,

I want to change form/field orders on 'Ask a Question' page. More specifically, I want to move category field to top, and 'The question in one sentence;' form next.
I couldn't find the file which defines the order. Please let me know where I should look at.

Thanks
Q2A version: Latest

1 Answer

+1 vote
by

The definition of the category field is at qa-include/pages/ask.php

You can follow these steps to change the fields order without core hacks:

  1. Create a plugin
  2. Add a layer to it
  3. Override the method that renders the form, such as form_body($form)
  4. Change the fields order
  5. Call the parent method

It goes without saying you should also add validations.

...