How to remove a specific text in the input value (wordpress)?

Solution:

You can use the val function to get the current value of the input field and use it again to apply the modified value without the “Private: ” string. Example below.

 

jQuery('.dwqa-content-edit-form p input[type=text]').each(function() {
        console.log($(this).val());
        var value = $(this).val().replace("Private: ", '');
        $(this).val(value);
 });
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

<form method="post" class="dwqa-content-edit-form">
     <p>
          <input type="text" name="question_title" value="Private: about your question" tabindex="1">
     </p>
</form>