ardian
asked 7 years ago

I dont need email or user registration, basically every user can add answers. 

1 Answers
DominicStaff
answered 7 years ago

In this case, you can add username & email default when anonymous submit a question, you can open the question-submit-form.php file in the templates folder of the plugin then find the line 61 to line 72 and replace with the following code:

<?php if ( dwqa_current_user_can( 'post_question' ) && !is_user_logged_in() ) : ?>
<p>
<label for="_dwqa_anonymous_email"><?php _e( 'Your Email(You cannot edit me.)', 'dwqa' ) ?></label>
<?php $email = isset( $_POST['_dwqa_anonymous_email'] ) ? $_POST['_dwqa_anonymous_email'] : ''; ?>
<input type="email" class="dwqa-question-anonymous-email" name="_dwqa_anonymous_email" value="[email protected]" readonly>
</p>
<p>
<label for="_dwqa_anonymous_name"><?php _e( 'Your Name(You cannot edit me.)', 'dwqa' ) ?></label>
<?php $name = isset( $_POST['_dwqa_anonymous_name'] ) ? $_POST['_dwqa_anonymous_name'] : ''; ?>
<input type="text" class="dwqa-question-anonymous-name" name="_dwqa_anonymous_name" value="Anonymous" readonly >
</p>
<?php endif; ?>
Powered by DW Question & Answer Pro