Support

Account

Home Forums Backend Issues (wp-admin) ACF values not showing in backend

Solved

ACF values not showing in backend

  • Hey everyone,

    I have 6 tabs in which I have 8-10 “clone” fields (they clone a repeater). Each tab also has 2 radio buttons, to determine which 2 clones will be shown (only 2 clone fields will be shown at a time).

    The “repeaters” that the clone fields use are “templates” and outside the tabs and hidden with css.

    Anyways, I don’t know which info is and isn’t relevant for my question so if I need to provide more info please let me know.

    So here is my actual question: Everything works fine, I can use all the fields exactly as I want to, the data gets saved and I can access it in my template files. The only problem is that the saved data is *only* accessible on the frontend side, I don’t see the previously inputted values when I’m editing the post. So let’s say I’m editing a “title” text box, the ACF field doesn’t load the current title value, but when I input a new value and click “update” it does change the title on the frontend. As soon as the backend page refreshes after updating, the value from the text boxes disappears (but the values are obviously in the database because they do show up on the frontend).

    Anyone encountered anything like this? I hope someone can be of help 🙂

  • Hi @luukx20

    Could you please try to set the Prefix Field Names to “Yes”?

    Could you please share the JSON export file of your field group and the detailed steps to reproduce the issue?

    Also, could you please share the code example you used on your template?

    Thanks 🙂

  • Hi James,

    Thanks so much for your reply, all the Field Names were already prefixed, the labels aren’t but I assume this shouldn’t make a difference right?

    https://drive.google.com/file/d/0B3wNowEzXV_3RjNFdW9mTjdqYTQ/view?usp=sharing

    That’s the JSON file, as for a code example, I haven’t really started working on the actual template yet. get_fields() and get_field('field-name') is all I’m doing right now and I can see all the values, also the ones that don’t show up in the backend and image urls.

    P.s. As explained there are 2 radio buttons determining which clone fields appear, each radio button has 5 options. The “login form” option is the only one that shows the values in the backend. I tried messing around with the order of things (so that “login form” is no longer the first option), but it didn’t help.

    Edit: I forgot to mention, if you’re going to import my JSON settings, everything may not work as expected because I’m using some css to tweak the appearance. I’ve added the css rules below, obviously the .hidden class sets the display to none.

    .acf-clone-fields > .acf-field-repeater.hidden {
    	display: block !important;
    }
    
    .acf-field-left {
    	float: left !important;
    }
    
    .acf-field-right {
    	float: right !important;
    }
    
    .acf-field-repeater.hidden > .acf-label > label {
    	display: none !important;
    }
  • Hi @luukx20

    I’m not sure if there was an export/import issue, but it seems you have a lot of fields with the same field name. This can cause the database entries that are overridden by the other fields that have the same field name. Could you please rename them so they have unique field names instead?

    I hope this makes sense 🙂

  • Hi James,

    Does and doesn’t make sense, since I can access the data on the frontend (I didn’t try every field obviously, but a lot of them) one would think the data is properly saved in the database. But I’ll give all of the fields a unique name and try again, thanks for your help so far! 🙂

    Edit: Yep, that did it! Thanks so much 🙂

  • Hi, I have similar issue – The values seem to be “removed” somehow. I’ve lost lots of data and I don’t understand that. I have many posts with field name of the same kind. What should I do with it? I can’t give specific name for each field, this is a repeater field and the rows are repeating.

  • Hey @eddr,

    Do you have a lot of fields? Before I had the problem with the same field names, my problem was that the max_input_vars setting in php was set too low (default is 1000 I believe).

    Maybe you can check your php log and see if it gives you any errors about that? And if it does put something like php_value max_input_vars 3000 in your .htaccess file, or edit (if you can) your php.ini file.

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

The topic ‘ACF values not showing in backend’ is closed to new replies.