• Resolved MarionFW

    (@marionfw)


    I just left a 5 star rating: the problem I encountered some time ago are resolved.

    I have one feature request for a future release: would it be possible to limit the number of characters a voter may use to give his own option on a poll? That would prevent input that is too long. Especially for a widget, one would like short options.

Viewing 1 replies (of 1 total)
  • Plugin Author Timur Kamaev

    (@tkama)

    hmmmm, seams to good idea…

    For Noe you can do it throught

    
    apply_filters('dem_sanitize_answer_data', $data, $filter_type );
    

    filter. Like this:

    
    add_filter('dem_sanitize_answer_data', function($data, $filter_type){
        if( $filter_type === 'democratic_answer' ){
            $data = substr( $data, 0, 100 ); // cut more then 100 symbols
        }
        return $data;
    }, 10, 2 );
    
    • This reply was modified 7 years, 9 months ago by Timur Kamaev.
    • This reply was modified 7 years, 9 months ago by Timur Kamaev.
Viewing 1 replies (of 1 total)
  • The topic ‘max length input voters?’ is closed to new replies.