1

How to pass float field value from node(content type A) to another node(content type B)?
which content type B referenced to content type A by using reference from url widget.
thanks

  • When do you want to pass the values? – Patrick Kenny Mar 31 '12 at 6:49
  • when creating a new node (content type B). – abd Mar 31 '12 at 6:57
2

First of all: This introduces redundant data into your DB. Generally this isn't a good idea.

If you must for some reason:

You can implement hook_node_presave for content type B. You get the fully populated $node. This gives you the possibility to load the referenced node type A and grab the value you want to set in B.

Maybe you want to consider to implement the same for content type A. This gives you the possibility to propagete this value every time it changes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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