Search across multiple forms?

Hello all - seeking a way to search across multiple forms. We have 5 applications users fill out and upon submission they’re assigned a unique ID comprised partially of Entry ID. We’d like be able to enter their ID and have it search those forms for matching Entry ID and return entry.

I’ve used Gravity Wiz to create Views pulling from multiple forms with joins, but those forms have like/related records in which to create the joins. With these forms, I don’t have related records.

Hope this makes sense. Any insights appreciated.

I’m assuming the field that the unique ID is stored across each form is different?

You “could” use GFAPI and loop per form to do the lookup (search criteria per form) basically, but that won’t be a very performant and require changes with every new form you create.

If you use gform_add_meta within a gform_after_submission to store the unique ID field value into a common meta field across all forms, that would make your GFAPI search much easier.

You might also look at gform_form_settings_fields to define a setting that provides a dropdown of the fields on the form. That would allow new forms to define what field should be read from in the gform_after_submission filter instead of updating the code snippet with a new form ID / field ID combo.

Cheers,
Jamie

Thanks Jamie - I’ll look into those approaches.

The unique ID is literally Entry ID in each form. We use merge tags to add prefixes and suffixes to the ID at times, but the Entry ID is primarily how we identify user submissions.

Also check out GravityView with the Multiple Forms extension.

Hello there!

I’m afraid that’s currently not yet possible with GravityView and Multiple Forms: Multiple Forms: Unions are not supported - GravityKit Support, Knowledge Base, How-To & Docs

We hope to introduce this functionality soon.

What’s possible at this moment is creating a View for each one of your forms, and then you will need to embed all these Views into the same page. Each View must have a Search Bar added to it: Configuring the Search Bar - GravityKit Support, Knowledge Base, How-To & Docs

Once you perform a search in one of these Views, the search will be performed in all the other ones automatically. You can leave only one Search Bar visible and hide all others using CSS. That’s the only way, at the moment, to achieve a multi-form search.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.