Support

Account

Home Forums Add-ons Repeater Field problems saving file type repeater field Reply To: problems saving file type repeater field

  • Hi @bshaughnessy

    Could you please try to use the update_field() function instead? You should be able to do it like this:

    // Please use field key instead of field name
    $field_key = 'field_123456789abc';
    
    // Get the field value first if it's available
    $repeater_value = get_field('repeater_field_name');
    
    // Add the row to the repeater
    $repeater_value[] = array('memos_upload_file' => $attach_id);
    
    // Update the repeater field
    update_field($field_key, $repeater_value, $post_id );

    I hope this helps 🙂