0

I don't want to use field_collection ;) I'll be easy.

I want to build a module that create a a field that let me to save two values at the same time, name and date.

I'd like to have both in the same table, but I don't find any article that explain how to make/define it.

It will be a field with two fields to fill in a node.

Any idea?

Thanks.

3 Answers 3

1

Download the examples module and look through the Field Example module.

It contains extensive code examples that show you in detail how to create a custom field, widget and formatter.

1
  • Yes, but examples only play with one field no with two fields. And I remember that in d6 it was black magick. Commented Apr 25, 2013 at 7:43
0

You can create custom compound fields in cck. I found following article for Drupal 7 Compound fields in Drupal 7 , you may get a clear idea from this article how to get proceed.

Previously i have tried this D6 tutorial, and created a compound field. i have not tried yet in D7

0
0

The answer was in my library, thanks to "Drupal 7 module development" I found what I was looking for.

The chapter to build a new field explain how to build a field with 2 o 3 database-fields, more easy than drupal 6 :)

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.