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 a question regarding entering data into custom entities

I have a usage case I believe is better for Drupal Entities than Content Types and Nodes. I have installed Entity Construction Kit and used it to set up the structure for my entity.

What is not clear to me is how I go about getting data into my entity. I assume we could do a mass CSV import via Feeds. But what about making individual entries? I'm looking for a way to enter the data through the Drupal Administration forms (i.e. Add Content > Entity Name) but that does not appear to be the case.

Are there additional modules out there that would give me the ability to do this?

Thank you for your time and assistance.

-- Chris

share|improve this question

1 Answer

I think everyone suffers the same bewilderment on first meeting ECK. Its workflow is bonkers.

You begin by creating an entity type and optionally renaming the default bundle (which otherwise will have the same name as your entity). I recommend giving the bundle a unique name to avoid confusion in this rabbit warren interface.

Then from the list of entities, click into that entity and then into the bundle. From here you can manage fields - and add your data from the 'entity list' tab. There, the link to add new instances of your entity type will be at the top of the interface - "+ add [name of your bundle]" and the list there will effectively serve as a rudimentary content list for that entity until you can whip something up in views.

If you want to cut through the labyrinth and use a simple link to add your data, it'll be structured like this:

admin/structure/entity-type/[your entity name]/[your bundle name]/add

share|improve this answer
Thank you Peter, for your response. I did find that actually. What I'm struggling with in my head is how I eventually give my users access to this form so they can enter content. It did kind of throw me after I found it under Structure. This concerns me since my users wouldn't have access to the Structure menu. You mentioned its possible to build an edit form through a view? How is that accomplished? I've never done that before. I've only built views to display content. Thanks again! – ccorbett Apr 27 at 2:23
I think our wires are crossed! I was referring to the list of entity content under the entity list tab - it's eck's equivalent of admin/content and that you would probably want to make a custom display for it using Views and VBO. For a custom form I assume you'd need to use the form API. – Peter Clemence Apr 27 at 6:14
Exactly, yes. But is the Entity List tab not only accessible through the Structure Tab? – ccorbett Apr 27 at 12:45
Yes. Have a look at this I stumbled on earlier. [trellon.com/content/blog/creating-own-entities-entity-api] It seems to cover much of what your looking for. – Peter Clemence Apr 28 at 4:54

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.