title: WordPress ACF: can't get field for Menu Item
body: <p>I've created a custom field for Menu Items.</p>
  
  <p>I'm using the field to allow the user to add onClick events.</p>
  
  <p>For some reason I can't get the value when I call get_field.</p>
  
  <p>This is my test code:</p>
  
  <pre><code>function nav_analytics_field(  $atts, $item, $args ) {
  
      foreach( $item as &amp;$link ) {
  
          $event_code = get_field('ga_event');
  
          if( $event_code ) {
          $atts['onClick'] = $event_code;
          } else {
          $atts['data-event'] = 'no-event';
      }
      } // end foreach
  
      return $atts ;
  
  }
  </code></pre>
  
  <p>The loop adds an onClick attribute to each menu item.</p>
  
  <p>My filtering is clearing working: for each menu item I am getting the output of the 'else' condition. However, this happens whether field data exists or not.</p>
  
  <p>This indicates that $event_code isn't being populated by get_field().</p>
  
  <p>So... how do I actually get the field?</p>