How to set the default value of an entity reference to an entityform type
I've found a way, but it might not be the best way. I remove all the other options from the select list so the one I want is the only one left. (What is strange, is that in some content types I can set a default value for the entity reference and in some I cannot, but this worked anyway)

if ($form_id == 'inschrijvingsformulier_testdag_p_node_form'){

    $form['field_inschrijvingsformulier_tes']['und']['#options']=array(1 =&gt; 'inschrijvingsformulier testdag',);
    $form['field_inschrijvingsformulier_tes']["#attributes"]['class'][] = 'element-invisible';
}