Node add form set entity reference default selection based on content from another type node
I suppose with 


  set the form selection


you mean the default value of the taxonomy term reference field?

If yes, in the code above try this:

$form['field_topic']['widget']['#default_value'] = $term-&gt;tid();


Btw. you also want to change your implementation from MYMODULE_form_alter to MYMODULE_form_node_forum_form_alter, because the former hook will be called for all forms, whereas the latter is just called when the forum node form renders.