I have a content type Proposal
with a entity reference field Proposed by
. This is an autocomplete field that targets Users in the application. You can give in multiple users that are in the application.
But now I would like to give the possibility to the user that they can give in user that are NOT in the application. So they can enter email addresses from random persons, they will receive an email with a link to register. But how can I get this data? Because it's not saved when the user isn't in the application.
I tried to do this with hook_node_validate but this is the result I get:
array (size=1)
'und' =>
array (size=4)
0 =>
array (size=2)
'target_id' => string '26' (length=2)
'_weight' => string '0' (length=1)
1 =>
array (size=2)
'target_id' => null
'_weight' => string '1' (length=1)
2 =>
array (size=2)
'target_id' => string '' (length=0)
'_weight' => string '2' (length=1)
'add_more' => string 'Add another item' (length=16)
So no email address that I gave in.. Just a target_id = null. How could I do this?