/** * @inheritDoc * * @since 1.8 */ public function pre_render_frontend() { if (!class_exists('GFPolls')) { $return = false; do_action('gravityview_log_error', 'Poll Widget not displayed; the Poll Addon is not loaded'); } else { $return = parent::pre_render_frontend(); $poll_fields = GFCommon::get_fields_by_type(GravityView_View::getInstance()->getForm(), array('poll')); if (empty($poll_fields)) { do_action('gravityview_log_error', 'Poll Widget not displayed; there are no poll fields for the form'); $return = false; } } return $return; }