Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm trying to build a Performance Review form that will list 5 or 6 items in the left-side column, followed by some select options in the right-side column.
I have been able to create a Matrix with the left side column having fillable textfields, but I was wondering if there was a way to be able to add "readonly" textfields, so they basically just show up as Labels.
I know I can add a label, but it repeats itself for each subsequent row that is added. I need each row to be different, with the same select options.
Am I missing something?
Thanks!
Comments
Comment #1
kyleheney CreditAttribution: kyleheney commentedI guess this could be achieved if I could somehow flip the rows and columns... I just need to be able to define the individual rows like you can for the individual columns.
Comment #2
chetan-singhal CreditAttribution: chetan-singhal commentedHi kyleheney ,
Yes I can. But this will not a part of webform_matrix_component. If you require I can made this for you.
Comment #3
kyleheney CreditAttribution: kyleheney commentedWhat do you mean?
I think the ability to flip rows/columns would be one that the other users of this module would like as well.
Perhaps a 2nd module called "Flipped Webform Matrix Component"?
Comment #4
chetan-singhal CreditAttribution: chetan-singhal commentedyes something like that or where we can configure column as well as row.
Comment #5
kyleheney CreditAttribution: kyleheney commentedThat would be great. Can you post a link to it here once completed?
Comment #6
chetan-singhal CreditAttribution: chetan-singhal commentedIf you wanna fixed this mail me chetansinghal1988@gmail.com
Comment #7
sanderss77 CreditAttribution: sanderss77 commentedI have the same need to have separate labels for each row. I have tried to find a solution for this together with the webform component but havent had any success. I tried the webform table module but it didnt work at all with the newest release of webform.
I have attached an image that you can take a look at.
Comment #8
chetan-singhal CreditAttribution: chetan-singhal commentedThis is enhancement I will add this my next release.
Comment #9
sanderss77 CreditAttribution: sanderss77 commentedVery good, let me know when you have added the row feature in the next release. I can test the feature for you an d give feedback.
Comment #10
sanderss77 CreditAttribution: sanderss77 commentedVery good, let me know when you have added the row feature in the next release. I can test the feature for you an d give feedback.
Comment #11
chetan-singhal CreditAttribution: chetan-singhal commentedI am not planning next few days. If you require this feature let me know.
Comment #12
benjaminarthurtThis feature seems like a must have for a module like this. I'd love to see it as well. I'll start looking at the code and If I come up with something useful will submit a patch.
Comment #13
sanderss77 CreditAttribution: sanderss77 commentedYes I think also its a must for this module. Looking forward to this feature.
Comment #14
littledynamo CreditAttribution: littledynamo commentedSubscribe
Comment #15
littledynamo CreditAttribution: littledynamo commentedI've written a patch, which allows different labels on each row. When the 'label' component is selected in the matrix component edit screen, there will be one textfield per row where the label can be added.
The module maintainer should probably review the following hunk in particular:
I've made an assumption that the drupal_render_children($element) call is for the purpose of rendering the 'add row' button. Is this correct? The problem I had was that all labels were being rendered for a second time below the table, so I changed the drupal_render_children call to render ONLY the 'add row' button.
Comment #16
littledynamo CreditAttribution: littledynamo commentedComment #18
littledynamo CreditAttribution: littledynamo commentedNew patch. Removed d.o. packaging info, which was accidentally committed.
Comment #19
littledynamo CreditAttribution: littledynamo commentedComment #20
chetan-singhal CreditAttribution: chetan-singhal commentedComment #21
littledynamo CreditAttribution: littledynamo commentedBackport to 3.x
Comment #22
steeph CreditAttribution: steeph commentedThe patch fails on the .info file. But it works, thanks!
I'm using 7.x-4.11.
Comment #23
devd CreditAttribution: devd commentedThanks to all of you and Wish you very happy new year.
I will review your patches and requested functionality.
Comment #24
steeph CreditAttribution: steeph commentedAny news on this? I'm using this on a webform that will go live soon. It works for me.
Comment #27
littledynamo CreditAttribution: littledynamo commentedComment #30
devd CreditAttribution: devd commentedHi littledynamo,
Your patch is working as per you implementation but i have some issue.
Can you please fixed the following issue which are in the file addLevel2.png
Comment #31
littledynamo CreditAttribution: littledynamo commented@devendra.yadav Does that happen when clicking the 'Add row' button?
Comment #32
devd CreditAttribution: devd commentedYes,
I think the following solution.
1- Your added label should not be mandatory.
2- Pick the Label of Header value when we are pressing the Add row button.
3- Put a Note in description regarding the same cause.
Thanks.
Devendra
Comment #33
littledynamo CreditAttribution: littledynamo commentedNew patch attached.
Comment #34
littledynamo CreditAttribution: littledynamo commentedFresh patch. Added isset check to suppress a warning.
Comment #35
MrPeanut CreditAttribution: MrPeanut commentedThe patch from #34 works great for me. Thanks, everyone!
Comment #36
sanderss77 CreditAttribution: sanderss77 commentedYes the patch #34 is working perfect. We really needed this patch! Thanks!
Comment #37
rparve@symphony3.com CreditAttribution: rparve@symphony3.com as a volunteer commentedYes the patch #34 is working perfect. We really needed this patch! Thank you so much!
Comment #38
TLTHades CreditAttribution: TLTHades commentedwebform_matrix_component-7.x-4.x-dev. Patch #34. I get 10 warnings (to 10 rows of the matrix):
Notice: Undefined index: #type в функции theme_webform_matrix_table() (строка 397 в файле /sites/www/molbank/test.molbank.ru/sites/all/modules/webform_matrix_component/webform_matrix_component.module).
Comment #40
kruser CreditAttribution: kruser commentedPatch #34 worked great for me
Comment #41
katannshaw CreditAttribution: katannshaw commentedPatch #34 worked great at adding the labels for each row option for me as well (on 7.x-4.16)...thanks! However as noted from TLTHades on comment #38 I also received this warning once the patch was installed:
Notice: Undefined index: #type in theme_webform_matrix_table() (line 397 of sites\all\modules\webform_matrix_component\webform_matrix_component.module).
I see these warnings when clicking the Next/Previous button and they do match up with how many rows are in the matrix.
Comment #42
devd CreditAttribution: devd at Capgemini commentedThanks littledynamo,
To develop this functionality. I review and verify the same functionality. it is working fine but getting some warnings when i click on button Add a row.
Please look that those.
Comment #43
snufkin CreditAttribution: snufkin commentedUpdating the patch with code style fixes and added an additional check for the #type attribute. The warning/notice goes away on my local test.
Comment #45
devd CreditAttribution: devd at Capgemini commentedFixed in dev version.
Comment #46
drattar CreditAttribution: drattar commentedhi ...
patch #34 and patch #43 don't work with me.
i use Webform Matrix Component (7.x-4.17)
and i applied patch manually because my site is on shared server!
any idea?
Comment #47
drattar CreditAttribution: drattar commentedhi
7.x-4.x-dev (2015-Sep-14 ) work correctly.