Hi Brilliant module you've built here. Is there any chance that you will be integrating this with rules? The reason I ask is that rules has released this cool function where you can setup rules while the form is being built and it would be good to have an action where you get Node Reference from the URL.

Thoughts?

Thanks,

Daimian

Comments

b-prod’s picture

Status: Active » Needs review
Issue tags: +rules integration
StatusFileSize
new9.72 KB

Here is a patch which creates an action to populate a nodereference URL field with rules. This patch solves a problem which is not exactly the one described above, because it does not handle the filling of the field by searching in the URL.

Actually this patch allow to use tokens, fixed nid or PHP code to fill the nodereference URL field.

Filling the nodereference field by searching in the URL will work in a very few cases: the rule needs to be called from very specific pages URLs. That's why I rather implements a standard way to use rules, which works in standard cases.

b-prod’s picture

StatusFileSize
new9.79 KB

Here is an updated patch. There were an omission in the last file: I forgot to modify the #value key by #default_value.

Parkes Design’s picture

Hi B-Prod, Thanks for the patch. I'll give it a go and report back :-)

quicksketch’s picture

Status: Needs review » Closed (won't fix)

I do not use or support Rules. I would prefer not to add this because I am completely unable to test or support this functionality.