I am creating a custom content type named "Invoice". This content type is having attributes like Company Name (entity reference to company content type), Bill details, tax details and calculations. Can you please suggest how can I get elements/attributes like shown in an image in custom content type add new content form? enter image description here

2 Answers 2


field_collection module allows you to add a field (Bill details) that contains a collection of fields (Amount, Service Tax, VAT, etc.). Set it to accept multiple values and you get a list like the one shown in the photo.

  • I tried field_collect. Its not generating the table. If you have any demo link, can you please share? Commented Feb 24, 2016 at 15:16
  • Yes, it's not straightforward. Make sure you have a look at the documentation. After the field collection field is created it's managed under from Home > Administration > Structure > Field collections. This is where fields are added to the field collections created in the Manage fields tab.
    – zendka
    Commented Feb 28, 2016 at 0:20

You will need to override the node form template for your invoice content type with a custom template in your theme. More info -> Theming Node Forms in Drupal 7 and here

In your template you'd build a layout for your fields and output form fields in place like this

<?php print drupal_render($form['fieldname']);?>

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.