I would like to suggest that the view mode of one field_collection entity accessed via url

?q=field-collection/field-fc-a/xxx

where xxx is entity item_id, should not be formatted as a table.

Comments

tim.plunkett’s picture

I think it should be optional (I definitely need it for the case I have in mind). I have to decide how to best expose this setting. Any ideas?

chalee’s picture

Making it optional is even better. You could add a checkbox on the module settings page, next to the one for enabling/disabling table formatter for forms. In the future you could even make the two settings applicable per entity bundle instead of globally as it is now.

tim.plunkett’s picture

Assigned: Unassigned » tim.plunkett
Category: task » feature

I was definitely thinking per bundle. Maybe tacking it onto where the Edit/Delete stuff is?

The global thing was a shortcut because someone provided a patch and talked me into it. I don't consider it a long term solution.

chalee’s picture

I agree if you mean on the bundle 'Manage display' page on the right side of the format field where you click on an icon on the far right to further refine the settings of the selected format.

On that settings section you can have three check boxes as below. Just a suggestion.

[ ] disable table formatter on form (edit mode)
[ ] disable table formatter on view mode of collection
[ ] disable table formatter on view mode of single (stand-alone) collection item

When user selects 'Table field-collection items' by default the 3 boxes will be un-checked meaning the table format will be applied in all three scenarios. The user can then optionally tick what they want to disabled.

tim.plunkett’s picture

That's what I had in mind. Now to find the time to code it :)

tim.plunkett’s picture

Priority: Normal » Major

I want this to go in before a beta release. I guess I should work on it...

tim.plunkett’s picture

Status: Active » Needs review
StatusFileSize
new5.7 KB
chalee’s picture

The patch works fine. Thanks.

BenK’s picture

Subscribing

gazwal’s picture

Subscribing
layout is broken cause of the Table when editing de f_collection form
screen here http://d.pr/lVXu
same feature resquest : http://drupal.org/node/1282090

czigor’s picture

Status: Needs work » Needs review

Sorry to drop in a bit late, but is this not a question of displays and widgets? The view of a node is determined by its display. The edit form by widgets. So I think the most drupalish way would be to keep the current 'Table field collection items' display as it is and add a 'Fc Table' widget to the Embedded and Hidden ones.

tim.plunkett’s picture

Status: Needs review » Needs work

Well now. #11 is a brilliant proposal. In fact, painfully obvious in hindsight. I'll work on that soon.

tim.plunkett’s picture

Title: View mode of one field_collection entity should not be formatted as a table » Provide a Field Collection Table widget
Category: feature » task
Status: Needs review » Active
mishac’s picture

StatusFileSize
new3.19 KB

I needed this for a site of mine, so I took a crack at creating a widget. I also changed the field_collection_table_form_alter function to only use the field_collection_table for editing if the proper widget is chosen.

tim.plunkett’s picture

Assigned: tim.plunkett » Unassigned
Status: Active » Needs review
StatusFileSize
new7.67 KB

Here's a more complete patch, which does away with the global admin settings form, making the "hide empty columns" a per instance setting.

tim.plunkett’s picture

Status: Needs review » Fixed
chalee’s picture

Assigned: tim.plunkett » Unassigned
Status: Active » Fixed
Issue tags: -Needs documentation

@tim.plunkett: Can you please explain how the new commit in #16 is used to achieve same functionality as was handled by patch in #7.

tim.plunkett’s picture

Assigned: Unassigned » tim.plunkett
Status: Fixed » Active
Issue tags: +Needs documentation

Sure thing. Hopefully I'll have time this week.

mudjunky’s picture

Assigned: Unassigned » tim.plunkett
Status: Fixed » Active
Issue tags: +Needs documentation

Thanks for providing the table widget! A little issue I'm having: it works when setting "Number of values" > 1. When set to 1, however, it looks more like the Embedded widget without labels.

Using field_collection_table 7.x-1.x-dev (12/21/11 1324426996) and field_collection 7.x-1.x-dev (1/7/12 1325938085).

dqd’s picture

Priority: Major » Normal
Status: Active » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.