How to use the gform_pre_render filter in Edit Entry
You can modify how Gravity Forms fields are rendered in the Edit Entry form, just like you do in Gravity Forms.
The important thing is to set the priority to a number higher than 5000.
Instead of:
add_filter( 'gform_pre_render_12', 'my_custom_function_to_populate_fields' );
Use this instead:
add_filter( 'gform_pre_render_12', 'my_custom_function_to_populate_fields', 5001 );
That will do it!