Title: Other option issue
Last modified: August 21, 2016

---

# Other option issue

 *  Resolved [wolfang8](https://wordpress.org/support/users/wolfang8/)
 * (@wolfang8)
 * [12 years ago](https://wordpress.org/support/topic/other-option-issue/)
 * Hi, thanks for great plugin. I have run into an issue. I allowed “Other” answers.
   When someone input same words in other field, it creates another new one.
    For
   example.
 * ===============================
    Who is the best fighter?
 * 1. Ryu
    2. Ken 3. Guile 4. Chun Li 5. Blanka Other ==========================
   =====
 * If someone input Ryu in other field then another Ryu is created even though it
   is exactly same letters. Plus, the new one which is created with this way does
   not show on the list in option page. So I even can not remove it. Are there any
   solutions?
 * [https://wordpress.org/plugins/yop-poll/](https://wordpress.org/plugins/yop-poll/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [YOP](https://wordpress.org/support/users/yourownprogrammer/)
 * (@yourownprogrammer)
 * [12 years ago](https://wordpress.org/support/topic/other-option-issue/#post-5159566)
 * Hi wolfang8,
 * Edit your poll and in Answers Advanced Options set “Add the values submitted 
   in “Other” as answers:” to No and save.
 * Let us know if you need more help.
 * Best wishes,
 * YOP Team
 *  Thread Starter [wolfang8](https://wordpress.org/support/users/wolfang8/)
 * (@wolfang8)
 * [12 years ago](https://wordpress.org/support/topic/other-option-issue/#post-5159608)
 * Thanks for reply. I have a question. I applied what you mentioned and other answer
   did not work anymore. Then it means “Other Anwer Option” is useless (I am sorry,
   but it’s not offensive. I am just confused). Correct? Or do you have plan to 
   fix it in next update?
 *  Plugin Author [YOP](https://wordpress.org/support/users/yourownprogrammer/)
 * (@yourownprogrammer)
 * [12 years ago](https://wordpress.org/support/topic/other-option-issue/#post-5159672)
 * Hey wolfang8,
 * Sorry, we thing we misunderstood your request. If you want to prevent duplicate
   answers in “Other” from being added to the list please make these changes: edit
   yop_poll_model and in register_vote function, specifically in
 * `if ( '' != strip_tags( trim( $request['yop_poll_other_answer'] ) ) ){`
 *  add
 *     ```
       $ans = self::yop_poll_get_answer_from_db($poll_id);
                                                                  foreach($ans as $a){
   
                                                                      if(strtoupper (strip_tags( $request['yop_poll_other_answer'] ))==strtoupper( $a['answer'])) {
                                                                          $this->error = __( 'the error message you want!', 'yop_poll' );
                                                                          return false;
                                                                      }
       ```
   
 * Next, in the same file, yop_poll_model add
 *     ```
       public function yop_poll_get_answer_from_db($id) {
                   global $wpdb;
                   $answer = $wpdb->get_results( $wpdb->prepare( "
            SELECT *
            FROM " . $wpdb->yop_poll_answers . "
            WHERE poll_id = %d
            ",$id ), ARRAY_A );
                   return $answer;
   
               }
       ```
   
 * Regards,
 * YOP Team
 *  Thread Starter [wolfang8](https://wordpress.org/support/users/wolfang8/)
 * (@wolfang8)
 * [12 years ago](https://wordpress.org/support/topic/other-option-issue/#post-5159694)
 * Should the codes go in the plugin edit option? Sorry, I am a beginner of codes.
 *  Plugin Author [YOP](https://wordpress.org/support/users/yourownprogrammer/)
 * (@yourownprogrammer)
 * [12 years ago](https://wordpress.org/support/topic/other-option-issue/#post-5159696)
 * Hey wolfang8,
 * From your WordPress menu, go to Installed Plugins, locate YOP Poll plugin and
   click on Edit.
 * Once you do that, on the right hand side you will see a list of Plugin Files.
   Find yop-poll/inc/yop_poll_model.php and click on it then follow the instructions
   we provided in our previous reply.
 * If you still have difficulties please email us at yop.help{at]gmail.com with 
   your wp login and we will make the necessary changes.
 * Best wishes,
 * YOP Team
 *  Thread Starter [wolfang8](https://wordpress.org/support/users/wolfang8/)
 * (@wolfang8)
 * [12 years ago](https://wordpress.org/support/topic/other-option-issue/#post-5159721)
 * Hi, I will try it later and will let you know the result. Thanks a lot for your
   support.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Other option issue’ is closed to new replies.

 * ![](https://ps.w.org/yop-poll/assets/icon-256x256.png?rev=3524390)
 * [YOP Poll](https://wordpress.org/plugins/yop-poll/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yop-poll/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yop-poll/)
 * [Active Topics](https://wordpress.org/support/plugin/yop-poll/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yop-poll/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yop-poll/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [wolfang8](https://wordpress.org/support/users/wolfang8/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/other-option-issue/#post-5159721)
 * Status: resolved