Support

Account

Forum Replies Created

  • hello

    i make it work with this code

    
    function prevent_save_acf_value($value, $post_id, $field) {
        return get_field('thisongov', $post_id);
    }
    add_filter('acf/update_value/name=thisongov', 'prevent_save_acf_value', 10, 3);
    
    function dorzki_acf_read_only_field( $field ) {
      if( 'thisongov' === $field['name'] ) {
        $field['disabled'] = true;	
      }
      return $field;
    
    }
    
    add_filter( 'acf/load_field', 'dorzki_acf_read_only_field' );
    
    

    thank you ..

    is there any way to add 2 fields values into one as array ?

  • thank you .

    i use your code and work fine except the same issue that when i go to edit any person page. the data on the field gone .

  • no need to be shown on back end on people page just front end

  • thank you for your respond, really thank you .

    if i need to change the repeater what the best option i need to use ? this is how i need it to work :
    – each event have people on it and each people have different role on this event so as example

    ————-
    | EVENT | ROLE | LOCATION
    | EVENT 2020 | READER | HALL 1
    | EVENT 2021 | ADMIN. | OFFICE 202
    | EVENT 2022 | ORGANIZER | MAIL HALL

    so i need repeater to add all these on one page , i can do that with this single page but the issue i have is i need to show on people page all events he intend with the role and location .

    if you can help me at least fix the issue with deleting the content on the field when edit any people page .

    thank you

  • hello
    thank you for your respond ,

    i make it work with nested repeater and work fine (for now) BUT the issue that when ever i edit any People record the field that get the content from the other filed delete the value auto .

    i try your code

    // again, field key of top level field
    add_filter('acf/prepare_field/name=related_events_people', 'my_remove_field');
    function my_remove_field($field) {
      return false;
    }

    that hide the field but still when i hit save the changes the fields delete any value was have it on database .

    i bit confuse and try to make it work but i don’t know how to make it work and im not that good with PHP

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