0

I will explain you with my use case:

I have a content type "job post" and another content type "Exam" For apply to a job you must pass the exam, the "job post" content type has an entity reference field "field_exam" that is referencing the "Exam".

While user creates the "job post" he can create his own "Exam" or he can Call for tender on creation of an "exam" for the "job post". In that case the User will recieve "exams" of other users and he will choose one of them for his "job post".

The list of options is a view of "exams", in front of the title of each "exam" should be a link that says "Choose this Exam", and if I click that link the field "field_exam" of the "job post" must be referencing that "exam".

So the main point of this is, how to change update the "field_exam" value selecting the entity outside, for example in a view or in the node page...

Thanks for your help.

1 Answer 1

1

You could use the Views and Rules Link modules (along with the Rules module) to accomplish this.

What you would do is create a Rules Link that will attach your line item (exam) to a Job (that the user selects).

You would likely need to have an field available for Rules to manipulate, but there would be no forms involved directly using an Entity Reference field (no forms involved).

3
  • Hello actually Im using Entity Reference, in the normal fashion you only can change the value of an entity reference field through the node/add or the node/edit forms, but let's say I a view with a list of exams, and for example click in one of those "add to my job post" and woala now the entity reference field is referencing that exam, is it more clear for you? Thanks
    – svelandiag
    Commented May 1, 2014 at 3:11
  • The Form API is not an option because the idea is do not go to the form... Look you have a list of exams in a view, in front of each exam's title you have a link "add to a job" then you select the exam you want to be referenced by a job post, then you are redirected to another page where you can choose the job post. maybe with the Entity API?
    – svelandiag
    Commented May 1, 2014 at 3:29
  • Updated to avoid forms and use Views. If I understand correctly, this should do the trick. No 'Node/add' or 'node/edit' required.
    – Citricguy
    Commented May 1, 2014 at 4:05

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.