get_name() || $form_id != $widget->get_id() ) return $widget_content; // ElementorPro\Core\Utils::get_current_post_id() can retrieve the post_id which is 74 in my example $widget_post_id = ElementorPro\Core\Utils::get_current_post_id(); // define a maximum entries $max_entries = 3; $total_entries = get_total_submitted_entries($form_id, $widget_post_id); if( $max_entries <= $total_entries ) { return "

I am so sorry. This form reached maximum submission limit.

"; } return $widget_content; }; ?>