Home Forums ACF PRO Not all fields producing data


Not all fields producing data

  • I have one field in my field group that does no produce any data on the front end. What’s strange is all of the field data is put in the CPT / database. I can see the data in the CPT on the backend, nothing on the frontend though.

    The problem field is number_povs, all the other fields work fine on the frontend and backend.

    This is my field group config: FieldGroup

    This is my form code.

    	Template Name: New POV Travel Full Width
    	Description: A page template without the left or right columns
    	@package flat_responsive
    	@since 1.0.0
    get_header(); ?>
    <section id="fr-content-area" class="fr-contents" role="main">
        <div class="container">
            <div class="row"> 
            	<div class="col-md-9">
    	<?php while ( have_posts() ) : the_post(); ?>
    	<h2><?php the_title(); ?></h2>
    <!--- Displays the data submitted through the form --->
    	$current_user = wp_get_current_user();
    	if ( 0 == $current_user->ID ) {
    		// Not logged in.
    		echo '<h4>** You must be logged in to use this calculator. **</h4>';
    		echo 'Membership is free. <br/>
    		Register <a href="">here</a>.</br>
    		Login <a href="">here</a>.
    	} else {
    		// The Form Data
    		$dla = get_field('dla');
    		$miles = get_field('miles');
    		// Number of POVs driven
    		$povs = get_field('number_povs');
    				'id' => 'POV-Travel',
    				'post_id'		=> 'new_post',
    				'field_groups'	=> array(431),
    				'new_post'		=> array(
    					'post_type'		=> 'pov_travel',
    					'post_status'	=> 'publish'),
    				'submit_value'		=> 'Submit',
    		} else {
    			echo '<Strong>DISLOCATION ALLOWANCE</strong><br/>';
    			echo "DLA rate: $".$dla."<br/><br/>";
    			echo '<Strong>AUTHORIZED TRAVEL TIME</strong><br/>';
    			echo "Miles entered = " .$miles." miles<br/>";
    			echo '<Strong>MALT (Monetary Allowance in Lieu of Transportation)</strong><br/>';
    			echo 'Mileage = '.$mileage.'<br/>';
    			echo 'Number of POVs = '.$povs.'<br/>';
    <!--- Displays the data submitted through the form -->
    	<?php endwhile; //End the Loop ?>
    <?php get_footer(); ?>

    Thus far, I have renamed the field, deleted it and re-created it with another name… still nothing.

    Am I missing something in the code?

  • Hi @signalwarrant

    I’m afraid I couldn’t find anything wrong with your code. Is it possible that you use a cache plugin? If you use it, could you please delete the cache and test it again using the private or incognito mode on your browser? Also, could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    If the issue persists, could you please open a new ticket and provide temporary admin credentials to your site? You can open a new ticket here: Don’t forget to explain the issue again or provide the link to this thread.

    Thanks 🙂

  • James,

    I’m out of troubleshooting ideas, I just submitted the support ticket.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Not all fields producing data’ is closed to new replies.