I'm struggling to word this in a way that makes sense, but here goes:
I'm writing some code that loops through each entry and gathers the values stored in each field. This works perfectly for anything with a single value per field - inputs, dropdowns, etc. - but is showing some strange behavior on names, addresses, and other fields where the values are stored in multiple parts.
For some reason, when I use RGFormsModel::get_field_value() on those items, only the values stored in numbers divisible by .5 are displayed. For instance, I have address data stored at 7.1, 7.2, 7.4, 7.4, 7.5, and 7.7. When I access the data, only the value stored at 7.5 comes up. I've tried several different methods of accessing the data, and the same thing happens each time.
Here's the relevant code snippet:
$leads = RGFormsModel::get_leads(1);
foreach($leads as $lead)
{
echo '<tr>';
foreach($field_ids as $field_id)
{
$value = get_field_value($field_id, $lead['id']);
if(!$value)
{
$field = RGFormsModel::get_field($form, $field_id);
$value_list = RGFormsModel::get_field_value($field);
$value = '';
foreach(array_keys($value_list) as $value_item) {
$value .= get_field_value($value_item, $lead['id']).' ';
}
}
echo '<td>'.$value.'</td>';
}
echo '</tr>';
}