Loading term references into a custom module
If the field is hidden and doesn't do anything client-side, you shouldn't touch it client-side. Do the Category -> Group translation server-side even if you're not very comfortable with it yet.

hook_node_presave should do the trick.