Hello,
I'm working on a node type called Project and another one called Contact.
The Project have some Entity Reference fields, with Contact selection.
To search/select, create and edit Contact entities inside the Project edit form, i'm using References Dialog module. I'm not sure that it's the perfect one for that, but it can perfectly search contact Entity References from a View.
That's the context !
Now, i would like to display search, create, edit and remove Contacts links directly from Project node view or from a table of Projects with Views module. Users will no longer need to go through the Project edit form to edit Contacts.
Any ideas ?
Thank you in advance for your reply.
Nicolas.
Comments
Solution ?
Hello,
Maybe i find a solution.
To add (and search via References dialog) or delete some entity references directly from parent node view, i use form_alter hook.
For example, to have a add link, i use the node edit link with parameters (field name, action, destination).
URL: /node/xx/edit?field=field_project_contact&action=add&destination=projets
To have a delete link, i use the node edit link too with same parameters (but not the same action parameter value)
URL: /node/xx/edit?field=field_project_contact&action=remove&destination=projets
In my form_alter hook, i have the following code :
Voilà.
Nicolas.