Support

Account

Home Forums Backend Issues (wp-admin) modify field look in admin area based on value Reply To: modify field look in admin area based on value

  • Thank you! That is what i was looking for, but i have huge memory problem now.
    I’m trying to compare field with field from another post type using global $post, that’s causing my website to Fatal error: Allowed memory size exhausted.
    First i wanted to make one function for acf/load_field hook, but with page never loading i added different functions for different acf/load_field/name= hooks.
    Still it’s not working.

    code looks like this, even for 2 types of the field (or keys) i still get memory limit problems:

    global $post;
    $orig = get_field('original_id',$post->ID);
    if($orig) {
    	$field['instructions'] = get_field($field['name'],$orig); // that line is causing problems
    }
    return $field;

    edit: lol, just clicked “solved” by mistake 😀