I have read through the forum posts and docs prior to this support request. Here is a quick summary of that I am trying to do.
I have a multipage form. On the first page are 3 text input boxes for the user to enter names. On the second page I want to populate a drop down field with the three values. Here is the code I am using in my hook:
add_filter( 'gform_pre_render_13', 'populate_dropdown' );
function populate_dropdown($form){
// creating drop down item array.
$items = array();
// adding initial empty value
$items[] = array("text" => "Please Select…", "value" => "");
// build array of values from text fields on first page of multipage form
$items[] = array("text" => $entry['4'], "value" => $entry['4']);
$items[] = array("text" => $entry['5'], "value" => $entry['5']);
$items[] = array("text" => $entry['6'], "value" => $entry['6']);
// loop over fields and populate dynamic values into dropdown field 6
foreach($form["fields"] as &$field)
if($field["id"] == 6){
$field["type"] = "select";
$field["choices"] = $items;
}
return $form;
}
The issue I have is that I don't get the $entry['x'] they are all blank. From reading the docs I assume I would need to use the gform_post_submission filter to get the $entry values.
Could you confirm if the post_submission filter is fired when the user goes from page 1 to page 2 and if so how I would use the post_submission and pre_render filters together.
Hopefully this is not a completely stupid question.
Thanks
Steve