Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
417 views
in Q2A Core by
edited by
I know it was asked before but I could not get the right answer.

I like to add an additional textfield to answer form which will be recorded to data base together with content field.

I manage to add an addtitonal field by playing "function qa_page_q_add_a_form" function in question-view.php

I duplicated the following code as content_2

ORIGINAL CODE

------------------------------------------------

'content' => array_merge(

qa_editor_load_field($editor, $qa_content, @$in['content'], @$in['format'], 'a_content', 12, $formrequested, $loadnow),

array(

'error' => qa_html(@$errors['content']),

)

),

------------------------

I added these lines

-------------------------

'content_2' => array_merge(

qa_editor_load_field($editor, $qa_content, @$in['content_2'], @$in['format'], 'a_content_2, 12, $formrequested, $loadnow),

array(

'error' => qa_html(@$errors['content_2']),

)

),

-----------------

It has added an additional field but It is not recording to database and even not checking char lenght etc.

Do you have any idea how to add an additional text field which will be recorded to db?
Q2A version: 1.7
by
Hello did you find the answer to this problem?

Please log in or register to answer this question.

...