Hi, amydpnw,
Yes, this is possible. You could use the gform_field_value_$parameter_name" hook (http://www.gravityhelp.com/documentation/page/Gform_field_value_$parameter_name). In that hook you can query the database to get the entry ids (lead_ids) for the records which match the time range you specify and populate a drop down with the data. The query would be something similar to:
select lead1.lead_id
from wp_rg_lead_detail lead1 join wp_rg_lead_detail lead2 on lead1.lead_id = lead2.lead_id and lead1.form_id=lead2.form_id
where lead1.form_id=43 and lead1.field_number = 1 and lead1.value >= '2011-01-30'
and lead2.field_number=2 and lead2.value <= '2012-02-09'
Once you have the matching lead_ids, you can then query the data to get the first name/last name of the users belonging to those entries (lead_ids). You can use something like this:
select lead1.lead_id, lead1.value as first_name, lead2.value as last_name
from wp_rg_lead_detail lead1 join wp_rg_lead_detail lead2 on lead1.lead_id = lead2.lead_id
where lead1.lead_id in (324,325) and (cast(lead1.field_number as decimal) = cast(3.3 as decimal) and cast(lead2.field_number as decimal) = cast(3.6 as decimal))
You then use that data to populate the drop down.
I hope this points you in the right direction.
Posted 12 years ago on Monday February 6, 2012 |
Permalink