Dom Amor
asked 11 years ago

Hi, is there a way to limit the question title length ?. Reason I ask is because I’ve had many users ask their question just using the title. Also I’ve noticed the question “text box” really doesn’t have sides to it. Meaning the box I’m writing this in. Trying to locate the css for that hasn’t been fun. 

4 Answers
DominicStaff
answered 11 years ago

Good point Dom.
We face the same issue sometimes. Will discuss and see if we can make it as a new feature for the plugin or not 🙂
 

Dom Amor
answered 11 years ago

I played around around a bit with this because it was becoming a big issue on my site. I changed a few things around and thought I would share what I did and how I did it to limit how the question title to a min.  I changed template-functions.php from line 269 to     

<div class="input-title">  
 <label for="question-title"><?php _e('Your question.','dwqa') ?> This is just the title of your question</label>  
 <input type="text" name="question-title" id="question-title" placeholder="<?php _e('Question Title. Limit to 75 characters','dwqa') ?>" autocomplete="off" data-nonce="<?php echo wp_create_nonce( '_dwqa_filter_nonce' ) ?>" maxlength="75" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>  
 <script src="../wp-content/plugins/dw-question-answer/assets/js/jquery.maxlength.js"></script>  
 <script src="../wp-content/plugins/dw-question-answer/assets/js/main.js"></script> <span class="dwqa-search-loading hide"></span>  
 <span class="dwqa-search-clear icon-remove hide"></span>  
 </div>  

and included two js files to the DW-questions js directory  I’ve zipped the entire template-functions.php and the two js files needed here if you would like them.To see a demo on my test site If you like it send me money, LOL just kidding enjoy. Hey did someone say BACKUP. 

DominicStaff
answered 11 years ago

Hi Dom !
Thank  for your suggestion in our products. I appreciate it. 🙂

Dom Amor
answered 11 years ago

Sure thing. Ever since I got this to work I haven’t had a single issue. 

Powered by DW Question & Answer Pro