Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I have an "address" field among the user fields. Here users can specify several entries for their addresses. They can create orders (these are custom content type nodes). The order node has a "shipping address" field. Users should be able to choose one address from their previously stored ones and use them on the order form.

How can I do this? What I have in mind is adding a custom js that makes an ajax call and fetches the addresses from the user fields. Is it a good idea or is there any simpler method?

It would be fine too if I can make a reference field to the user datas and users would see a combo box to choose their address from.

share|improve this question

1 Answer

I believe you could achieve this with the Rules module. Checkout Learn Rules with NodeOne, part 7: Conditions on loaded objects. In part 8 you will see how to Use PHP to populate CCK fields. Although this is for Drupal 6, you should be able to use a similar approach in Drupal 7.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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