title: Gravity forms input values
body: <p>I'm new in the php world and i'm trying to build something in wordpress by gravity forms.</p>
  
  <p>Basicly for now I just playing around and try to create some codes I can use when I start building. My question is: I have a form 1 where I can enter a name e.g. Football,Baseball,Hockey and it get saved to my data base. Then I have another form with the id 2 where there is a drop down box, here i want those values(names) submitted in form 1 to be dynamically populated. I have been trying to create a code by finding pieces around some websites (you will properly discover I'm mixing everything together) and ended up with this:</p>
  
  <pre><code>add_filter("gform_pre_render", "test_task");
  
  add_filter("gform_admin_pre_render", "test_task");
  
  add_filter('gform_pre_submission_filter', 'test_task');
  function test_task($entry, $form){
  
  if($form["id"] != 2)
     return $form;
  
  $entry["1"];
  
  $items = array();
  
  $items[] = array("text" =&gt; "Choose Sport", "value" =&gt; "");
  
  foreach($posts as $post)
      $items[] = array("value" =&gt; $post-&gt;post_title, "text" =&gt; $post-&gt;post_title);
  
  foreach($form["fields"] as &amp;$field)
      if($field["id"] == 2){            
          $field["choices"] = $items;
      }
  
      return $form;
  }
  </code></pre>
  
  <p>Hope someone can show me how it should be done so I can learn to do it in the future.</p>
  
  <p>Sincerely</p>
  
  <p>Lars</p>