0

I am adding the amount of 2xx of fields to a content type at /admin/content/node-type/product/fields, is there any alternative way such as SQL statement to add these fields?

Thanks

1 Answer 1

1

Do you mean you're adding over 200 fields to a content type?! Yikes!

If so, I'd strongly recommend you look into:

  • Breaking the content type up into several smaller ones and using Node References to join them.
  • Making sure you're using multi-value fields where at all possible.
  • Using one or two 'Extra specification'-style free text/WYSIWYG fields to store unimportant data from many fields, provided you don't need to filter on those fields.

The issue comes down to practicality and future development... Imagine the size of your edit forms! Huge forms can actually cause problems for people's computers due to memory limitations. Imagine trying to debug or style such forms...

By breaking up the content type into groupings of fields, and collapsing discrete fields into text areas you can better normalise the data and, for a little extra work up front, save yourself a lot of pain later.

Drupal fields have entries in several tables and need many settings created, so I'd avoid using SQL to do it as it'd probably be much more work than just manually adding them.

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.