Basically i have a field (in line item(commerce custom product)) with Field type: Entity Reference and Widget:View. The view is a list of terms and has an aditional field type:Entity Reference View Widget Checkbox to provide a checkbox in so user could configure the product.
The whole chain works fine from user point of view but there is no option to set the default value (in UI) and the option to set the default value from hook_form_alter() is not giving the needed result.
This is hook_form_alter:
function test_form_commerce_cart_add_to_cart_form_3_alter(&$form, &$form_state, $form_id){ $form['line_item_fields']['field_pesonal_data']['und'][0]['field_cover']['#default_value']=6; }
Please provide a solution. Thx!