Adding fields to attachment – only shows when inserting new attachments

Okay I think I have it, you need to add a matching filter to attachment_fields_to_save to save the new field (say as post meta to the attachment.)

add_filter( 'attachment_fields_to_save', 'save_some_custom_field', 10, 2 );
function save_some_custom_field($post, $attachment) {
    $attachid = $post['ID']; // yes this is actually an array here
    update_post_meta($attachid,'someCustom',$attachment['someCustom']);
}

Then you would add to your $form_fields edit filter array something like:

'value' => get_post_meta($post->ID,'someCustom',true),

…remembering to remove the = null from the function arguments.

unset($form_fields['post_excerpt']); and unset($form_fields['post_content']); in the edit filter should remove caption and description fields respectively, not sure on the required part though.

error code: 523