0

i have a content type named product. i need to add product like this:

title: product1

description: this is a product

company:a price:100

company:b price:200

company is a node reference field with numbered of values set to unlimited and price is a text field but i don't know how relate price field with company.

if i can't do something like this in drupal 6, drupal 7 help me?

1 Answer 1

1

If you use CCK ver 3.x you get the multigroup submοdule. This allows you to create a group of fields like in you case company and price and then create multiple instances of this group.

UPDATE

CCK ver 3.x is alpha. However I have used it in production without problems. You could look into the issue queue for bugs in the 3.x version before you use it.

If you are creating a new site I would suggest going with drupal 7. CCK has moved to core in drupal 7 but the functionality of multigroup does not exist. However you can achieve a similar result using the Field Collection module. Looking at this http://oliverdavies.co.uk/blog/2011/08/create-multigroups-drupal-7-using-field-collections or this http://mostrey.be/creating-multigroup-widgets-drupal-7 will find out how.

2
  • thank you. it is a alpha version. what about drupal 7?
    – user780
    Commented Jul 9, 2012 at 13:17
  • 1
    It is alpha version but I have used it in production without problems. Perhaps you could look into the issue queue for bugs in the 3.x version before you use it. If you are creating a new site I would suggest drupal 7. CCK has moved to core in drupal 7 but the functionality of multigroup does not exist. However you can achieve a similar result using the Field Collection module. Look at this mostrey.be/creating-multigroup-widgets-drupal-7 and this oliverdavies.co.uk/blog/2011/08/…
    – Mike
    Commented Jul 9, 2012 at 13:30

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.