Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
352 views
in Themes by
I created a new page type that is a variation of the ask page via plugins:

    public function process_request($request)

    {

            $qa_content = qa_content_prepare();

            require_once QA_INCLUDE_DIR . 'pages/ask.php';

            return $qa_content;

     }

I've gone through the themes, for this page, instead of using an editor, I just want a regular textbox.  Is this possible?  I try to override

    public function form_fields($form, $columns) {

but coming up short

This works for me:

    public function form_fields($form, $columns) {

        if (!($this->template == "custom" && $this->request == "newqa"))

            return parent::form_fields;

if (!empty($form['fields'])) {

            foreach ($form['fields'] as $key => $field) {

$this->set_context('field_key', $key);

if ($key == "content") {

                    if ($field['type'] == "custom") {

$field['html'] = '';

                    }

}

                if (@$field['type'] == 'blank')

                    $this->form_spacer($form, $columns);

else

                    $this->form_field_rows($form, $columns, $field);

            }

            $this->clear_context('field_key');

}

but wondering if this will cause any issues?
Q2A version: latest

Please log in or register to answer this question.

...