title: ACF Field wont show up via jQuery and PHP
body: <p>I'm currently at a loss on how to do this. I want the title to dynamically change based on the city selected from a dropdown select box named with the id "#city_name". This is currently my code:</p>
  
  <pre><code>    jQuery(document).ready(function(jQuery)
      {
          jQuery("select[name='selectyourcity']").change(function()
          {
              var selectedid = jQuery("select[name='selectyourcity']").val();
              jQuery("#city_name").html('&lt;?php the_field("name", '+selectedid+');?&gt;');
          })
      });
  </code></pre>
  
  <p>This does not display the data I need from the ACF field I made. The thing is, I've tested "selectedid" and it does work and returns the id I want. I tested it with this:</p>
  
  <pre><code>    jQuery(document).ready(function(jQuery)
      {
          jQuery("select[name='selectyourcity']").change(function()
          {
              var selectedid = jQuery("select[name='selectyourcity']").val();
              jQuery("#city_name").html(selectedid);
          })
      });
  </code></pre>
  
  <p>I also tried placing in the id directly into the PHP part and it works too:</p>
  
  <pre><code>    jQuery(document).ready(function(jQuery)
      {
          jQuery("select[name='selectyourcity']").change(function()
          {
              var selectedid = jQuery("select[name='selectyourcity']").val();
              jQuery("#city_name").html('&lt;?php the_field("name", 746);?&gt;');
          })
      });
  </code></pre>
  
  <p>I can't pinpoint what is wrong. I believe its something with adding the string in with the variable.</p>
  
  <p>Here's the HTML Code for the select dropdown, or at least a part of it.</p>
  
  <pre><code>&lt;select name="selectyourcity" class=""&gt;
         &lt;option value="placeholder" selected disabled &gt;Select your city&lt;/option&gt;
         &lt;?php
         $counter=0;
         $args = array(
         'post_type' =&gt; 'event_cities',
         'posts_per_page'=&gt; -1,
         'orderby'  =&gt; array( 
                'title'  =&gt; 'ASC',
               ),
         );
         $query = new WP_Query( $args );
         while ( $query-&gt;have_posts() ) {
               $query-&gt;the_post();
               ?&gt;&lt;option value="&lt;?php echo get_the_id();?&gt;"&gt;&lt;?php the_field('name');?&gt;&lt;/option&gt;&lt;?php
                       $counter = $counter + 1;
               }
               wp_reset_postdata();
               ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>This generates the following code:</p>
  
  <pre><code>&lt;select name="selectyourcity" class=""&gt;
         &lt;option value="placeholder" selected="" disabled=""&gt;Select your city&lt;/option&gt;
         &lt;option value="746"&gt;Bogotá&lt;/option&gt;
         &lt;option value="636"&gt;Medellín&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I want to insert the title for an ACF field named 'name' here:</p>
  
  <pre><code>&lt;div data-element="text" class="cityTitle cs-preview-element-wrapper"&gt;
         &lt;div class="x-text cs-ta-center"&gt;
                &lt;h4 id="city_name"&gt;Name goes here&lt;/h4&gt;
         &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>