Hi
In summary I want to include the title attribute in the option of my prepopulated dropdown using the gform_pre_render filter.
I am using the code provided for the gform_pre_render to prepopulate a dropdown with a query from my database. It works great in passing the value and text attributes but I would also like to include the 'title' attribute in the 'option' but not sure how. I have included it in my $items array but is not getting passed through. Here is my code:
foreach($races as $race) {
$items[] = array("value" => $race['title'], "text" =>$race['title'], "title" =>$race['distance']);
foreach($form["fields"] as &$field)
if($field["id"] == 1){
$field["choices"] = $items;
}
return $form;
}