Yuri Tommaso Refolo
asked 9 years ago

Hi all and thank you for your fantastic DWQA plugin.

I’m trying to understand if it’s possible to set the content of a question required as the title, in the "new question" page.

I’m trying to hardcode it but I thought better ask before.

Thank you in advance.

1 Answers
DominicStaff
answered 9 years ago

Hi,

For the details sections : You can see a line code about line 310:

$content = isset( $_POST['question-content'] ) ? dwqa_pre_content_filter( wp_kses( $_POST['question-content'] , $post_submit_filter ) ) : '';

below that line : add these

if ( empty( $_POST['question-content'] ) ) {
        $err_message = __( 'You need to enter question details.','dwqa' ).'<br>';
        $dwqa_current_error = new WP_Error( 'submit_question', $err_message );
        return false;
}

Hope this helps !

Powered by DW Question & Answer Pro