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.
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.
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.
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.