How I can set the conditions when to display the widget?