Needs review
Project:
Flexifield
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Aug 2008 at 08:27 UTC
Updated:
22 Mar 2012 at 16:23 UTC
Jump to comment: Most recent file
Comments
Comment #1
effulgentsia commentedThank you very much for the request. It's very helpful to get ideas of what people are interested in.
I expect this to be possible. The next thing I'm working on is the theming approach, but I plan on being able to have theming functions / tpl files able to control how the containing field / contained fields are themed in both view mode and edit mode.
I'll also look into whether formatters can be configured so that rendering as a table could be configured entirely through the interface and not require knowledge of how to work with theming functions / tpl files.
I don't have an estimate on when the theming / formatters will be ready. I'll be actively working on it, since we need it for a project my company is working on, but I also have other work unrelated to this module that I need to work on.
Comment #2
chirale commentedIt's good to hear this. A table-like theme as CwDrup proposal could be achieved converting field label to "table headers" reducing redundancies (repeated labels for each field). Another interesting case for a "table" theme could be the text field option widget handling. Each option could be returned as a table row under a common header, displaying each label one time.
A fixed header on scrolling like admin/build/modules on Drupal 6.x should be fine with an increasing number of elements. (@CwDrup: I've opened an issue for Content Taxonomy elements not showing).
Comment #3
exintaexi commentedHello,
Is this "table-like" appearance implemented?
This is a great module, but you can understand that if you have a bunch of fields to enter something as simple as a number, then it's appearance in edit mode is not very convenient!
Has anyone found any way to work around this?
Thanks!
Comment #4
leo.ruffini commentedI would also really like to see this feature included.
Thanks for the module, it is great.
Leo
Comment #5
crea commentedSince effulgentsia is not very active, I don't submit this as patch but instead as standalone module.
This code is maybe ugly, and "needs work" but setting it as "needs review" to get more attention. Please try and review.
Some notes:
Comment #6
galser commentedThanks for small but great add-on module to FlexiField.
I currently testing it, and had made some useful correction, maybe it make sense for other peoples over here.
Imagen situation when your flexifield-field displayed as table, and your have all table data for some column empty, maybe better to hide this column at all. Well, that is simple.
Replace this lines (starting from line 57 in flexifield_table.module )
With this :
E.g. - one additional check before, and a closing bracket after.
If anything wrong in my post style.. correct me please, because I am newbie here.
Comment #7
crea commentedWhy would you want to skip cells like that ? What if on one row same column is empty and on another it's not ? Header will be set up anyway.
There could be use cases to show empty columns. And as it was said in #5 there is setting to hide column so adding additional code seems unneeded.
Comment #8
zeno129 commentedI was getting the following error:
To make it work I changed line 43 from:
to this:
Hope someone finds this helpful. :-)
Comment #9
zeno129 commentedThe label for each item (same as the column headers) was showing in every cell (which is annoying)...
to eliminate the label from showing in every cell I had to do add a couple of lines:
I wasn't able to eliminate the 2 spaces that appear right before the item... if anyone figures this out, please let me know.
I've attached the module with the changes I made for anyone who wants it.
Comment #10
effulgentsia commentedThis is cool. Thanks for taking the initiative to work on it. I've been busy on other issues, but I would like to get something like this rolled into the project before moving to beta releases.
Clarification in response to comment #8. Alpha4 of flexifield had the function named "_flexifield_field_invoke". With alpha5 (released a few minutes ago), the function is "flexifield_item_invoke".
Comment #11
crea commentedOne more note:
You can theme output of each field in the table same way as any CCK field: using template files like "content-field.tpl.php" (exact filename depends on your usecase - see CCK field theming documentation). Default template produces lots of trash markup code which is unneeded in Flexifield use case so you can make your own templates and remove the trash.
This may change, depending on how effulgentsia actually implements formatter code, but atm this works.
Comment #12
nigelcunningham commentedSubscribing. I've just started using this, and it's working fine.
Comment #13
giorgio79 commentedAny news? :)
Comment #14
Bobuido commentedInteresting - I'll have to take a look at this
I just started using Flexifield and this would make things much neater in the output
Thanks
Comment #15
aendra commentedThis is really cool; I tried this module yesterday and really like the output.
It would be *great* if this was merged into the main Flexifield plugin sometime...
One issue I had: I needed to revert the change made in http://drupal.org/node/291305#comment-1756646 (I'm using 6.x-1.0-alpha5 if that helps any) because I was getting an unknown function error. After changing the function name back, everything works great.
Comment #16
steeph commentedThis sounds very nice!
But if i choose Table for the field display, I get an error 500 when visiting a page where the flexi field should be shown (even if I switch of the field display). This happens as on the node page as well as in a view. I tried it with both flexi field 6.x-1.0-alpha5 and the dev version. I tried it again after switching of all other cck modules i had installed.
Can anybody help me? I've just began learning PHP.
Comment #17
Clint Eagar commentedWorks great! I can confirm that the fix in #10 is needed for the 6.x-1.0-alpha5 version of flexifield.
The function named "_flexifield_field_invoke" has changed to "flexifield_item_invoke" on line 48 of flexifield_table.module
Thanks for your work here!
Comment #18
hanoiiIf you use #8 with alpha5 it works just fine.
No need to do #9 as you can do so with configuring it on CCK.
I can upload this as a different module or even a sandbox project if any of you in interested.
Comment #19
benahlquist commentedThis worked as expected—outstanding work all, and thank you!