This module is extension of webform module
webform_matrix_component Requirements:
webform
This module is intended to work with Drupal 7.x
About module:
This module provide functionality to add matrix component in webform module.
You can add matrix component like other components( textfield, select, label, date , etc) .
Subcomponent of matrix component is Textfield , Select , Label(markup), Date.
Admin select number of rows and number of columns. after selecting columns user can choose subcomponent of this component (Textfield , Select , Label(markup), Date).
Where admin also define basic property of subcomponent.
Eg.
Textfield - Title ,Default value
Date - Title, Start date,End date, Default date ( default timezone is user)
Select - Title, Options
Label - Title, Lable Name
This module also manage webform Results section like (table display, csv upload , listing of webform results. )
Link to the sandbox project: git clone http://git.drupal.org/sandbox/cpsinghal/1904116.git webform_matrix_component
Link to project page: http://drupal.org/sandbox/cpsinghal/1904116

Manual Reviews of other projects:
http://drupal.org/node/1984552#comment-7385100
http://drupal.org/node/1959172#comment-7385126
http://drupal.org/node/1989736#comment-7389522
http://drupal.org/node/1978712#comment-7389536
http://drupal.org/node/1946966#comment-7393524
http://drupal.org/node/1996830#comment-7421924
http://drupal.org/node/1971496#comment-7422040
http://drupal.org/node/1983518#comment-7422020
http://drupal.org/node/1994016#comment-7455742
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | webform.PNG | 14.93 KB | pagolo |
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxcpsinghal1904116git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
chetan-singhal commentedI have fixed PAReview checklist.
There are few method there naming cannot be changed due to webform module.
Webform module call function like
$function = '_webform_' . $callback . '_' . $type;
function _webform_defaults_matrix() {
function _webform_theme_matrix() {
function _webform_edit_matrix($component) {
function _webform_render_matrix($component, $value = NULL, $filter = TRUE) {
function _webform_submit_matrix($component, $value) {
function _webform_display_matrix($component, $value, $format = 'html') {
function _webform_analysis_matrix($component, $sids = array()) {
function _webform_table_matrix($component, $value) {
function _webform_csv_headers_matrix($component, $export_options) {
function _webform_csv_data_matrix($component, $export_options, $value) {
If any one has suggestion then give idea to me.
Comment #3
pranit84Manual Review:
1. Title Modified.
2. Use t() function in 'webform_matrix_component.api.php' file at line number 48.
3. Use t() function in 'matrix.inc' file at line number 154, 164, and similar other lines.
Comment #4
chetan-singhal commentedHi Pranit,
I have rectified all issue that you posted.
Comment #5
dclavain commentedHi @cpsinghal:
Review of the 7.x-2.x branch:
Comment #6
chetan-singhal commentedHi @dclavain
I have remove hidden file webform_matrix_component.api.php
Regarding following function
function _webform_defaults_matrix() {
function _webform_theme_matrix() {
function _webform_edit_matrix($component) {
function _webform_render_matrix($component, $value = NULL, $filter = TRUE) {
function _webform_submit_matrix($component, $value) {
function _webform_display_matrix($component, $value, $format = 'html') {
function _webform_analysis_matrix($component, $sids = array()) {
function _webform_table_matrix($component, $value) {
function _webform_csv_headers_matrix($component, $export_options) {
function _webform_csv_data_matrix($component, $export_options, $value) {
There is some issue
Webform module call above function in follwoing manner.
"_webform_edit_"component_name
"_webform_render_"component_name
and so on.
So I cannot change above function name.
Give me suggestion if you have any idea.
Comment #6.0
chetan-singhal commentedadd link -Manual review other project
Comment #6.1
chetan-singhal commentedadd link- manual review
Comment #6.2
chetan-singhal commentedAdd link- Review comment
Comment #7
chetan-singhal commentedHi @dclavain
I have remove hidden file webform_matrix_component.api.php
Regarding following function
function _webform_defaults_matrix() {
function _webform_theme_matrix() {
function _webform_edit_matrix($component) {
function _webform_render_matrix($component, $value = NULL, $filter = TRUE) {
function _webform_submit_matrix($component, $value) {
function _webform_display_matrix($component, $value, $format = 'html') {
function _webform_analysis_matrix($component, $sids = array()) {
function _webform_table_matrix($component, $value) {
function _webform_csv_headers_matrix($component, $export_options) {
function _webform_csv_data_matrix($component, $export_options, $value) {
There is some issue
Webform module call above function in follwoing manner.
"_webform_edit_"component_name
"_webform_render_"component_name
and so on.
So I cannot change above function name.
Give me suggestion if you have any idea.
Comment #7.0
chetan-singhal commentedAdd link- review comment
Comment #7.1
chetan-singhal commentedadd line- manual reveiw
Comment #8
chetan-singhal commentedAdd tag
Comment #9
pagolo commentedHi cpsinghal,
I tested your module. It seems to work fine, however I have a problem with your component position in the form.
Please see file attached. As you can see, "cognome" (=lastname) is shown after field "matrix", but "matrix" has weight 2 and "cognome" has weight 1, so the order seems to be incorrect...
You should fix this, if this depends on your module.
Cheers
Comment #10
klausimanual review of the 7.x-2.x branch:
<script>alert('XSS');</script>as label name for a label element I get a nasty javascript popup when rendering the form. You need to sanitize user provided input before printing into #markup. The #title is safe as that seems to be filtered in theme_form_element_label(). Please read http://drupal.org/node/28984 again.Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #11
klausiAnd please don't remove the security tag, we keep that for statistics and to show examples of security problems.
Comment #12
chetan-singhal commentedHi pagolo
Thanks for reviewing my code.
I have resolved issue.
Comment #13
chetan-singhal commentedHi klausi
I have resolved all security issue.
Thanks to guide me.
Comment #13.0
chetan-singhal commentedadd link- Manual Reviews of other projects
Comment #13.1
chetan-singhal commentedmanual review- Add comment
Comment #13.2
chetan-singhal commentedManual Review- Add comment
Comment #14
chetan-singhal commentedAdd tag
Comment #15
molenick commentedHello cpsinghal,
A few comments:
1) Function names should be lower case. See lines 20 and 33 in webform_matrix_component.api.php. I don't see any calls to these functions, are they necessary? Perhaps they're hooked into from somewhere else that I'm missing. In the case of webform_render_matrix_textfield_Alphabet, it also has no code.
2) This module is still vulnerable to XSS. If I add
alert('XSS') in either a label, I get a script alert pop-up when I view the submission results. It looks like the component fields are being sanitized correctly, though. 3) I got this PHP notice on the submissions result page as well: Notice: Undefined offset: 4 in _webform_display_matrix() (line 540 of /var/www/sites/all/modules/custom/webform_matrix_component/components/matrix.inc).Comment #16
chetan-singhal commentedHi molenick,
I am forget to commit file.
Now I have commited code.
Thanks for reviewing.
Comment #17
klausiReview of the 7.x-2.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
But otherwise looks RTBC to me now, I could not exploit any XSS anymore. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to patrickd as he might have time to take a final look at this.
Comment #18
chetan-singhal commentedHi klausi,
I have removed @author tag from webform_matrix_component.module and I have also add t() for translation.
Comment #19
patrickd commentedPlease don't use commit messages like "some changes", these don't help to understand what the actual code changes were.
Instead use the commit message to explain what you have done. It's also good to commit regularly, so you keep your commit messages small.
I recommend to only use module_load_include() when you don't know the exact path because it's not your own module/theme
from: module_load_include('inc', 'webform_matrix_component', '/components/matrix');
to: require_once dirname(__FILE__) . '/components/matrix/webform_matrix_component.inc';
For other developers you code is very hard to read, that's because you have many blocks of code without any inline commenting.
To understand your module you have to explain what you do in a code block and why you did it this certain way.
Beside that the code looks fine and I could not find any critical blockers.
Thanks for your contribution!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #20
chetan-singhal commentedHi patricked
I have promoted my sandbox project to full project.
Url is http://drupal.org/project/webform_matrix_component
I have created a release for that as well. But the module page is not displaying my release and download link.
Please let me know if i am mistaken.
Comment #20.0
chetan-singhal commentedManual Review- add comment link
Comment #21
chetan-singhal commentedadd tag
Comment #21.0
chetan-singhal commentedmanual review -add comment
Comment #22
patrickd commentedHere: http://drupal.org/node/1068944 are the instructions for creating new releases, I recommend following them step by step
Comment #23.0
(not verified) commentedmanual review - add comment
Comment #24
ManasiG commentedHi,
This is a great module when you need repetitive fields in a form.
I have few queries:
1. I see that 'File' is not a sub component for matrix component, so are there any developments going to have this feature or should I add this in sub component's list programmatically?
2. Once you add a new row in the form, I don't see the button or icon to delete any row if not needed. Do I need to also add this feature through code?
3. Or are there any other contrib modules where I could see these features?
Please help me on these queries.
Thanks!
Comment #25
hondaman900 commentedI have encountered an error in my first use of this module. Any suggestions as to hwo to trecity or get around this issue? I'd really like to have this working in my webforms.
Error:
Call to undefined function webform_filter_xss() in .../sites/all/modules/webform_matrix_component/components/matrix.inc on line 393Thanks in advance