Feature Request: Ability to hide FormBuilder Search Forms when there are no results found
Overview
By the combined powers of SearchKit and FormBuilder, you can create Search Forms and display them on the Contact Summary Page. While you can limit the type of contact on which to display it, i.e. Organization or Individual, it is currently not possible to hide the display when there are no results returned from the SearchKit search.
Example use-case
Creating a display block on Organizations to display the "Primary Contact". If the Organization has a primary contact, then the user would want to see that displayed in the block. If they do not have a primary contact, then a user may want to hide that display altogether.
- Make a SearchKit search with the following criteria:
- Search for Contacts
- With (required) Contact Related Contacts if Relationship to contact = Primary Contact of
- Contact Type = Organization
- Make a Table display for that SearchKit and configure as desired.
- Make a Form from that display, check the Add to Contact Summary Page option, and select Organization next to the For label.
Current behaviour
Currently, it is not possible to hide the display block when there are no results found. Instead, you get a bright blue box on the Contact Summary Page that states "None found".
Proposed behaviour
There should a variety of options for users to configure how these blocks are displayed/not displayed when there are no options (such as the "no results options with Drupal Views).
For example, there could be a checkbox on the FormBuilder section that adds the display to the Contact Summary Page that gives the option to hide the display when there are no results. This type of checkbox could also be on the SearchKit display options.
Comments
This is an unfunded feature request of suggestions for UX improvements.