I have a content type called Jobs.

This include a field contact which is user reference.

I have another content type called Job application.

This includes a node reference based on Jobs and field contact which is user reference.

I want when a user selects a job in the node reference select list on the job application form to automatically change the contact field in that form which the value that exists in the contact field for the relevant job selected.

Example: Job: Educator contact: Michael

On Job application upon selected the job "educator" the user reference field should automatically take the value Michael.

Any ideas on how to solve this? Would Rules work and if so how? If through programming, is there a module that allows for injecting code for content types?

Preferably I am looking for a solution that does not involve programming.

2 Answers 2


This sounds like a bad case of data de-normalization. You shouldn't have a "Contact" field on your "Job application" content type if it's simply going to duplicate whatever is already in the "Job" content type.

If you're simply wanting to be able to see who the contact is for a given application, use the "Rendered entity" formatter for the job reference field on the application content type. (I'm assuming you're using the Entity Reference module?) In the formatter settings, choose a view mode that only displays the contents of the Contact field on the job node.

This way, if the contact ever changes for the job, it'll live-update across all job applications.

  • I didn't even know there is such a live relation being able to work on Drupal. The reason for the replication is that I want to restrict node access for job application to only the appropriate contact for the job related to the job application. In my example, that would mean that only Michael can view that job application and no other user on drupal. Is there a way that I can achieve this?
    – Michael
    Commented Mar 2, 2014 at 2:14

You need to create a new role and give permission to that role and include Michel accordingly to that role from people tab on administrative menu.

  • Yes but what if there are multiple jobs with different contacts. Yes, this can restrict viewing to only a group of people but still one contact can view another contact's assigned job application. For security purposes its best if only the assigned contact can view a job application.
    – Michael
    Commented Mar 3, 2014 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.