Support

Account

Forum Replies Created

  • No worries all, I probably really confused it.

    I just added a Text Field and added a CSS class of hidden-field and then just did this:

    add_filter('acf/update_value/key=XXXXXXXXX', 'my_acf_update_value', 10, 4);
    
    function my_acf_update_value( $value, $post_id, $field ) {
    
        if( !$value ) {
            return uniqid();
        } else {
            return $value;
        }
    
    }
Viewing 1 post (of 1 total)